当前位置: 首页>>代码示例>>PHP>>正文


PHP NewsStory::getBigStory方法代码示例

本文整理汇总了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;
}
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:36,代码来源:news_bigstory.php


注:本文中的NewsStory::getBigStory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。