zblogPHP 首页过滤指定分类文章并重建分页

大谋儿 知识探索 3248 0

//首页过滤指定分类文章并重建分页;
//挂接口:Add_Filter_Plugin('Filter_Plugin_ViewList_Core', 'zbpPlus_Exclude_Category');

function zbpPlus_Exclude_Category(&$type,&$page,&$category,&$author,&$datetime,&$tag,&$w,&$pagebar){
    global $zbp;
    if ($type == 'index' && $filter = '3|5|6') {
        //$w[]=array('<>','log_CateID',27);
        $w[] = array('NOT IN', 'log_CateID', explode('|',$filter));
        //以下是为了重建分页,过滤了分类,数量会发生变化
        $pagebar = new Pagebar($zbp->option['ZC_INDEX_REGEX'], true, true);
        $pagebar->PageCount = $zbp->displaycount;
        $pagebar->PageNow = $page;
        $pagebar->PageBarCount = $zbp->pagebarcount;
        //$pagebar->Count = null;
    }
}

正文结束

相关文章

以下是一个 PHP 函数,用于从字符串中提取所有磁力链接的哈希值:function get_magnet_links_hashes($str) {     $

php函数获取字符串中所有的磁力链接的哈希值

评论列表

暂时还没有人评论哦,来占个沙发吧?

发表评论