define('__TEXTCUBE_CUSTOM_HEADER__', true); require ROOT . '/library/preprocessor.php'; importlib("model.blog.feed"); importlib("model.blog.entry"); requireStrictBlogURL(); $cache = pageCache::getInstance(); if (!empty($suri['id'])) { $cache->reset('commentATOM-' . $suri['id']); if (!$cache->load()) { $result = getCommentFeedByEntryId(getBlogId(), $suri['id'], false, 'atom'); if ($result !== false) { $cache->reset('commentATOM-' . $suri['id']); $cache->contents = $result; $cache->update(); } } } else { $cache->reset('commentATOM'); if (!$cache->load()) { $result = getCommentFeedTotal(getBlogId(), false, 'atom'); if ($result !== false) { $cache->reset('commentATOM'); $cache->contents = $result; $cache->update(); } } } header('Content-Type: application/atom+xml; charset=utf-8'); fireEvent('FeedOBStart'); echo fireEvent('ViewCommentATOM', $cache->contents); fireEvent('FeedOBEnd');
define('__TEXTCUBE_CUSTOM_HEADER__', true); require ROOT . '/library/preprocessor.php'; importlib("model.blog.feed"); importlib("model.blog.entry"); requireStrictBlogURL(); $cache = pageCache::getInstance(); if (!empty($suri['id'])) { $cache->reset('commentRSS-' . $suri['id']); if (!$cache->load()) { $result = getCommentFeedByEntryId(getBlogId(), $suri['id']); if ($result !== false) { $cache->reset('commentRSS-' . $suri['id']); $cache->contents = $result; $cache->update(); } } } else { $cache->reset('commentRSS'); if (!$cache->load()) { $result = getCommentFeedTotal(getBlogId()); if ($result !== false) { $cache->reset('commentRSS'); $cache->contents = $result; $cache->update(); } } } header('Content-Type: application/rss+xml; charset=utf-8'); fireEvent('FeedOBStart'); echo fireEvent('ViewCommentRSS', $cache->contents); fireEvent('FeedOBEnd');
function getResponseFeedTotal($blogid, $mode = 'rss') { global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; if (empty($blogid)) { $blogid = getBlogId(); } $channel = initializeRSSchannel($blogid); $channel['title'] = $blog['title'] . ': ' . _text('최근 댓글/트랙백 목록'); $recentComment = getCommentFeedTotal($blogid, true, $mode); $recentTrackback = getTrackbackFeedTotal($blogid, true, $mode); $merged = array_merge($recentComment, $recentTrackback); $channel['items'] = $merged; $rss = array('channel' => $channel); if ($mode == 'rss') { return publishRSS($blogid, $rss); } else { if ($mode == 'atom') { return publishATOM($blogid, $rss); } } return false; }
function getResponseFeedTotal($blogid, $mode = 'rss') { $context = Model_Context::getInstance(); if (empty($blogid)) { $blogid = getBlogId(); } $channel = initializeRSSchannel($blogid); $channel['title'] = $context->getProperty('blog.title') . ': ' . _text('최근 댓글/트랙백 목록'); $recentComment = getCommentFeedTotal($blogid, true, $mode); $recentTrackback = getTrackbackFeedTotal($blogid, true, $mode); $merged = array_merge($recentComment, $recentTrackback); $channel['items'] = $merged; $rss = array('channel' => $channel); if ($mode == 'rss') { return publishRSS($blogid, $rss); } else { if ($mode == 'atom') { return publishATOM($blogid, $rss); } } return false; }