Beispiel #1
0
if ($gContent->isValid()) {
    $gContent->parseData();
    $title = $gContent->getField('title') . " Feed";
    $description = $gContent->getField('parsed_data');
}
$rss->title = $title;
$rss->description = $description;
$rss->link = $gContent->getDisplayUri();
// get all topics of a board or all recent topics in general
switch ($gContent->getField('content_type_guid')) {
    case 'bitcomment':
        // need to use post class to get list of comments
        $gComment = new BitBoardPost($_REQUEST['t']);
        // pass in a reference to the root object so that we can do proper permissions checks
        $gComment->mRootObj = $gContent;
        $feeds = $gComment->getComments($gContent->mContentId, $gBitSystem->getConfig('boards_rss_max_records', 10), 0, 'commentDate_desc', 'flat');
        break;
    case 'bitboard':
    default:
        $topic = new BitBoardTopic();
        $pParamHash = array();
        if (!empty($_REQUEST['b'])) {
            $pParamHash['b'] = $_REQUEST['b'];
        }
        $pParamHash['find'] = '';
        $pParamHash['sort_mode'] = "llc_last_modified_desc";
        $pParamHash['max_records'] = $gBitSystem->getConfig('boards_rss_max_records', 10);
        $pParamHash['offset'] = 0;
        $feeds = $topic->getList($pParamHash);
        break;
}