超酷风格:年轻一族 年轻时尚]发布 For Disuz5.0风格名称:年轻一族 
适合:时尚类、个性类网站 
适应版本:Disuz5.0 
由韩国试听网风格改编 
演示:http://www.cnnup.cn/ 
下载地址:http://www.cnnup.cn/thread-422-1-1.html 
(或者到3楼下载) 
  
1.上传文件到相应目录 
2.导入配置文件 
3.打开index.php文件 
找到 
- $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
 
  复制代码 
在下面添加: 
- $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
 
 - //新贴//
 
 - $hack_cut_str =26; //修改标题显示字数
 
 - $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, 8");
 
 - while($nthread = $db->fetch_array($query)) {
 
 -         $nthread['forumname'] = $nthread['name'];
 
 -         $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
 
 -    $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
 
 -         $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
 
 -         $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
 
 -         if($nthread['highlight']) {
 
 -                 $string = sprintf('%02d', $nthread['highlight']);
 
 -                 $stylestr = sprintf('%03b', $string[0]);
 
  
-                 $nthread['highlight'] = 'style="';
 
 -                 $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
 
 -                 $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
 
 -                 $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
 
 -                 $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
 
 -                 $nthread['highlight'] .= '"';
 
 -         } else {
 
 -                 $nthread['highlight'] = '';
 
 -         }
 
 -         $new_post_threadlist[] = $nthread;
 
 - }
 
 - //新贴//
 
 
  复制代码 
 
 
  
 
[ 本帖最后由 若谷 于 2007-3-8 11:04 编辑 ] |