function getBlogContentForCoverPage() { global $blogid, $blog, $service, $stats, $skinSetting; global $pd_category, $pd_categoryXhtml, $pd_archive, $pd_calendar, $pd_tags, $pd_notices, $pd_recentEntry; global $pd_recentComment, $pd_recentTrackback, $pd_link, $pd_authorList; $categories = getCategories($blogid); $totalPosts = getEntriesTotalCount($blogid); $pd_category = getCategoriesView($totalPosts, $categories, isset($category) ? $category : true); $pd_categoryXhtml = getCategoriesView($totalPosts, $categories, isset($category) ? $category : true, true); $pd_archive = getArchives($blogid); $pd_calendar = getCalendarView(getCalendar($blogid, true)); $pd_tags = getRandomTags($blogid); $pd_notices = getNotices($blogid); $pd_recentEntry = getRecentEntries($blogid); $pd_recentComment = getRecentComments($blogid); $pd_recentTrackback = getRecentTrackbacks($blogid); $pd_link = getLinks($blogid); $pd_authorList = User::getUserNamesOfBlog($blogid); }
<div id="pannels"> <!-- <h2><?php echo _t('카테고리'); ?> </h2> <?php echo getCategoriesView(getEntriesTotalCount($blogid), getCategories($blogid), true, true); ?> --> <h2><?php echo _text('최근에 달린 댓글'); ?> </h2> <?php $comments = getRecentComments($blogid); if (count($comments) > 0) { echo '<ul>'; } foreach ($comments as $comment) { ?> <li><a href="<?php echo $context->getProperty('uri.blog'); ?> /comment/<?php echo $comment['entry']; ?> "><?php echo htmlspecialchars($comment['comment']); ?> </a><br /><?php
<div class="panel-heading"> <h3>Trending Titles</h3> </div> <?php getTrendingTitles(); ?> </div> </div> <div class="row"> <div class="col-xs-6 col-md-4"> <div class="panel panel-primary"> <div class="panel-heading"> <h4>Recent Comments</h4> </div> <?php buildRecentComments(getRecentComments()); ?> </div> </div> </div> <div class="row"> <?php if (isset($_SESSION['loggedin'])) { ?> <div class="col-xs-6 col-md-4"> <div class="panel panel-primary"> <div class="panel-heading"> <h4>Your Favorites</h4> </div> <?php buildFavorites(getFavorites($_SESSION['username']));
$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); ?> ";
<aside class="col-md-4"> <div class="widget search"> <form action="index.php" method="GET" role="form"> <input name="cari" type="text" class="form-control search_box" autocomplete="off" placeholder="Search Here"> </form> </div><!--/.search--> <div class="widget categories"> <h3>Recent Comments</h3> <div class="row"> <div class="col-sm-12"> <?php $result = getRecentComments($con); while ($recent = mysqli_fetch_assoc($result)) { ?> <div class="single_comments" style="height:64px"> <img src="assets/images/blog/avatar3.png" alt="" /> <p><?php echo wordlimit($recent['comments'], 80); ?> </p> <div class="entry-meta small muted"> <span>By <a href="#"><?php echo $recent['nama']; ?> </a></span <span>On <a href="#"><?php echo wordlimit($recent['judul'], 25); ?> </a></span> </div> </div>
function getCommentFeedTotal($blogid, $rawMode = false, $mode = 'rss') { global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; $channel = initializeRSSchannel($blogid); $channel['title'] = $blog['title'] . ': ' . _text('최근 댓글 목록'); $result = getRecentComments($blogid, Setting::getBlogSettingGlobal('commentsOnRSS', 20), false, true); if (!$result) { $result = array(); } $channel['items'] = array(); foreach ($result as $row) { $commentURL = $defaultURL . "/" . $row['entry'] . "#comment"; $content = htmlspecialchars($row['comment']); $item = array('id' => $row['id'], 'title' => RSSMessage(UTF8::lessen($row['title'], 30) . ' : ' . _textf('%1님의 댓글', $row['name'])), 'link' => $commentURL . $row['id'], 'categories' => array(), 'description' => RSSMessage($content), 'author' => RSSMessage($row['name']), 'pubDate' => $row['written'], 'comments' => $commentURL, 'guid' => $commentURL . $row['id']); if ($row['secret']) { $item['title'] = $item['author'] = $item['description'] = _text('비밀 댓글입니다'); } array_push($channel['items'], $item); } if ($rawMode == true) { return $channel['items']; } $rss = array('channel' => $channel); if ($mode == 'rss') { return publishRSS($blogid, $rss); } else { if ($mode == 'atom') { return publishATOM($blogid, $rss); } } return false; }
$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; } } } }
function getDefaultCenterPanel($mapping) { $ctx = Model_Context::getInstance(); $blogid = $ctx->getProperty('blog.id'); ?> <div id="<?php echo $mapping['plugin']; ?> " class="section"> <h3 class="caption<?php echo isset($_REQUEST['edit']) ? ' visible' : ' invisible'; ?> "> <span><?php echo _t('알림판'); if (isset($_REQUEST['edit'])) { ?> <a id="<?php echo $mapping['plugin']; ?> widgetup" href="<?php echo $ctx->getProperty('uri.blog'); ?> /owner/center/dashboard?edit&pos=<?php echo $positionCounter; ?> &rel=-1&edit"><?php echo _t('위로'); ?> </a> <a id="<?php echo $mapping['plugin']; ?> widgetdown" href="<?php echo $ctx->getProperty('uri.blog'); ?> /owner/center/dashboard?edit&pos=<?php echo $positionCounter; ?> &rel=1&edit"><?php echo _t('아래로'); ?> </a> <?php } ?> </span> </h3> <?php if (isset($_REQUEST['edit'])) { ?> </div> <?php return true; } else { // Get default data $stats = Statistics::getStatistics($blogid); $latestEntryId = Setting::getBlogSettingGlobal('LatestEditedEntry_user' . getUserId(), 0); $comments = getRecentComments($blogid, 10); $guestbooks = getRecentGuestbook($blogid, 10); list($commentNotifies, $paging) = getCommentsNotifiedWithPagingForOwner($blogid, 0, null, null, null, 1, 10); $trackbacks = getRecentTrackbacks($blogid, 10); $recents = array(); // title, date, link, category foreach ($comments as $comment) { array_push($recents, array('title' => $comment['comment'], 'date' => $comment['written'], 'link' => $ctx->getProperty('uri.blog') . "/" . $comment['entry'] . "#comment" . $comment['id'], 'category' => 'comment')); } foreach ($commentNotifies as $comment) { array_push($recents, array('title' => $comment['comment'], 'date' => $comment['written'], 'link' => $ctx->getProperty('uri.blog') . "/owner/communication/notify", 'category' => 'commentNotify')); } foreach ($guestbooks as $guestbook) { array_push($recents, array('title' => $guestbook['comment'], 'date' => $guestbook['written'], 'link' => $ctx->getProperty('uri.blog') . "/guestbook/" . $guestbook['id'] . "#guestbook" . $guestbook['id'], 'category' => 'guestbook')); } foreach ($trackbacks as $trackback) { array_push($recents, array('title' => $trackback['subject'], 'date' => $trackback['written'], 'link' => $ctx->getProperty('uri.blog') . "/" . $trackback['entry'] . "#trackback" . $trackback['id'], 'category' => 'trackback')); } $sort_array = array(); foreach ($recents as $uniqid => $row) { // Sorting. foreach ($row as $key => $value) { if (!array_key_exists($key, $sort_array)) { $sort_array[$key] = array(); } $sort_array[$key][$uniqid] = $value; } } if (!empty($sort_array)) { array_multisort($sort_array['date'], SORT_DESC, $recents); } $recents = array_slice($recents, 0, 14); ?> <div id="shortcut-collection"> <h4 class="caption"><span><?php echo _t('바로가기'); ?> </span></h4> <ul> <li class="newPost"><a class="newPost" href="<?php echo $ctx->getProperty('uri.blog'); ?> /owner/entry/post"><span><?php echo _t('새 글 쓰기'); ?> </span></a></li> <?php if ($latestEntryId !== 0) { $latestEntry = getEntry($blogid, $latestEntryId); if (!is_null($latestEntry)) { ?> <li class="modifyPost"><a href="<?php echo $ctx->getProperty('uri.blog'); ?> /owner/entry/edit/<?php echo $latestEntry['id']; ?> "><?php echo _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10))); ?> </a></li> <?php } } if ($ctx->getProperty('service.reader') == true) { ?> <li class="rssReader"><a href="<?php echo $ctx->getProperty('uri.blog'); ?> /owner/network/reader"><?php echo _t('RSS로 등록한 이웃 글 보기'); ?> </a></li> <?php } if (Acl::check("group.administrators")) { ?> <li class="deleteCache"><a href="<?php echo $ctx->getProperty('uri.blog'); ?> /owner/center/dashboard/cleanup" onclick="cleanupCache();return false;"><?php echo _t('캐시 지우기'); ?> </a></li> <?php if (Acl::check("group.creators")) { ?> <li class="optimizeStorage"><a href="<?php echo $ctx->getProperty('uri.blog'); ?> /owner/data" onclick="optimizeData();return false;"><?php echo _t('저장소 최적화'); ?> </a></li> <?php } } ?> <li class="clear"></li> </ul> </div> <div id="total-information"> <h4 class="caption"><span><?php echo _t('요약'); ?> </span></h4> <table class="posts-line"> <caption><?php echo _t('글'); ?> </caption> <thead> <th>type</th> <th>sum</th> </thead> <tbody> <tr> <td class="type"><?php echo _t('글'); ?> </td> <td class="sum"><?php echo number_format(getEntriesTotalCount($blogid)); ?> </td> </tr> <tr> <td class="type"><?php echo _t('댓글'); ?> </td> <td class="sum"><?php echo number_format(getCommentCount($blogid)); ?> </td> </tr> <tr> <td class="type"><?php echo _t('방명록'); ?> </td> <td class="sum"><?php echo number_format(getGuestbookCount($blogid)); ?> </td> </tr> <tr> <td class="type"><?php echo _t('걸린 글'); ?> </td> <td class="sum"><?php echo number_format(getTrackbackCount($blogid)); ?> </td> </tr> </tbody> </table> <table class="visitors-line"> <caption><?php echo _t('방문자'); ?> </caption> <thead> <th>type</th> <th>sum</th> </thead> <tbody> <tr> <td class="type"><?php echo _t('오늘'); ?> </td> <td class="sum"><?php echo number_format($stats['today']); ?> </td> </tr> <tr> <td class="type"><?php echo _t('어제'); ?> </td> <td class="sum"><?php echo number_format($stats['yesterday']); ?> </td> </tr> <tr> <td class="type"><?php echo _t('7일 평균'); ?> </td> <td class="sum"><?php $weekly = Statistics::getWeeklyStatistics(); $weeklycount = 0; foreach ($weekly as $day) { $weeklycount += $day['visits']; } echo number_format($weeklycount / 7); unset($weekly); unset($weeklycount); ?> </td> </tr> <tr> <td class="type"><?php echo _t('총방문자'); ?> </td> <td class="sum"><?php echo number_format($stats['total']); ?> </td> </tr> </tbody> </table> </div> <div id="myBlogInfo"> <h4 class="caption"><span><a href="<?php echo $ctx->getProperty('uri.blog') . '/owner/communication/comment'; ?> "><?php echo _t('알림판'); ?> </a></span></h4> <table class="recent"> <caption>asdasd</caption> <thead> <tr> <th scope="col" class="date"><?php echo _t('날짜'); ?> </th> <th scope="col" class="category"><?php echo _t('종류'); ?> </th> <th scope="col"><?php echo _t('내용'); ?> </th> </tr> </thead> <tbody> <?php foreach ($recents as $item) { ?> <tr class="<?php echo $item['category']; ?> "> <td class="date"><?php echo Timestamp::format('%m/%d', $item['date']); ?> </td> <td class="category"> <?php switch ($item['category']) { case 'trackback': echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/trackback?status=received">' . _t('걸린글') . '</a>'; break; case 'comment': echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/comment?status=comment">' . _t('댓글') . '</a>'; break; case 'commentNotify': echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/notify">' . _t('알리미') . '</a>'; break; case 'guestbook': echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/comment?status=guestbook">' . _t('방명록') . '</a>'; break; } ?> </td> <td class="title"><a href="<?php echo $item['link']; ?> "><?php echo htmlspecialchars(Utils_Unicode::lessenAsEm($item['title'], 20)); ?> </a></td> </tr> <?php } ?> </tbody> </table> </div> <?php $noticeURL = TEXTCUBE_NOTICE_URL; $noticeURLRSS = $noticeURL . ($ctx->getProperty('blog.language') ? $ctx->getProperty('blog.language') : "ko") . "/rss"; $noticeEntries = array(); if (!is_null(Setting::getServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language')))) { $noticeEntries = unserialize(Setting::getServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language'))); } else { list($result, $feed, $xml) = getRemoteFeed($noticeURLRSS); if ($result == 0) { $xmls = new XMLStruct(); $xmls->setXPathBaseIndex(1); $noticeEntries = array(); if ($xmls->open($xml, $ctx->getProperty('service.encoding'))) { if ($xmls->getAttribute('/rss', 'version')) { for ($i = 1; $link = $xmls->getValue("/rss/channel/item[{$i}]/link"); $i++) { $item = array('permalink' => rawurldecode($link)); $item['title'] = $xmls->getValue("/rss/channel/item[{$i}]/title"); if ($xmls->getValue("/rss/channel/item[{$i}]/pubDate")) { $item['written'] = parseDate($xmls->getValue("/rss/channel/item[{$i}]/pubDate")); } else { if ($xmls->getValue("/rss/channel/item[{$i}]/dc:date")) { $item['written'] = parseDate($xmls->getValue("/rss/channel/item[{$i}]/dc:date")); } else { $item['written'] = 0; } } array_push($noticeEntries, $item); } } } Setting::setServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language'), serialize($noticeEntries)); } } ?> <div id="textcube-notice"> <h4 class="caption"><span><a href="<?php echo $noticeURL . ($ctx->getProperty('blog.language') ? $ctx->getProperty('blog.language') : "ko"); ?> "><?php echo _t('공지사항'); ?> </a></span></h4> <?php if (count($noticeEntries) > 0) { array_splice($noticeEntries, 3, count($noticeEntries) - 3); ?> <table> <tbody> <?php foreach ($noticeEntries as $item) { ?> <tr> <td class="date"><?php echo Timestamp::format2($item['written']); ?> </td> <td class="title"><a href="<?php echo $item['permalink']; ?> " onclick="return openLinkInNewWindow(this);" ><?php echo htmlspecialchars(Utils_Unicode::lessenAsEm($item['title'], 35)); ?> </a></td> </tr> <?php } ?> </tbody> </table> <?php } else { ?> <div id="fail-notice"> <?php echo _t('공지사항을 가져올 수 없습니다. 잠시 후 다시 시도해 주십시오.'); ?> </div> <?php } ?> </div> <?php } ?> </div> <?php }
} } if ($showmore) { ?> <a href="<?php the_permalink(); ?> ?gallery=show" class="catviewgallery">View Gallery</a> <?php } ?> </div> <?php $recentComment = getRecentComments(1, get_the_ID()); if (count($recentComment) > 0) { ?> <div class="reviewcorner"> <?php echo "<p><em class='em'>" . $recentComment[0]->comment_content . "</em></p><p class='textalignright'><strong>" . $recentComment[0]->comment_author . "</strong></p>"; ?> </div> <?php } ?> </div> <?php if ($adcount % 2) { ?>
if (preg_match("@\\[##_author_rep_##\\]@iU", $view)) { dress('author_rep', getAuthorListView(User::getUserNamesOfBlog($blogid), $skin->authorList), $view, false, true); } // Recent items if (preg_match("@\\[##_rctps_##\\]@iU", $view)) { dress('rctps', getRecentEntriesView(getRecentEntries($blogid), $skin->recentEntry, $skin->recentEntryItem), $view, false, true); } else { if (preg_match("@\\[##_rctps_rep_##\\]@iU", $view)) { dress('rctps_rep', getRecentEntriesView(getRecentEntries($blogid), null, $skin->recentEntryItem), $view, false, true); } } if (preg_match("@\\[##_rctrp_##\\]@iU", $view)) { dress('rctrp', getRecentCommentsView(getRecentComments($blogid), $skin->recentComment, $skin->recentCommentItem), $view, false, true); } else { if (preg_match("@\\[##_rctrp_rep_##\\]@iU", $view)) { dress('rctrp_rep', getRecentCommentsView(getRecentComments($blogid), null, $skin->recentCommentItem), $view, false, true); } } if (preg_match("@\\[##_rcttb_##\\]@iU", $view)) { dress('rcttb', getRecentTrackbacksView(getRecentTrackbacks($blogid), $skin->recentTrackback, $skin->recentTrackbackItem), $view, false, true); } else { if (preg_match("@\\[##_rcttb_rep_##\\]@iU", $view)) { dress('rcttb_rep', getRecentTrackbacksView(getRecentTrackbacks($blogid), null, $skin->recentTrackbackItem), $view, false, true); } } // ETC if (preg_match("@\\[##_link_rep_##\\]@iU", $view)) { dress('link_rep', getLinksView(getLinks($blogid), $skin->link_rep), $view, false, true); } if (preg_match("@\\[##_link_list_##\\]@iU", $view)) { dress('link_list', getLinkListView(getLinks($blogid)), $view, false, true);
<ul class="commentlistul"> <?php $comments = getRecentComments(6); if (is_array($comments)) { foreach ($comments as $comment) { ?> <li> <p class="speech"> “<?php echo wp_trim_excerpt($comment->comment_content); ?> ” <br /> <br /> <a href="/profile/<?php echo $comment->user_id; ?> /<?php echo $comment->comment_author; ?> "><?php echo $comment->comment_author; ?> </a> on <a href="<?php echo $comment->guid; ?> "><strong><?php echo $comment->post_title; ?> </strong></a> <a href="<?php