- if($forum['styleid'] == 2){
- //精华文章 即显示的推荐文章
- $hack_cut_str = 25; //修改标题显示字数
- $hack_cut_strauthor = 9;
- $Db_hot_threadlist = array();
- $Dbthread = array();
- $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE digest>'0' AND t.fid='$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' ORDER BY t.dateline DESC LIMIT 0, 10");
- while($Dbthread = $db->fetch_array($query)) {
- $Dbthread['forumname'] = $Dbthread['name'];
- $Dbthread['view_subject'] = cutstr($Dbthread['subject'],$hack_cut_str);
- $Dbthread['view_lastposter'] = cutstr($Dbthread['lastposter'],$hack_cut_strauthor);
- $Dbthread['date']= gmdate("$dateformat $timeformat", $Dbthread['dateline'] + $timeoffset * 3600);
- $Dbthread['lastreplytime']= gmdate("$dateformat $timeformat", $Dbthread[lastpost] + ($timeoffset * 3600));
- $Db_hot_threadlist[] = $Dbthread;
- }
- //精华文章
- //热门文章 即显示的热门文章
- $hack_cut_str = 25; //修改标题显示字数
- $hack_cut_strauthor = 9;
- $Da_hot_threadlist = array();
- $Dathread = 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|%' ORDER BY t.views DESC LIMIT 0, 10");
- while($Dathread = $db->fetch_array($query)) {
- $Dathread['forumname'] = $Dathread['name'];
- $Dathread['view_subject'] = cutstr($Dathread['subject'],$hack_cut_str);
- $Dathread['view_lastposter'] = cutstr($Dathread['lastposter'],$hack_cut_strauthor);
- $Dathread['date']= gmdate("$dateformat $timeformat", $Dathread['dateline'] + $timeoffset * 3600);
- $Dathread['lastreplytime']= gmdate("$dateformat $timeformat", $Dathread[lastpost] + ($timeoffset * 3600));
- $Da_hot_threadlist[] = $Dathread;
- }
- //热门文章
- }
复制代码
加上.别漏了符号.加完后更新缓存.PS:在加之前最好把后台那个开启css缓存先关掉. |