<?php /// Copyright (c) 2004-2012, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) require ROOT . '/library/preprocessor.php'; $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
<?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);
<?php /// Copyright (c) 2004-2012, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) define('__TEXTCUBE_IPHONE__', true); require ROOT . '/library/preprocessor.php'; $context = Model_Context::getInstance(); requireView('iphoneView'); printMobileHTMLHeader(); printMobileHTMLMenu(); if (strlen($suri['value'])) { if (!isset($suri['id'])) { $tag = getTagId($blogid, $suri['value']); } else { $tag = $suri['id']; $suri['value'] = getTagById($blogid, $suri['id']); } $blog['entriesOnList'] = 8; $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]; print printMobileEntryListView($list['items'], 'tag_' . $suri['page'], getTagById($blogid, $suri['id']), $paging, $list['count']); print printMobileListNavigation($paging, 'tag/' . $suri['id']); } printMobileHTMLFooter();
/// Copyright (c) 2004-2012, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) define('NO_SESSION', true); define('__TEXTCUBE_CUSTOM_HEADER__', true); define('__TEXTCUBE_LOGIN__', true); require ROOT . '/library/preprocessor.php'; //requireModel("blog.entry"); requireModel("blog.tag"); requireStrictBlogURL(); $blogid = getBlogId(); $children = array(); $cache = pageCache::getInstance(); if (!empty($suri['id'])) { $tagId = $suri['id']; $tagTitle = getTagById($blogid, $tagId); } else { if (!empty($suri['value'])) { $tagId = getTagId($blogid, $suri['value']); $tagTitle = $suri['value']; } else { // If no tag is mentioned, redirect it to total atom. header("Location: {$hostURL}{$blogURL}/atom"); exit; } } $cache->reset('tagRSS-' . $tagId); if (!$cache->load()) { requireModel("blog.feed"); $result = getTagFeedByTagId(getBlogId(), $tagId, 'rss', $tagTitle); if ($result !== false) {
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]; ?> <ul class="posts" id="tag_<?php echo $suri['page']; ?> " title="<?php echo getTagById($blogid, $suri['id']); ?> " selected="false"> <?php $itemsView = '<li class="group">' . CRLF; $itemsView .= ' <span class="left">' . getTagById($blogid, $suri['id']) . ' (' . $list['count'] . ')</span>' . CRLF; $itemsView .= ' <span class="right">Page <span class="now_page">' . $paging['page'] . '</span> / ' . $paging['pages'] . '</span>' . CRLF; $itemsView .= '</li>' . CRLF; foreach ($list['items'] as $item) { $author = User::getName($item['userid']); if ($imageName = printIphoneAttachmentExtract(printIphoneEntryContent($blogid, $item['userid'], $item['id']))) { $imageSrc = printIphoneImageResizer($blogid, $imageName, 28); } else { $imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png'; } $itemsView .= '<li class="post_item">' . CRLF; $itemsView .= ' <span class="image"><img src="' . $imageSrc . '" width="28" height="28" /></span>' . CRLF; $itemsView .= ' <a href="' . $blogURL . '/entry/' . $item['id'] . '" class="link">' . CRLF; $itemsView .= ' <div class="post">' . CRLF; $itemsView .= ' <span class="title">' . fireEvent('ViewListTitle', htmlspecialchars($item['title'])) . '</span>' . CRLF; $itemsView .= ' <span class="description">' . Timestamp::format5($item['published']) . ', ' . 'Comments(' . ($item['comments'] > 0 ? $item['comments'] : 0) . ')' . '</span>' . CRLF;