原帖由 魔面浪子 于 2006-1-16 08:13 发表
如何让显示的帖子项目只有三个或五个,或自己想要的数目?您这样的设置,显示了太多项目。
恳请 ...
将下面这些代码里的“13”改成你想要的数字就可以显示多少个帖子。
- //新贴//
- $hack_cut_str =29; //修改标题显示字数
- $hack_cut_strauthor = 9;
- $new_post_threadlist = array();
- $nthread = array();
- $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, 13");
复制代码
- /新回覆
- $hack_cut_str = 29; //修改标题显示字数
- $hack_cut_strauthor = 9;
- $new_reply_threadlist = array();
- $rthread = array();
- $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, 13");
复制代码
- //热帖
- $hack_cut_str = 29; //修改标题显示字数
- $hack_cut_strauthor = 9;
- $new_hot_threadlist = array();
- $mthread = array();
- $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.views DESC LIMIT 0, 13");
复制代码
[ 本帖最后由 ok820 于 2006-1-16 12:10 编辑 ] |