コード例 #1
0
ファイル: index.php プロジェクト: Avantians/Textcube
function RecentRP_getRecentCommentsView($comments, $template)
{
    global $contentContainer;
    $context = Model_Context::getInstance();
    ob_start();
    foreach ($comments as $comment) {
        $view = "{$template}";
        Utils_Misc::dress('rctrp_rep_link', $context->getProperty('uri.blog') . "/{$comment['entry']}#comment{$comment['id']}", $view);
        $contentContainer["recent_comment_{$comment['id']}"] = htmlspecialchars(Utils_Unicode::lessenAsEm(strip_tags($comment['comment']), 30));
        Utils_Misc::dress('rctrp_rep_desc', setTempTag("recent_comment_{$comment['id']}"), $view);
        Utils_Misc::dress('rctrp_rep_desc', htmlspecialchars(Utils_Unicode::lessenAsEm(strip_tags($comment['comment']), 30)), $view);
        Utils_Misc::dress('rctrp_rep_time', fireEvent('ViewRecentCommentDate', Timestamp::format3($comment['written'])), $view);
        Utils_Misc::dress('rctrp_rep_name', htmlspecialchars(Utils_Unicode::lessenAsEm(strip_tags($comment['name']), 10)) . $comment['secret'] . $comment['replier'], $view);
        print $view;
    }
    $view = ob_get_contents();
    ob_end_clean();
    return $view;
}
コード例 #2
0
ファイル: keylog.php プロジェクト: Avantians/Textcube
/// 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;
コード例 #3
0
ファイル: commentList.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)
$commentListView = $skin->commentList;
$itemsView = '';
foreach ($commentList['items'] as $item) {
    $itemView = $skin->commentListItem;
    dress('rplist_rep_regdate', fireEvent('ViewCommentListDate', Timestamp::format3($item['written']), $item['written']), $itemView);
    dress('rplist_rep_link', $context->getProperty('uri.blog') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/" . URL::encode($item['slogan'], $service['useEncodedURL']) : $item['entry']) . "#comment{$item['id']}", $itemView);
    dress('rplist_rep_name', htmlspecialchars($item['name']), $itemView);
    dress('rplist_rep_body', htmlspecialchars(fireEvent('ViewCommentListTitle', Utils_Unicode::lessenAsEm($item['comment'], 70))), $itemView);
    $itemsView .= $itemView;
}
dress('rplist_rep', $itemsView, $commentListView);
dress('rplist_conform', htmlspecialchars(fireEvent('ViewCommentListHeadTitle', $commentList['title'])), $commentListView);
dress('rplist_count', count($commentList['items']), $commentListView);
dress('rplist', $commentListView, $view);
コード例 #4
0
function getTimestamp3($time)
{
    return Timestamp::format3($time);
}