示例#1
0
文件: index.php 项目: ragi79/Textcube
<?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('entry_archive_link', $context->getProperty('uri.blog') . "/archive/" . Timestamp::getDate($entry['published']), $entryView);
     if ($entry['acceptcomment'] || $entry['comments'] > 0) {
         dress('article_rep_rp_link', "loadComment({$entry['id']},1,false,false); return false", $entryView);
     } else {
         dress('article_rep_rp_link', "return false", $entryView);
     }
     dress('article_rep_rp_cnt_id', "commentCount{$entry['id']}", $entryView);
     list($tempTag, $commentView) = getCommentCountPart($entry['comments'], $skin);
     dress($tempTag, $commentView, $entryView);
     if ($entry['accepttrackback'] || $entry['trackbacks'] > 0) {
         dress('article_rep_tb_link', "toggleLayer('entry{$entry['id']}Trackback'); return false", $entryView);
     } else {
         dress('article_rep_tb_link', "return false", $entryView);
     }
     dress('article_rep_tb_cnt_id', "trackbackCount{$entry['id']}", $entryView);
     list($tempTag, $trackbackView) = getTrackbackCountPart($entry['trackbacks'], $skin);
     dress($tempTag, $trackbackView, $entryView);
     $entriesView .= $entryView;
 } else {
     // Protected entries
     $protectedEntryView = $skin->entryProtected;
     $author = User::getName($entry['userid']);
     dress('article_rep_author', fireEvent('ViewPostAuthor', $author, $entry['id']), $protectedEntryView);
     dress('article_rep_author_link', $blogURL . "/author/" . rawurlencode($author), $protectedEntryView);
     dress('article_rep_id', $entry['id'], $protectedEntryView);
     dress('article_rep_link', $permalink, $protectedEntryView);
     dress('article_rep_title', htmlspecialchars(fireEvent('ViewPostTitle', $entry['title'], $entry['id'])), $protectedEntryView);
     dress('article_rep_date', fireEvent('ViewPostDate', Timestamp::format5($entry['published'])), $protectedEntryView);
     dress('article_password', "entry{$entry['id']}password", $protectedEntryView);
     dress('article_dissolve', "reloadEntry({$entry['id']});", $protectedEntryView);
     if (isset($_POST['partial'])) {