级别: 一星会员
UID: 721784
精华:
0
发帖: 109
金钱: 240 两
威望: 20 点
PW积分: 15 点
技术分: 0 分
团队工龄: 0 月
在线时间: 92(时)
注册时间: 2006-05-10
最后登录: 2009-10-09
|
首页九格支持6月13日PW6.3正式版版本(好多人需要的首页九格)

 演示: http://www.s234.cn/修改方法: 查找index.htm 复制代码- <!--<?php print <<<EOT
- -->
| 修改为: 复制代码- <!--<?php
- //首页调用开始
- //默认只显示开放板块,不显示正规、隐藏、投票、认证板块
- //幻灯图开始
- $cachepics=R_P."data/bbscache/index_toppics.php";//幻灯图片缓存文件
- $cachepicstime=60;//幻灯图片缓存自动更新时间,单位秒
- //下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
- $showforum="(pf.f_type = 'forum' or pf.f_type = 'former')";
- if (($times*****p-@filemtime($cachepics)>=$cachepicstime)){
- $query=$db->query("SELECT pt.tid,pt.fid,pt.subject,pa.attachurl FROM pw_threads pt
- ,pw_attachs pa,pw_forums pf where pt.tid = pa.tid and pt.fid = pf.fid and pa.type='img' and pt.ifcheck='1' and ".$showforum." and pf.password = ''
- ORDER BY pt.postdate DESC
- LIMIT 60
- "); //可以根据需要调整,我这里是估算每个主题有10张图片的情况下。
- $imgcontent="<?php\n";
- $pics=$links=$texts="";
- $rs_i=0;
- while ($imginfo = $db->fetch_array($query) and $rs_i<6) {//只调用6个主题的图片,且图片格式为.jpg
- if(($rs_tid!=$imginfo[tid])&&(eregi("\.(jpg)$",$imginfo[attachurl]))){
- $pics.=$db_bbsurl."/".$attachpath."/".$imginfo[attachurl]."|";
- $links.=$db_bbsurl."/read.php?tid=".$imginfo[tid]."|";
- $texts.=$imginfo[subject]."|";
- $rs_i++;//同一主题的只要最后上传的那张图片
- }
- $rs_tid=$imginfo[tid];
- }
- $pics=substr($pics,0,-1);
- $links=substr($links,0,-1);
- $texts=substr($texts,0,-1);
- $pics='$pics="'.$pics.'";';
- $links='$links="'.$links.'";';
- $texts='$texts="'.$texts.'";';
- $imgcontent = $imgcontent.$pics."\n".$links."\n".$texts."\n?>";
- writeover($cachepics,$imgcontent);
- }
- @require_once($cachepics);
- //幻灯图结束
- //会员排行+主题排行开始
- $cachelist=R_P."data/bbscache/index_toplist.php";//主题排行缓存文件
- $cachelisttime=5;//主题排行自动更新时间,单位秒
- //下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
- $showforum="(pf.f_type = 'forum' or pf.f_type = 'former')";
- if(($times*****p-@filemtime($cachelist)>=$cachelisttime)){
- $listnum=10;//主题显示个数
- $listlength=44;//主题标题长度
- $listnum1=10;//会员在线时间排行显示个数
- $copyright="清水之家 [url]www.s234.cn[/url]";
- $memberonline=$memberposttoday=$newthreads=$digestthreads=$replythreads="";
- //会员在线时间排行开始
- $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 style='width:95%'><div style='width:65%;float:left'><a href='profile.php?action=show&uid=$members[uid]' title='在线等级:{$lv} 级\n在线时长:{$members[onlinetime]} 小时\n升级剩余时间:{$more} 小时'>$members[username]</a></div><div style='float:left;width:30%'><img src='$imgpath/lv/{$lv}.gif' style='margin-top:2px'></div></div>";
- }
- unset($members);
- unset($c_i);
- //会员在线时间排行结束
- //会员当日发帖排行开始
- $query=$db->query("SELECT m.uid,m.username,md.postnum,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");
- $c_i=1;//初始化图片序号
- while($members=$db->fetch_array($query)){
- $memberposttoday.="<div style='width:100%'><div style='float:left;width:69%'><a href='profile.php?action=show&uid=$members[uid]' title='总发贴量:$members[postnum]'>$members[username]</a></div><div style='float:left;width:31%'><font color=red>$members[todaypost]</font> 贴</div></div>";
- $c_i++;
- }
- unset($members);
- unset($c_i);
- //会员当日发帖排行结束
- //会员本月发帖排行开始
- $query=$db->query("SELECT m.uid,m.username,md.postnum,md.digests,md.rvrc,md.money,md.monthpost,md.onlinetime FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>'$montime' ORDER BY md.monthpost DESC limit 0,$listnum");
- $c_i=1;//初始化图片序号
- while($members=$db->fetch_array($query)){
- $members[onlinetime]=(int)($members[onlinetime]/3600);
- $i=0;
- while((1*$i*$i+15*$i)<=$members[onlinetime]){
- $i++;
- $C=1*$i*$i+15*$i;
- $N=$i;
- }
- $more=$C-$members[onlinetime];
- $lv=$N;
- if($lv > 48) $lv = 48;
- $memberpostmonth.="<div style='width:100%'><div style='float:left;width:69%'><a href='profile.php?action=show&uid=$members[uid]' title='发帖: $members[postnum] 帖\n精华: $members[digests] 帖\n威望: $members[rvrc] 点\n财富: $members[money] 贝壳\n在线等级: $lv 级\n在线时间: $members[onlinetime] 小时\n升级剩余: $more 小时'>$members[username]</a></div><div style='float:left;width:31%'><font color=red>$members[monthpost]</font> 贴</div></div>";
- $c_i++;
- }
- unset($members);
- unset($c_i);
- //会员本月发帖排行结束
- //最新发表主题开始
- $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.replies,pt.hits,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck='1' and ".$showforum." and pf.password = '' order by pt.postdate desc limit 0,$listnum");
- $c_i=1;//初始化图片序号
- while($threads=$db->fetch_array($query)){
- $threads[postdate]=get_date($threads[postdate]);
- $threads[lastpost]=get_date($threads[lastpost]);
- $subject=substrs($threads[subject],42);
- $newthreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='thread.php?fid=$threads[fid]' title='此文章发表在 $threads[name] 版块\n点击进入此版块'>[ $threads[name] ]</a> <a href='read.php?tid=$threads[tid]' title='主 题: $threads[subject]\n作 者: $threads[author]\n时 间: $threads[postdate]\n浏 览: $threads[hits] 次\n最新回复: $threads[lastposter]\n回复时间: $threads[lastpost]\n回复次数: $threads[replies] 次\n$copyright'>$subject</a></div><div style='float:right;width:22%;color:gray'><font color=gray>$threads[postdate]</font></div></div>";
- $c_i++;
- }
- unset($threads);
- unset($c_i);
- //最新发表主题结束
- //社区精华主题开始
- $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck='1' and pt.digest > 0 and ".$showforum." and pf.password = '' order by pt.postdate desc limit 0,$listnum");
- $c_i=1;//初始化图片序号
- while($threads=$db->fetch_array($query)){
- $threads[postdate]=get_date($threads[postdate]);
- $threads[lastpost]=get_date($threads[lastpost]);
- $subject=substrs($threads[subject],46);
- $digestthreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='thread.php?fid=$threads[fid]' title='此文章发表在 $threads[name] 版块\n点击进入此版块'>[ $threads[name] ]</a> <a href='read.php?tid=$threads[tid]' title='主题标题: $threads[subject]\n主题作者: $threads[author]\n发表时间: $threads[postdate]\n浏览次数: $threads[hits] 次\n最新回复: $threads[lastposter]\n回复时间: $threads[lastpost]\n回复次数: $threads[replies] 次\n$copyright'>$subject</a></div><div style='float:right;width:22%;color:gray'><font color=#999990>$threads[author]</font></div></div>";
- $c_i++;
- }
- unset($threads);
- unset($c_i);
- //社区精华主题结束
- //社区评分推荐开始
- $query = $db->query("SELECT tid,fid,author,subject,replies,lastpost,lastposter,hits,ifmark FROM pw_threads where ifmark>0 order by 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],41);
- $ifmarkthreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='thread.php?fid=$threads[fid]'>$threads[forum]</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><div style='float:right;width:22%;color:gray'>$threads[author]</div></div>\n";
- }
- unset($threads);
- unset($c_i);
- //社区评分推荐结束
- //最多点击主题开始
- $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck = '1' and ".$showforum." and pf.password = '' order by hits desc limit 0,$listnum");
- $c_i=1;//初始化图片序号
- while($threads=$db->fetch_array($query)){
- $threads[postdate]=get_date($threads[postdate]);
- $threads[lastpost]=get_date($threads[lastpost]);
- $subject=substrs($threads[subject],$listlength);
- $hotthreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='read.php?tid=$threads[tid]' title='主题标题: $threads[subject]\n主题作者: $threads[author]\n发表时间: $threads[postdate]\n浏览次数: $threads[hits] 次\n最新回复: $threads[lastposter]\n回复时间: $threads[lastpost]\n回复次数: $threads[replies] 次\n$copyright'>$subject</a></div><div style='float:right;width:22%;color:gray'><font color=gray>$threads[postdate]</font></div></div>";
- $c_i++;
- }
- unset($threads);
- unset($c_i);
- //最多点击主题结束
- //最新回复主题开始
- $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pf.name,pt.replies,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck = '1' and pt.replies > 0 and ".$showforum." and pf.password = '' order by lastpost desc limit 0,$listnum");
- $c_i=1;//初始化图片序号
- while($threads=$db->fetch_array($query)){
- $threads[postdate]=get_date($threads[postdate]);
- $threads[lastpost]=get_date($threads[lastpost]);
- $subject=substrs($threads[subject],42);
- $replythreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='thread.php?fid=$threads[fid]' title='此文章发表在 $threads[name] 版块\n点击进入此版块'>[ $threads[name] ]</a> <a href='read.php?tid=$threads[tid]' title='主题标题: $threads[subject]\n主题作者: $threads[author]\n发表时间: $threads[postdate]\n浏览次数: $threads[hits] 次\n最新回复: $threads[lastposter]\n回复时间: $threads[lastpost]\n回复次数: $threads[replies] 次\n$copyright'>$subject</a></div><div style='float:right;width:22%;color:gray'><font color=#999990>$threads[lastposter]</font></div></div>";
- $c_i++;
- }
- unset($threads);
- unset($c_i);
- //最新回复主题结束
- @writeover($cachelist,"<?php\n\$timelv=\"$timelv\";\n\$memberposttoday=\"$memberposttoday\";\n\$newthreads=\"$newthreads\";\n\$digestthreads=\"$digestthreads\";\n\$replythreads=\"$replythreads\";\n\$randtreads=\"$randtreads\";\n\$memberpostmonth=\"$memberpostmonth\";\n\$hotthreads=\"$hotthreads\";\n\$ifmarkthreads=\"$ifmarkthreads\";?>");
- }
- @require_once($cachelist);
- //会员排行+主题排行结束
- //首页调用结束
- print <<<EOT
- -->
|
查找: 复制代码- <div id="notice"><a>最近没有论坛公告</a></div>
- <!--
- EOT;
- }print <<<EOT
- -->
|
下面添加: 复制代码- <div style="margin-bottom:5px;">
- <table border=0 cellSpacing=0 cellPadding=0 width="100%"style="border-collapse: collapse; border:1px solid #AACCEE;border-right:none;">
- <tr >
- <!--css-->
- <style type="text/css">
- .active2_6{FONT-SIZE: 12px; BACKGROUND:#FFFFFF; CURSOR: hand; COLOR: #030e5f; TEXT-ALIGN: center;border-right:1px solid #AACCEE}
- .active1_6{FONT-SIZE: 12px;BACKGROUND-IMAGE: url('$imgpath/hot/54_Label_1b_1.gif'); background-repeat:repeat-x;CURSOR: hand; COLOR: #030e5f; TEXT-ALIGN: center;border-right:1px solid #AACCEE}
- .divindex {overflow: hidden;height: 24px;width: 100%;}
- .pdiv{margin-top: 3px}
- .indextd2{line-height:22px;border-top:0px none;width:100%; }
- .divfr{float: right; width:131px; text-align:left;}
- .divfl{float: left;}
- .dis{display:block;}
- .undis{display:none;}
- </style>
- <!--css-->
- <script language="JavaScript">
- function g(o){
- return document.getElementById(o);
- }
- function HoverLi(m,n,counter){
- for(var i=1;i<=counter;i++){
- g('tb_'+m+i).className='active1_6';
- g('tbc_'+m+i).className='undis';
- }
- g('tbc_'+m+n).className='dis';
- g('tb_'+m+n).className='active2_6';
- }
- </script>
- <td width="30%"><div style="background:#EAF2FA;border-bottom:1px solid #AACCEE;height:23px;" align="center"><div style="margin-top:4px"> 论 坛 最 新 上 传 图 片 </div></div></td>
- <td width="50%">
- <table border="0" cellSpacing=0 cellPadding=0 width="100%" style="border-left:1px solid #AACCEE;height:24px">
- <tbody>
- <tr>
- <td class=active2_6 id=tb_11 align="center" onmouseover="HoverLi(1,1,5);">最新主题</td>
- <td class=active1_6 id=tb_12 align="center" onmouseover="HoverLi(1,2,5);">最新回复</td>
- <td class=active1_6 id=tb_13 align="center" onmouseover="HoverLi(1,3,5);">精华推荐</td>
- <td class=active1_6 id=tb_14 align="center" onmouseover="HoverLi(1,4,5);">评分推荐</td>
- <td class=active1_6 id=tb_15 align="center" onmouseover="HoverLi(1,5,5);">热门主题</td>
- </tr>
- </tbody>
- </table>
- </td>
- <td width="20%">
- <table border="0" cellSpacing=0 cellPadding=0 width="100%" style="height:24px;">
- <tbody>
- <tr class=indextd>
- <td class=active2_6 id=tb_21 align="center" onmouseover="HoverLi(2,1,3);">今日发贴</td>
- <td class=active1_6 id=tb_22 align="center" onmouseover="HoverLi(2,2,3);">本月发贴</td>
- <td class=active1_6 id=tb_23 align="center" onmouseover="HoverLi(2,3,3);">在线排行</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td align=center style="border:1px solid #AACCEE;border-top:none;border-left:1px #AACCEE solid">
- <table border="0" cellSpacing=0 cellPadding=0 width="100%">
- <tbody>
- <tr><td>
- <script type="text/javascript">
- <!--
- var focus_width=288 //flash的宽度,可以根据需要调整
- var focus_height=200 //flash的高度,可以根据需要调整
- var text_height=30//flash文本的高度,可以根据需要调整
- var swf_height = focus_height+text_height
- var swf_height = focus_height+text_height
- var pics="$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="'+ focus_width +'" height="'+ swf_height +'">');
- document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="{$imgpath}/pic.swf"><param name="quality" value="high"><param name="bgcolor" value="#F4FBFF">');
- document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
- document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
- document.write('<embed src="{$imgpath}/pic.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="[url]http://www.macromedia.com/go/getflashplayer"[/url] />');
- document.write('</object>');
- //-->
- </script></td></tr></tbody></table>
- </td>
- <td style="">
- <table border="0" cellSpacing=0 cellPadding=0 width="100%" style="padding-top:6px;border-right:1px solid #AACCEE">
- <tbody>
- <tr valign="top">
- <td><img src="./$imgpath/hot/cqtn_cn.gif"></td>
- <td class=indextd2>
- <div id="tbc_11" class="dis">$newthreads</div>
- <div id="tbc_12" class="undis">$replythreads</div>
- <div id="tbc_13" class="undis">$digestthreads</div>
- <div id="tbc_14" class="undis">$ifmarkthreads</div>
- <div id="tbc_15" class="undis">$hotthreads</div>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td style="border-right:1px solid #AACCEE">
- <table border="0" cellSpacing=0 cellPadding=0 width="100%">
- <tbody>
- <tr valign="top">
- <td><img src="./$imgpath/hot/cqtn_cn.gif"></td>
- <td class=indextd2>
- <div id="tbc_21" class="dis">$memberposttoday</div>
- <div id="tbc_22" class="undis">$memberpostmonth</div>
- <div id="tbc_23" class="undis">$timelv</div>
- </td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- </table>
- </div>
|
将附件的的images直接覆盖到 论坛根目录 2、附件内有修改好的index.htm文件直接覆盖即可 声明:本 插件非本站原创,为修改转发! 附件是在我自己的论坛上,下载可能提示你需要注册! [ 此贴被pllx在2008-06-16 16:10重新编辑 ]
|