本文整理汇总了PHP中NewsStory::getBigStory方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsStory::getBigStory方法的具体用法?PHP NewsStory::getBigStory怎么用?PHP NewsStory::getBigStory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsStory
的用法示例。
在下文中一共展示了NewsStory::getBigStory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: b_news_bigstory_show
function b_news_bigstory_show()
{
include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
include_once XOOPS_ROOT_PATH . "/modules/news/class/class.newsstory.php";
$myts =& MyTextSanitizer::getInstance();
$restricted = getmoduleoption('restrictindex');
$dateformat = getmoduleoption('dateformat');
$infotips = getmoduleoption('infotips');
$block = array();
$onestory = new NewsStory();
$stories = $onestory->getBigStory(1, 0, $restricted, 0, 1, true, 'counter');
if (count($stories) == 0) {
$block['message'] = _MB_NEWS_NOTYET;
} else {
foreach ($stories as $key => $story) {
$htmltitle = '';
if ($infotips > 0) {
$block['infotips'] = xoops_substr(strip_tags($story->hometext()), 0, $infotips);
$htmltitle = ' title="' . $block['infotips'] . '"';
}
$block['htmltitle'] = $htmltitle;
$block['message'] = _MB_NEWS_TMRSI;
$block['story_title'] = $story->title('Show');
$block['story_id'] = $story->storyid();
$block['story_date'] = formatTimestamp($story->published(), $dateformat);
$block['story_hits'] = $story->counter();
$block['story_rating'] = $story->rating();
$block['story_votes'] = $story->votes();
$block['story_author'] = $story->uname();
$block['story_text'] = $story->hometext();
$block['story_topic_title'] = $story->topic_title();
$block['story_topic_color'] = '#' . $myts->displayTarea($story->topic_color);
}
}
return $block;
}