以前版本
信息:
http://www.phpwind.net/read-htm-tid-551540.html 2008.1.10更新说明:
1、
解决小分辨率换行
问题;
2、
一、本调用特点:
1、全自适应:不管客户端的屏幕分辨率是多少,都能完美整体显示,flash幻灯片也实现了自适应显示;
2、版块显示:实现了不显示“隐藏”、“认证”等版块功能;
3、根据官方home代码,改进了flash调用图片代码,效率更高;
4、更多的使用了“div+css”代码,提高代码执行效率;
二、演示图片如下,由于我的
论坛在内部局域网,不方便给大家演示,因此我将选择最新安装成功的论坛地址作为演示地址,希望大家赶快试用哦;非本站演示地址:
三、安装方法:
1、找到“template”目录里的相应
风格目录,打开index,htm,找到1-2行代码
复制代码- <!--<?php print <<<EOT
- -->
|
替换为:
复制代码- <!--<?php
- //幻灯图开始
- $config['time']=10;//10天内的图片主题
- $sql = $config['time']>0 ? " AND t.postdate>".($timestamp-86400*$config['time']) : '';
- $query = $db->query("SELECT t.tid,t.subject,tm.aid FROM pw_threads t LEFT JOIN $pw_tmsgs tm ON t.tid=tm.tid LEFT JOIN pw_forums f ON t.fid=f.fid WHERE 1 $sql and t.ifupload='1' AND tm.aid!='' AND f.f_type<>'hidden' ORDER BY t.postdate desc LIMIT 5");
- while($rt = $db->fetch_array($query)){
- $aid = unserialize($rt['aid']);
- foreach($aid as $key=>$value){
- if($value['type']=='img'){
- $value['attachurl'] = geturl($value['attachurl'],'lf');
- $pics .= $extra.$value['attachurl'][0];
- $links .= $extra."read.php?tid=$rt[tid]";
- $texts .= $extra.$rt['subject'];
- $extra = '|';break;
- }
- }
- }
- //幻灯图结束
- //排行开始
- $thselect="pt.tid,pt.fid,pt.author,pt.subject,pt.postdate,pt.replies,pt.lastpost,pt.lastposter,pt.hits,pt.digest,pt.dig,pt.ifmark FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pf.f_type <> 'hidden'";
- $listnum=10;//显示个数
- $listlength=40;//标题长度
- $cachelist=R_P."data/bbscache/index_toplist123.php";//主题排行缓存文件
- $cachelisttime=20;//主题排行缓存时间
- //会员排行开始
- if(($timestamp-@filemtime($cachelist)>=$cachelisttime)){
- $timelv=$hotmember=$monmember=$newthreads=$digestthreads=$hitsthreads=$digthreads=$replythreads=$ifmarkthreads="";
- $query = $db->query("SELECT m.uid,m.username,md.onlinetime FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.onlinetime order by md.onlinetime desc limit 0,$listnum");
- while($members=$db->fetch_array($query)){
- $members[onlinetime]=(int)($members[onlinetime]/3600);
- $i=0;
- while((5*$i*$i+15*$i)<=$members[onlinetime])
- {$i++;
- $C=5*$i*$i+15*$i;
- $N=$i;
- }
- $more= $C-$members[onlinetime];
- $lv= $N;
- $timelv.="<div class=divindex><div class=fr style='margin-top:3px'><img src='$imgpath/lv/{$lv}.gif' alt='在线等级:{$lv} 级\n在线时长:{$members[onlinetime]} 小时\n升级剩余时间:{$more} 小时'></div><a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a></div>";
- }
- unset($members);
- $query=$db->query("SELECT m.uid,m.username,md.todaypost FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>'$tdtime' ORDER BY md.todaypost DESC limit 0,$listnum");
- while($members=$db->fetch_array($query)){
- $hotmember.="<div class=divindex><div class=fr>[$members[todaypost]]</div><a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a></div>";
- }
- unset($members);
- $query=$db->query("SELECT m.uid,m.username,md.monthpost FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>'$montime' ORDER BY md.monthpost DESC limit 0,$listnum");
- while($members=$db->fetch_array($query)){
- $monmember.="<div class=divindex><div class=fr>[$members[monthpost]]</div><a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a></div>";
- }
- unset($members);
- //会员排行结束
- @include_once(D_P.'data/bbscache/forum_cache.php');
- $query = $db->query("SELECT ".$thselect." order by pt.postdate desc limit 0,$listnum");
- while($threads=$db->fetch_array($query)){
- $threads[forum]=substrs($forum[$threads['fid']]['name']);
- $threads[lastpost]=get_date($threads[lastpost]);
- $threads[subjects]=substrs($threads[subject]);
- $threads[subject]=substrs($threads[subject],$listlength);
- $newthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标 题:$threads[subjects]\n作 者:$threads[author]\n回 复:$threads[replies]\n点 击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
- }
- unset($threads);
- $query = $db->query("SELECT ".$thselect." and pt.digest > 0 order by pt.postdate desc limit 0,$listnum");
- while($threads=$db->fetch_array($query)){
- $threads[forum]=substrs($forum[$threads['fid']]['name']);
- $threads[lastpost]=get_date($threads[lastpost]);
- $threads[subjects]=substrs($threads[subject]);
- $threads[subject]=substrs($threads[subject],$listlength);
- $digestthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标 题:$threads[subjects]\n作 者:$threads[author]\n回 复:$threads[replies]\n点 击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
- }
- unset($threads);
- $query = $db->query("SELECT ".$thselect." and pt.hits > 200 and pt.replies > 10 order by pt.lastpost desc limit 0,$listnum");
- while($threads=$db->fetch_array($query)){
- $threads[forum]=substrs($forum[$threads['fid']]['name']);
- $threads[lastpost]=get_date($threads[lastpost]);
- $threads[subjects]=substrs($threads[subject]);
- $threads[subject]=substrs($threads[subject],$listlength);
- $hitsthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标 题:$threads[subjects]\n作 者:$threads[author]\n回 复:$threads[replies]\n点 击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
- }
- unset($threads);
- $query = $db->query("SELECT ".$thselect." and pt.dig > 0 order by pt.postdate desc limit 0,$listnum");
- while($threads=$db->fetch_array($query)){
- $threads[forum]=substrs($forum[$threads['fid']]['name']);
- $threads[lastpost]=get_date($threads[lastpost]);
- $threads[subjects]=substrs($threads[subject]);
- $threads[subject]=substrs($threads[subject],$listlength);
- $digthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标 题:$threads[subjects]\n作 者:$threads[author]\n回 复:$threads[replies]\n点 击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
- }
- unset($threads);
- $query = $db->query("SELECT ".$thselect." and pt.replies > 0 order by pt.lastpost desc limit 0,$listnum");
- while($threads=$db->fetch_array($query)){
- $threads[forum]=substrs($forum[$threads['fid']]['name']);
- $threads[lastpost]=get_date($threads[lastpost]);
- $threads[subjects]=substrs($threads[subject]);
- $threads[subject]=substrs($threads[subject],$listlength);
- $replythreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标 题:$threads[subjects]\n作 者:$threads[author]\n回 复:$threads[replies]\n点 击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
- }
- unset($threads);
- $query = $db->query("SELECT ".$thselect." and pt.ifmark > 0 order by pt.postdate desc limit 0,$listnum");
- while($threads=$db->fetch_array($query)){
- $threads[forum]=substrs($forum[$threads['fid']]['name']);
- $threads[lastpost]=get_date($threads[lastpost]);
- $threads[subjects]=substrs($threads[subject]);
- $threads[subject]=substrs($threads[subject],$listlength);
- $ifmarkthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标 题:$threads[subjects]\n作 者:$threads[author]\n回 复:$threads[replies]\n点 击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
- }
- unset($threads);
- @writeover($cachelist,"<?php\n\$hitsthreads=\"$hitsthreads\";\n\$ifmarkthreads=\"$ifmarkthreads\";\n\$monmember=\"$monmember\";\n\$hotmember=\"$hotmember\";\n\$timelv=\"$timelv\";\n\$newthreads=\"$newthreads\";\n\$digestthreads=\"$digestthreads\";\n\$replythreads=\"$replythreads\";\n\$digthreads=\"$digthreads\";\n?>");
- }
- @require_once($cachelist);
- print <<<EOT
- -->
|
2、找到以下代码
复制代码- <!--
- EOT;
- }foreach($catedb as $k=>$cate){
- if($forumdb[$cate[fid]]){
- if($cate[across]){print <<<EOT
- -->
|
在其上面添加以下代码:
复制代码- <!--
- EOT;
- }print <<<EOT
- -->
- <!--css-->
- <style type="text/css">
- .li1{FONT-WEIGHT: bold; FONT-SIZE: 12px;text-align:center;background: url('$imgpath/hot/54_Label_1a_1.gif');height:24px}
- .li11{text-align:center;background: url('$imgpath/hot/54_Label_1b_1.gif');height:24px}
- #listnb{margin:0;padding:0;float:left;height:240px;}
- #tpbg{margin:0;padding:0;height:24px;line-height:24px;background-image: url('$imgpath/hot/ttbg.gif');text-align:center;}
- #ctbg{margin:0;padding:0;height:240;background-image: url('$imgpath/hot/listbg.gif');line-height:24px;overflow:hidden;}
- .divindex{overflow:hidden;height:24px}
- </style>
- <!--css-->
- <div class="t">
- <script language="JavaScript" src="js/tx1.js"></script>
- <table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
- <tr>
- <td width="28%" id="tpbg">====最新图片====</td>
- <td class="li1" id="lin1" onmouseover="ShowA('1')" title="最新发表的主题-以发贴时间为准">最新主题</td>
- <td class="li11" id="lin2" onmouseover="ShowA('2')" title="最新回复的主题-以回复时间为准">最新回复</td>
- <td class="li11" id="lin3" onmouseover="ShowA('3')" title="最新精华主题-精华帖子">精华推荐</td>
- <td class="li11" id="lin4" onmouseover="ShowA('4')" title="最新评分主题-评分帖子">评分推荐</td>
- <td class="li11" id="lin5" onmouseover="ShowA('5')" title="会员推荐主题-会员通过帖子里的推荐功能推荐的帖子,目前设置为1">会员推荐</td>
- <td class="li11" id="lin6" onmouseover="ShowA('6')" title="近期热点主题-回复10以上,点击200以上的帖子">近期热点</td>
- <td class="li1" id="linn1" onmouseover="Showb('1')" title="本日会员发贴排行">本日排行</td>
- <td class="li11" id="linn2" onmouseover="Showb('2')" title="本月会员发贴排行">本月排行</td>
- <td class="li11" id="linn3" onmouseover="Showb('3')" title="会员在线时间排行">在线排行</td>
- </tr>
- <tbody>
- <tr>
- <td width="28%">
- <script language="javascript">
- var swf_width="100%"
- var swf_height=240
- var config='5|0xFFFFFF|0x0099ff|50|0xffffff|0x0099ff|0x000000'
- // config 设置分别为: 自动播放时间(秒)|文字颜色|文字背景色|文字背景透明度|按键数字色|当前按键色|普通按键色
- var files='$pics'
- var links='$links'
- var texts='$texts'
- document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[url]http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6[/url],0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
- document.write('<param name="movie" value="{$imgpath}/focus.swf" />');
- document.write('<param name="quality" value="high" />');
- document.write('<param name="menu" value="false" />');
- document.write('<param name=wmode value="opaque" />');
- document.write('<param name="FlashVars" value="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" />');
- document.write('<embed src="{$imgpath}/focus.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="[url]http://www.macromedia.com/go/getflashplayer"[/url] />');
- document.write('</object>');
- </script>
- </td>
- <td colspan="6" width="48%">
- <div id="ctbg">
- <img src="$imgpath/hot/bbs_inbg43.gif" style="float:left">
- <div id="A1">$newthreads</div>
- <div id="A2" style="DISPLAY: none">$replythreads</div>
- <div id="A3" style="DISPLAY: none">$digestthreads</div>
- <div id="A4" style="DISPLAY: none">$ifmarkthreads</div>
- <div id="A5" style="DISPLAY: none">$digthreads</div>
- <div id="A6" style="DISPLAY: none">$hitsthreads</div>
- </div>
- </td>
- <td colspan="3" width="24%">
- <div id="ctbg">
- <img src="$imgpath/hot/bbs_inbg43.gif" style="float:left">
- <div id="b1">$hotmember</div>
- <div id="b2" style="DISPLAY: none">$monmember</div>
- <div id="b3" style="DISPLAY: none">$timelv</div>
- </div>
- </td>
-
- </tr>
- </tbody>
- </table>
- </div>
|
3、将附件里解压的文件夹覆盖到论坛根目录,就安装完毕,进入你
修改的风格,查看效果吧;注意你的图片目录可能是images目录也可能是image目录,如果不能显示图片的话,请换到另外一个目录试试;
特别说明:根据目前
6.0风格特点,template文件夹只有默认的“wind”风格,如果你只想在某个特定那个风格里使用本帖的调用,你可以在template文件建一个以该风格命名的文件夹如“blue”,然后把wind风格目录里的index.htm文件复制到这个目录里,然后修改即可;
4、欢迎使用本
插件,有什么问题可以及时反馈;
5、请有分的给加个分,没分的给捧个场,吧帖子顶起来,谢谢大家
[ 此贴被czjlcl123在2008-01-10 18:38重新编辑 ]