Example #1
0
<?php

/// Copyright (c) 2004-2015, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('tagId' => array('int', 'min' => 1)));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
importlib('model.blog.entry');
/// Loads entry list.
$listWithPaging = getEntryListWithPagingByTag(getBlogId(), $_POST['tagId'], 1, 1);
$list = array('title' => $suri['value'], 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']);
$tagName = getTagById(getBlogId(), $_POST['tagId']);
$numberOfPosts = $list['count'];
$entryList = '<a href="' . $context->getProperty('uri.blog') . '/owner/entry/?tagId=' . $_POST['tagId'] . '">' . _f('"%1" 태그를 갖는 모든 글의 목록을 봅니다', $tagName) . '</a>';
$result = array('error' => 0, 'tagName' => $tagName, 'numberOfPosts' => $numberOfPosts, 'entryList' => $entryList);
Respond::PrintResult($result);
Example #2
0
$cache = pageCache::getInstance();
if (strlen($suri['value'])) {
    if (!isset($suri['id']) || Setting::getBlogSettingGlobal('useSloganOnTag', 1) == 1) {
        $tag = getTagId($blogid, $suri['value']);
        $listFeedURL = 'tag/' . $suri['value'];
    } else {
        $tag = $suri['id'];
        $suri['value'] = getTagById($blogid, $suri['id']);
        $listFeedURL = 'tag/' . $suri['id'];
    }
    $preservedEntries = $entryCache = $listCache = null;
    if ($skinSetting['showListOnTag'] != 0) {
        $cache->reset();
        $cache->name = 'tagList-' . $tag . '-' . $suri['page'] . '-';
        if (!$cache->load()) {
            $listWithPaging = getEntryListWithPagingByTag($blogid, $tag, $suri['page'], $blog['entriesOnList']);
            if (!array_key_exists('total', $listWithPaging[1])) {
                $listWithPaging[1]['total'] = 0;
            }
            $list = array('title' => $suri['value'], 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']);
            $paging = $listWithPaging[1];
        } else {
            $paging = $cache->dbContents;
            $listCache = $cache;
            //preserve for ordering
        }
    }
    if ($skinSetting['showListOnTag'] != 2) {
        list($entries, $paging) = getEntriesWithPagingByTag($blogid, $tag, $suri['page'], $blog['entriesOnList'], $skinSetting['showListOnTag'] == 3 ? $blog['entriesOnPage'] : $blog['entriesOnList']);
        if ($skinSetting['showListOnTag'] == 1) {
            $skinSetting['showListWithTotalEntries'] = true;
Example #3
0
    $newEntryList = '<a href="' . $context->getProperty('uri.blog') . '/owner/entry/?tagId=' . $newTagId . '">' . _f('"%1" 태그를 갖는 모든 글의 목록을 봅니다', $_POST['newName']) . '</a>';
    $result = array('error' => 0, 'tagId' => $newTagId, 'entryList' => $newEntryList, 'tagList' => $newTagList);
    Respond::PrintResult($result);
    exit;
}
if (!empty($_POST['id']) && !empty($_POST['category'])) {
    $entries = array();
    foreach (getEntriesByTagId($blogid, $_POST['id']) as $entry) {
        $entries[] = $entry['id'];
    }
    changeCategoryOfEntries($blogid, implode(',', $entries), $_POST['category']);
}
$tags = getSiteTags($blogid);
if (isset($suri['value']) && !empty($suri['value'])) {
    $tag = $suri['value'];
    $list = getEntryListWithPagingByTag($blogid, $tag, $suri['page'], 20);
} else {
    $list = null;
}
function getTagListTemplate($tags)
{
    $view = '';
    foreach ($tags as $t) {
        $view .= '<span id="tag' . $t['id'] . '" class="tag"><a href="#" class="tag" onclick="updateTagPanel(' . $t['id'] . ');return false;">' . $t['name'] . '</a></span> ';
    }
    return $view;
}
require ROOT . '/interface/common/owner/header.php';
?>
						<script type="text/javascript">
							//<![CDATA[