|
演示:
http://bbs.laxjyj.com/index.php?skinco=msn
完全适合4.3.0商业版。

除主题排行需要修改index.php文件外,其余文件请按压缩文件中的目录上传到论坛的相应位置中即可。
附:
index.php文件的修改内容,压缩文件已经包含此文件。
查找:
require_once PrintEot('index');footer();
在它前面插入:
$cachefile="./data/bbscache/indexhotpost.php";
$cachetime=300;//缓存修改时间单位秒
if (($timestamp-@filemtime($cachefile)>=$cachetime)){
$listnum=10;//显示个数
$listlength=54;//标题长度
$newthreads=$replythreads="";
$query = $db->query("SELECT tid,author,subject,postdate FROM pw_threads WHERE fid NOT IN(49,57,69) order by postdate desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[postdate]=date("Y-m-j g:i",$threads[postdate]);
$threads[subject]=substrs($threads[subject],$listlength);
$newthreads.="<a href='read.php?tid=$threads[tid]' TARGET=_blank title='作者:$threads[author] 发表:$threads[postdate]'>$threads[subject]</a><br />";
}
unset($threads);
$query = $db->query("SELECT tid,author,subject,postdate,replies,lastpost,lastposter FROM pw_threads WHERE fid NOT IN(49,57,69) and replies>0 order by lastpost desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[postdate]=date("Y-m-j g:i",$threads[postdate]);
$threads[lastpost]=date("Y-m-j g:i",$threads[lastpost]);
$threads[subject]=substrs($threads[subject],$listlength);
$replythreads.="<a href='read.php?tid=$threads[tid]' TARGET='_blank' title='作者:$threads[author]
发表:$threads[postdate]
跟贴:$threads[lastposter]
回复:$threads[lastpost]'>$threads[subject]</a><br>";
}
unset($threads);
@writeover($cachefile,"<?php\n\$newthreads=\"$newthreads\";\n\$replythreads=\"$replythreads\";\n?>");
}else{
@include($cachefile);
}
注:本风格和插件非本人原创!
|