原帖由 北理 于 2007-1-4 13:51 发表
怎么能让私密论坛的主题不出现在最新话题和最新回复里啊??
自己搞定了
参考其他调用的方法稍微修改一下
将一楼里的
新帖
$query = $db->query("SELECT dateline,tid,subject,author,views,replies FROM {$tablepre}threads ORDER BY dateline DESC LIMIT 0, $hack_subject_num");
改为
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid ORDER BY t.dateline DESC LIMIT 0, $hack_subject_num");
新回复
$query = $db->query("SELECT replies, tid, subject,author,views,lastposter FROM {$tablepre}threads where replies !=0 ORDER BY lastpost DESC LIMIT 0, $hack_subject_num");
改为
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, $hack_subject_num");
再在修改的两处AND f.fid=t.fid后加上and f.fid!=''(引号里是隐藏帖子所在论坛的fid号,例如:and f.fid!='3')更新缓存就行了. |