コード例 #1
0
ファイル: index.php プロジェクト: Avantians/Textcube
                    $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;
            }
        }
    }
}
コード例 #2
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)
$IV = array('POST' => array('group' => array('int', 0, 'default' => 0), 'starred' => array(array('0', '1'), 'default' => '0'), 'keyword' => array('string', 'default' => '')));
require ROOT . '/library/preprocessor.php';
$result = array('error' => '0');
ob_start();
printFeedGroups($blogid, $_POST['group'], $_POST['starred'] == '1', $_POST['keyword'] == '' ? null : $_POST['keyword']);
$result['view'] = escapeCData(ob_get_contents());
ob_end_clean();
Respond::PrintResult($result);
コード例 #3
0
ファイル: index.php プロジェクト: Avantians/Textcube
<?php

/// 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)
$IV = array('POST' => array('group' => array('int', 0), 'feed' => array('int', 0, 'default' => 0), 'entry' => array('int', 0, 'default' => 0), 'unread' => array(array('0', '1')), 'starred' => array(array('0', '1')), 'keyword' => array('string', 'default' => '')));
require ROOT . '/library/preprocessor.php';
$result = array('error' => '0');
ob_start();
printFeedEntry($blogid, $_POST['group'], $_POST['feed'], $_POST['entry'], $_POST['unread'] == '1', $_POST['starred'] == '1', $_POST['keyword'] == '' ? null : $_POST['keyword']);
$result['view'] = escapeCData(ob_get_contents());
ob_end_clean();
$entry = getFeedEntry($blogid, $_POST['group'], $_POST['feed'], $_POST['entry'], $_POST['unread'] == '1', $_POST['starred'] == '1', $_POST['keyword'] == '' ? null : $_POST['keyword']);
$result['id'] = $entry['id'];
$result['blog'] = escapeCData($entry['blog_title']);
Respond::PrintResult($result);