ModuleBuilder::Comments PHP Method

Comments() public static method

导出最新留言模块数据
public static Comments ( ) : string
return string 模块内容
    public static function Comments()
    {
        global $zbp;
        $template = $zbp->template;
        $tags = array();
        $i = $zbp->modulesbyfilename['comments']->MaxLi;
        if ($i == 0) {
            $i = 10;
        }
        $tags['maxLi'] = $i;
        $comments = $zbp->GetCommentList('*', array(array('=', 'comm_IsChecking', 0)), array('comm_PostTime' => 'DESC'), $i, null);
        $tags['comments'] = $comments;
        $template->SetTagsAll($tags);
        $ret = $template->Output('module-comments');
        return $ret;
    }

Usage Example

Esempio n. 1
0
function BuildModule_comments()
{
    return ModuleBuilder::Comments();
}