Пример #1
0
<?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';
requireModel('blog.trash');
requireModel('blog.response.remote');
requireModel('blog.sidebar');
requireLibrary('blog.skin');
requireStrictRoute();
$blogid = getBlogId();
$entryId = trashTrackback($blogid, $suri['id']);
if ($entryId !== false) {
    $skin = new Skin($skinSetting['skin']);
    $trackbackCount = getTrackbackCount($blogid, $entryId);
    list($tempTag, $trackbackCountContent) = getTrackbackCountPart($trackbackCount, $skin);
    $recentTrackbackContent = getRecentTrackbacksView(getRecentTrackbacks($blogid), $skin->recentTrackback, $skin->recentTrackbackItem);
    $entry = array();
    $entry['id'] = $entryId;
    $entry['slogan'] = getSloganById($blogid, $entry['id']);
    $trackbackListContent = getTrackbacksView($entry, $skin, true);
}
if ($trackbackListContent === false) {
    Respond::PrintResult(array('error' => 1));
} else {
    Respond::PrintResult(array('error' => 0, 'trackbackList' => $trackbackListContent, 'trackbackCount' => $trackbackCountContent, 'recentTrackbacks' => $recentTrackbackContent));
}
Пример #2
0
     dress('page_rep_date', fireEvent('ViewPageDate', Timestamp::format5($entry['published']), $entry['published']), $entryView);
     dress('page_rep_date_modified', fireEvent('ViewPageDate', Timestamp::format5($entry['modified']), $entry['modified']), $entryView);
     dress('page_rep_title', htmlspecialchars(fireEvent('ViewPageTitle', $entry['title'], $entry['id'])), $entryView);
     dress('page_rep_link', $permalink, $entryView);
     // 사용자가 작성한 본문은 interface/common/blog/end.php의 removeAllTags() 다음에 처리하기 위한 조치.
     $contentContainer["page_{$entry['id']}"] = getEntryContentView($blogid, $entry['id'], $entry['content'], $entry['contentformatter'], getKeywordNames($blogid), 'Page');
     dress('page_rep_desc', setTempTag("page_{$entry['id']}"), $entryView);
     dress('page_rep_author', User::getName($entry['userid']), $entryView);
     dress('page_rep_author_link', $blogURL . "/author/" . rawurlencode(User::getName($entry['userid'])), $entryView);
     $entriesView .= $entryView;
 } else {
     if (doesHaveOwnership() || $entry['visibility'] >= 2 || isset($_COOKIE[$context->getProperty('service.cookie_prefix') . 'GUEST_PASSWORD']) && trim($_COOKIE[$context->getProperty('service.cookie_prefix') . 'GUEST_PASSWORD']) == trim($entry['password'])) {
         // This is post
         $entryView = $skin->entry;
         $entryView = '<a id="entry_' . $entry['id'] . '"></a>' . CRLF . $entryView;
         dress('tb', getTrackbacksView($entry, $skin, $entry['accepttrackback']), $entryView);
         if (!$context->getProperty('blog.showCommentBox', false) && $context->getProperty('blog.useAjaxComment', true) && !$context->getProperty('skin.expandComment', false)) {
             $commentBlockStyle = 'none';
         } else {
             if ($context->getProperty('skin.expandComment', false) || ($context->getProperty('suri.directive', '/') == '/' || $context->getProperty('suri.directive', '/') == '/entry') && $context->getProperty('suri.value', '') != '') {
                 $commentBlockStyle = 'block';
             } else {
                 $commentBlockStyle = 'none';
             }
         }
         dress('rp', "<div id=\"entry{$entry['id']}Comment\" style=\"display:{$commentBlockStyle}\">" . ($commentBlockStyle == 'none' ? '' : getCommentView($entry, $skin)) . "</div>", $entryView);
         $tagLabelView = $skin->tagLabel;
         $entryTags = getTags($entry['blogid'], $entry['id']);
         if (sizeof($entryTags) > 0) {
             $tags = array();
             $relTag = Setting::getBlogSettingGlobal('useMicroformat', 3) > 1 && (count($entries) == 1 || !empty($skin->hentryExisted));