原帖由 Murphy008 于 2006-11-6 08:41 发表
首页四格(访客信息+论坛档案+最新主题+最新回复)+新手DIY方案 For Discuz! 5.0.0
这个版本原本限制字数的删除,现在不起作用了。看我首页字数没限制了 //--首页四格增加 Start--
$hack_subject_len=34; //标题最多显示的字数
$hack_subject_num=12; //最新主题与回复显示的数量
//最新主题
$query = $db->query("SELECT dateline,tid,subject,author,views,replies FROM {$tablepre}threads where displayorder!=-1 and displayorder!=-2 ORDER BY dateline DESC LIMIT 0, $hack_subject_num");
while($thread = $db->fetch_array($query)) {
$thread[subject0]=$thread[subject];
$thread['subject'] = cutstr($thread['subject'], $hack_subject_len);
$hack_newthreads_threadlist[] = $thread;
}
$threadview = $threadreply = array();
//最新回复
$query = $db->query("SELECT replies, tid, subject,author,views,lastposter FROM {$tablepre}threads where replies !=0 and displayorder!=-1 and displayorder!=-2 ORDER BY lastpost DESC LIMIT 0, $hack_subject_num");
while($thread = $db->fetch_array($query)) {
$thread[subject0]=$thread[subject];
$thread[subject] = cutstr($thread[subject], $hack_subject_len);
$threadreply[] = $thread;
}
//--首页四格增加 End--
大概没有删除吧。 |