原帖由 doctor 於 2006-2-8 01:43 發表。
cache到的'typeid' 是数字 能显示出它对应的中文就ok了
主题分类在另一个表里呢
对于你们高手 实现应该容易哦
1. include/cache.func.php 加入紅字
case newtopic:
$table = 'threads t, cdb_forums f';
$cols = "t.tid, t.typeid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name, tt.name AS idname";
$fids="1,2,3";//自定義
$conditions = "LEFT JOIN {$tablepre}threadtypes tt ON tt.typeid=t.typeid WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid IN ($fids) ORDER BY t.dateline DESC LIMIT 0, 11";
break;
case newreply:
$table = 'threads t, cdb_forums f';
$cols = "t.tid, t.typeid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name, tt.name AS idname";
$fids="1,2,3";//自定義
$conditions = "LEFT JOIN {$tablepre}threadtypes tt ON tt.typeid=t.typeid WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid IN ($fids) AND t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 11";
break;
{if $nthread['idname']}[{$nthread['idname']}]{/if}$nthread[view_subject]</a><br>
{if $rthread['idname']}[{$rthread['idname']}]{/if}$rthread[view_subject]</a><br>