隐藏版块
修改include/cache.func.php
将原来的
- //首页四格TOPLIST_CACHE版_黄金俱乐部完善,代码首
- case 'newthread':
- $table = 'threads t';
- $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
- $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' ORDER BY t.dateline DESC LIMIT 0, 10";
- break;
- case 'newreply':
- $table = 'threads t';
- $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
- $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.replies>0 and t.displayorder!='-1' ORDER BY t.lastpost DESC LIMIT 0, 10";
- break;
- case 'topdigest':
- $table = 'threads t';
- $cols = 't.tid, t.fid, t.author, t.subject, t.digest, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
- $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE digest>0 ORDER BY rand() LIMIT 0, 10";
- break;
-
- case 'topviews':
- $table = 'threads t';
- $view = rand(1,3)==1 ? 'views' : 'replies';
- $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
- $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' ORDER BY t.$view DESC LIMIT 0, 10";
- break;
- //首页四格TOPLIST_CACHE版, 黄金俱乐部完善 代码尾
复制代码
修改成
- //首页四格TOPLIST_CACHE版_黄金俱乐部完善,代码首
- case 'newthread':
- $table = 'threads t';
- $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight,
- f.name';
- $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' and f.fid!
- ='1' and f.fid!='2' ORDER BY t.dateline DESC LIMIT 0, 10";
- break;
- case 'newreply':
- $table = 'threads t';
- $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight,
- f.name';
- $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.replies>0 and
- t.displayorder!='-1' and f.fid!='1' and f.fid!='2' ORDER BY t.lastpost DESC LIMIT 0, 10";
- break;
- case 'topdigest':
- $table = 'threads t';
- $cols = 't.tid, t.fid, t.author, t.subject, t.digest, t.dateline, t.lastpost, t.lastposter, t.views, t.replies,
- t.highlight, f.name';
- $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE digest>0 and f.fid!='1' and
- f.fid!='2' ORDER BY rand() LIMIT 0, 10";
- break;
-
- case 'topviews':
- $table = 'threads t';
- $view = rand(1,3)==1 ? 'views' : 'replies';
- $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight,
- f.name';
- $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' and f.fid!
- ='1' and f.fid!='2' ORDER BY t.$view DESC LIMIT 0, 10";
- break;
- //首页四格TOPLIST_CACHE版, 黄金俱乐部完善 代码尾
复制代码
其中的1与2是需要隐藏的版块FID
[ 本帖最后由 icerainy 于 2007-3-29 03:01 编辑 ] |