function CT_RecentRP_Default($target) { $context = Model_Context::getInstance(); $target .= '<ol>' . CRLF; $target .= RecentRP_getRecentCommentsView(RecentRP_getRecentComments($context->getProperty('blog.id')), ' <li><span class="date" style="display: block; font-family: Verdana, 돋움, Dotum, Tahoma, \'Lucida Grande\', sans-serif; font-size: 0.9em;">[##_rctrp_rep_time_##]</span> <a href="[##_rctrp_rep_link_##]">[##_rctrp_rep_desc_##]</a> <span class="name" style="color: #ABABAB;">[##_rctrp_rep_name_##]</span></li>' . CRLF); $target .= ' </ol>' . CRLF; return revertTempTags($target); }
$skin = new Skin($context->getProperty('skin.skin')); printHtmlHeader(); ?> <script type="text/javascript"> //<![CDATA[ alert("<?php echo _text('댓글이 등록되었습니다.'); ?> "); <?php notifyComment(); $entry = array(); $entry['id'] = $comment['entry']; $entry['slogan'] = getSloganById($blogid, $entry['id']); $tempComments = revertTempTags(removeAllTags(getCommentView($entry, $skin))); $tempRecentComments = revertTempTags(getRecentCommentsView(getRecentComments($blogid), null, $skin->recentCommentItem)); ?> if (opener == null) { loader = parent; } else { loader = opener; } try { var obj = loader.document.getElementById("entry<?php echo $comment['entry']; ?> Comment"); obj.innerHTML = "<?php echo str_innerHTML($tempComments); ?> ";
$pool->setQualifier('visibility', 'equals', 3); $pool->setQualifier('acceptcomment', 'equals', 1); $row = $pool->getAll('*'); if (!empty($row)) { sendCommentPing($entryId, $context->getProperty('uri.default') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/{$row['slogan']}" : $entryId), is_null($user) ? $comment['name'] : $user['name'], is_null($user) ? $comment['homepage'] : $user['homepage']); } } importlib('model.blog.skin'); $skin = new Skin($context->getProperty('skin.skin')); if ($entryId > 0) { $commentBlock = getCommentView($entry, $skin); dress('article_rep_id', $entryId, $commentBlock); $commentBlock = escapeCData(revertTempTags(removeAllTags($commentBlock))); $recentCommentBlock = escapeCData(revertTempTags(getRecentCommentsView(getRecentComments($blogid), null, $skin->recentCommentItem))); $commentCount = getCommentCount($blogid, $entryId); $commentCount = $commentCount > 0 ? $commentCount : 0; list($tempTag, $commentView) = getCommentCountPart($commentCount, $skin); } else { $commentView = ''; $commentBlock = getCommentView($entry, $skin); dress('article_rep_id', $entryId, $commentBlock); $commentBlock = escapeCData(revertTempTags(removeAllTags($commentBlock))); $commentCount = 0; $recentCommentBlock = escapeCData(revertTempTags(getRecentCommentsView(getRecentComments($blogid), $skin->recentComment, $skin->recentCommentItem))); } Respond::PrintResult(array('error' => 0, 'commentView' => $commentView, 'commentCount' => $commentCount, 'commentBlock' => $commentBlock, 'recentCommentBlock' => $recentCommentBlock)); exit; } } } }
<?php /// Copyright (c) 2004-2016, 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'; importlib('model.blog.entry'); $context = Model_Context::getInstance(); $skin = new Skin($context->getProperty('skin.skin')); $entry = array(); $entry['id'] = $suri['id']; $entry['slogan'] = getSloganById($blogid, $entry['id']); $IV = array('POST' => array('page' => array('int', 1), 'listOnly' => array('int', 0, 1))); $result['error'] = 0; $result['commentBlock'] = revertTempTags(removeAllTags(getCommentView($entry, $skin, $_POST['listOnly'] ? false : true, $_POST['page'], 20, true))); Respond::PrintResult($result);
if (!empty($sidebarElements)) { foreach ($sidebarElements as $element) { $pluginData = $skin->sidebarStorage[$element]; $plugin = $pluginData['plugin']; include_once ROOT . "/plugins/{$plugin}/index.php"; $pluginURL = $context->getProperty('service.path') . "/plugins/{$plugin}"; // LEGACY SUPPORT $pluginPath = ROOT . "/plugins/{$plugin}"; // LEGACY SUPPORT $context->setProperty('plugin.uri', $context->getProperty('service.path') . "/plugins/{$plugin}"); $context->setProperty('plugin.path', ROOT . "/plugins/{$plugin}"); $context->setProperty('plugin.name', ROOT . $plugin); if (!empty($configMappings[$plugin]['config'])) { $configVal = getCurrentSetting($plugin); // LEGACY SUPPORT $context->setProperty('plugin.config', Setting::fetchConfigVal($configVal)); } else { $configVal = ''; $context->setProperty('plugin.config', array()); } dress($element, call_user_func($pluginData['handler'], $pluginData['parameters']), $view); } } // Coverpage dressing $coverpageElements = array_keys($skin->coverpageStorage); foreach ($coverpageElements as $element) { dress($element, $skin->coverpageStorage[$element], $view); } $view = revertTempTags(removeAllTags($view)); print $view; $gCacheStorage->save();
/// 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) // $keylog : $keylog (explanation for specific keyword) // $entries : Posts that contain specific keyword. $skin = new KeylogSkin($skinSetting['keylogSkin']); $out = str_replace("[##_SKIN_head_end_##]", '<script type="text/javascript">//<![CDATA' . CRLF . 'var servicePath = "' . $context->getProperty('service.path') . '"; var blogURL = "' . $context->getProperty('uri.blog') . '"; var adminSkin = "' . $context->getProperty('panel.skin', 'canon') . '";//]]></script><script type="text/javascript" src="' . $service['resourcepath'] . '/script/common3.min.js"></script><script type="text/javascript" src="' . $service['resourcepath'] . '/script/gallery.min.js"></script>' . $skin->skin, $skin->outter); $keylogView = $skin->keylog; $itemsView = ''; $contentContainer = array(); foreach ($entries as $item) { $itemView = $skin->keylogItem; dress('blog_rep_link', $context->getProperty('uri.blog') . "/{$item['id']}", $itemView); dress('blog_rep_title', htmlspecialchars($item['title']), $itemView); dress('blog_rep_regdate', Timestamp::format3($item['published']), $itemView); if ($item['comments'] > 0) { dress('blog_rep_rp_cnt', "({$item['comments']})", $itemView); } $itemsView .= $itemView; } dress('blog_rep', $itemsView, $keylogView); $contentContainer["keyword_{$keylog['id']}"] = getEntryContentView($blogid, $keylog['id'], $keylog['content'], $keylog['contentformatter'], array(), 'Keyword'); dress('blog_desc', setTempTag("keyword_{$keylog['id']}"), $keylogView); dress('blog_conform', htmlspecialchars($keylog['title']), $keylogView); dress('blog', $keylogView, $out); dress('blog_word', htmlspecialchars($keylog['title']), $out); dress('body_id', "tt-body-keylog", $out); $out = revertTempTags(removeAllTags($out)); fireEvent('OBStart'); print $out; fireEvent('OBEnd');
} } } if (count($entries) > 1 || count($entries) == 1 && empty($suri['value'])) { unset($totalTags); } if (count($entries) == 1) { // Adds trackback RDF $info = array(); $info['title'] = htmlspecialchars($entries[0]['title']); $info['permalink'] = $permalink; $info['trackbackURL'] = $context->getProperty('uri.default') . "/trackback/" . $entries[0]['id']; $entriesView .= getTrackbackRDFView($blogid, $info); } if (isset($cache)) { $cache->contents = revertTempTags(removeAllTags($entriesView)); if (isset($paging)) { $cache->dbContents = $paging; } $cache->update(); } } } $view = str_replace("[##_article_rep_##]", "<div class=\"hfeed\">[##_article_rep_##]</div>", $view); if (isset($isKeylog) && $isKeylog) { dressInsertBefore('list', $entriesView, $view); $isKeylog = false; } else { if (isset($cache->contents)) { dressInsertBefore('article_rep', $entriesView, $view); } else {
function pretty_dress($view) { global $blogid, $blog, $database, $service, $stats, $skinSetting; $context = Model_Context::getInstance(); // local static global $pd_category, $pd_categoryXhtml, $pd_archive, $pd_calendar, $pd_tags, $pd_notices, $pd_recentEntry; global $pd_recentComment, $pd_recentTrackback, $pd_link, $pd_authorList; if (isset($_REQUEST['safe'])) { // safe mode return '<div class="sidebar-element-safebox">…</div>'; } if (isset($_REQUEST['tag'])) { // safe mode return '<div class="sidebar-element-safebox"><p>' . nl2br(htmlspecialchars($view, ENT_QUOTES)) . '</p></div>'; } $writer = User::getBlogOwnerName($blogid); $pageTitle = _t('페이지 제목'); dress('page_title', htmlspecialchars($pageTitle), $view); dress('blogger', htmlspecialchars($writer), $view); dress('title', htmlspecialchars($context->getProperty('blog.title')), $view); dress('desc', htmlspecialchars($context->getProperty('blog.description')), $view); if ($context->getProperty('blog.logo') == null) { dress('image', $context->getProperty('service.path') . "/attach/{$blogid}/" . $context->getProperty('blog.logo'), $view); } else { dress('image', $context->getProperty('service.path') . "/resources/image/spacer.gif", $view); } dress('blog_link', $context->getProperty('uri.blog') . "/", $view); dress('keylog_link', $context->getProperty('uri.blog') . "/keylog", $view); dress('localog_link', $context->getProperty('uri.blog') . "/location", $view); dress('taglog_link', $context->getProperty('uri.blog') . "/tag", $view); dress('guestbook_link', $context->getProperty('uri.blog') . "/guestbook", $view); list($view, $searchView) = Skin::cutSkinTag($view, 'search'); dress('search_name', 'search', $searchView); dress('search_text', isset($search) ? htmlspecialchars($search) : '', $searchView); dress('search_onclick_submit', 'searchBlog()', $searchView); dress('search', '<form id="TTSearchForm" action="' . $context->getProperty('uri.blog') . '/search/" method="get" onsubmit="return searchBlog()">' . $searchView . '</form>', $view); dress('category', $pd_category, $view); dress('category_list', $pd_categoryXhtml, $view); dress('count_total', $stats['total'], $view); dress('count_today', $stats['today'], $view); dress('count_yesterday', $stats['yesterday'], $view); list($view, $archiveView) = Skin::cutSkinTag($view, 'archive_rep'); dress('archive_rep', getArchivesView($pd_archive, $archiveView), $view); dress('calendar', $pd_calendar, $view); list($view, $randomView) = Skin::cutSkinTag($view, 'random_tags'); dress('random_tags', getRandomTagsView($pd_tags, $randomView), $view); list($view, $recentNoticeItem) = Skin::cutSkinTag($view, 'rct_notice_rep'); list($view, $noticeView) = Skin::cutSkinTag($view, 'rct_notice'); $notices = $pd_notices; if (sizeof($notices) == 0) { $notices = array(array('title' => _t('공지 제목'), 'id' => -1)); } if (sizeof($notices) > 0) { $itemsView = ''; foreach ($notices as $notice) { $itemView = $recentNoticeItem; dress('notice_rep_title', htmlspecialchars(fireEvent('ViewNoticeTitle', Utils_Unicode::lessenAsEm($notice['title'], $skinSetting['recentNoticeLength']), $notice['id'])), $itemView); dress('notice_rep_link', $context->getProperty('uri.blog') . "/notice/{$notice['id']}", $itemView); $itemsView .= $itemView; } dress('rct_notice_rep', $itemsView, $noticeView); dress('rct_notice', $noticeView, $view); } list($view, $authorList) = Skin::cutSkinTag($view, 'author_rep'); dress('author_rep', getAuthorListView($pd_authorList, $authorList), $view); list($view, $recentEntry) = Skin::cutSkinTag($view, 'rctps_rep'); dress('rctps_rep', revertTempTags(getRecentEntriesView($pd_recentEntry, $recentEntry)), $view); list($view, $recentComments) = Skin::cutSkinTag($view, 'rctrp_rep'); dress('rctrp_rep', revertTempTags(getRecentCommentsView($pd_recentComment, $recentComments)), $view); list($view, $recentTrackback) = Skin::cutSkinTag($view, 'rcttb_rep'); dress('rcttb_rep', getRecentTrackbacksView($pd_recentTrackback, $recentTrackback), $view); list($view, $s_link_rep) = Skin::cutSkinTag($view, 'link_rep'); dress('link_rep', getLinksView($pd_link, $s_link_rep), $view); dress('rss_url', $context->getProperty('uri.blog') . "/rss", $view); dress('owner_url', $context->getProperty('uri.blog') . "/owner", $view); dress('textcube_name', TEXTCUBE_NAME, $view); dress('textcube_version', TEXTCUBE_VERSION, $view); $tagSearches = array('@<a @i', '@</a *>@i', '@ id *= *".*"@isU', '@ onkey(down|up|press) *="@i', '@ on(click|load|unload) *="@i', '@<input +@i', '@<script.*</script *>@siU', '@<form @siU', '@</form>@siU'); $tagReplaces = array('<span ', '</span>', '', ' onnothing="', ' onnothing="', '<input disabled="disabled" ', '', '<div ', '</div>'); $view = preg_replace($tagSearches, $tagReplaces, $view); return correctSidebarImage($view); }