统计排行 社区应用 社区服务 会员列表 最新帖子 精华区 帮助
主题 : 首页幻灯图+主题排行+会员排行 美观简化版 for pw6.0(10月30日最新完美版)
hxhack 在线
级别: 五星会员
UID: 1015549
精华: 0
发帖: 6737
金钱: 933 两
威望: 874 点
PW积分: 671 点
技术分: 0 分
团队工龄: 0 月
群组: PHPWind官方团队
在线时间: 2141(时)
注册时间: 2006-12-31
最后登录: 2010-03-15
楼主  发表于: 2007-10-30   

首页幻灯图+主题排行+会员排行 美观简化版 for pw6.0(10月30日最新完美版)

首页幻灯图+主题排行+会员排行 美观简化版 for pw6.0(最新完美版)


演示地址:http://www.hxhack.com/bbs

要打开插件里的文字广告功能...

打开你的风格模板的index.htm文件(默认:论坛根目录\template\wind\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个主题的图片
  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=60;//主题排行自动更新时间,单位秒
//下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
$showforum="(pf.f_type = 'forum' or pf.f_type = 'former')";
if(($times*****p-@filemtime($cachelist)>=$cachelisttime)){
$listnum=10;//主题显示个数
$listlength=26;//主题标题长度
$listnum1=6;//会员在线时间排行显示个数
$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,$listnum1");
$c_i=1;//初始化图片序号
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;
if($lv > 48) $lv = 48;
$memberonline.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <a href='profile.php?action=show&uid=$members[uid]' title='在线等级:{$lv} 级\n在线时长:{$members[onlinetime]} 小时\n升级剩余:{$more} 小时'>$members[username]</a> <img src='$imgpath/top/{$lv}.gif'><br />";
$c_i++;
}
unset($members);
unset($c_i);
//会员在线时间排行结束

//会员当日发帖排行开始
$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");
$c_i=1;//初始化图片序号
while($members=$db->fetch_array($query)){
$memberposttoday.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a>  $members[todaypost]<br />";
$c_i++;
}
unset($members);
unset($c_i);
//会员当日发帖排行结束

//最新发表主题开始
$query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.hits 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]);
$subject=substrs($threads[subject],$listlength);
$newthreads.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <a href='read.php?tid=$threads[tid]' title='主题:$threads[subject]\n作者:$threads[author]\n时间:$threads[postdate]\n浏览:$threads[hits] 次'>$subject</a><br />";
$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 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],$listlength);
$digestthreads.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <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] 次'>$subject</a><br />";
$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 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],$listlength);
$replythreads.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <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] 次'>$subject</a><br />";
$c_i++;
}
unset($threads);
unset($c_i);
//最新回复主题结束

@writeover($cachelist,"<?php\n\$memberonline=\"$memberonline\";\n\$memberposttoday=\"$memberposttoday\";\n\$newthreads=\"$newthreads\";\n\$digestthreads=\"$digestthreads\";\n\$replythreads=\"$replythreads\";\n?>");
}
@require_once($cachelist);
//会员排行+主题排行结束

//首页调用结束

print <<<EOT
-->







--------------------------------------------------------------------------------

再找到如下的代码 :

Copy code
<!--
EOT;
}}
if($advertdb[text] && $id && $id<4){
for($i=$id;$i<4;$i++){print <<<EOT
-->
    <td class="f_one" width="25%"><br /></td>
<!--
EOT;
}print <<<EOT
-->
    </tr>
<!--
EOT;
}print <<<EOT
-->
</table></div>

下面加:
引用
<!-- 主题排行开始 -->
<div class="t">
<table cellspacing="0" cellpadding="0" width="100%">
  <tr class="tr3 tac">
    <td width="18%"><span class="b" style="color:#FF6699">社区最新图片</span></td>
    <td width="22%"><span class="b" style="color:#669900">最新发表主题</span></td>
    <td width="22%"><span class="b" style="color:#0066FF">最新回复主题</span></td>
    <td width="22%"><span class="b" style="color:#FF9933">社区精华主题</span></td>
    <td width="16%"><span class="b" style="color:#FF3300">今日发贴排行</span></td>
  </tr>
  <tr class="tr3">
    <td align="center">
    <script type="text/javascript">
    <!--
      var focus_width=165
      var focus_height=140
      var swf_width = focus_width
      var swf_height = focus_height

      var pics="$pics"
      var links="$links"

      document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
      document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="{$imgpath}/pixviewer.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+'&borderwidth='+focus_width+'&borderheight='+focus_height+'">');
      document.write('<embed src="{$imgpath}/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&borderwidth='+focus_width+'&borderheight='+focus_height+'" menu="false" bgcolor="#F4FBFF" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
      document.write('</object>');
    //-->
    </script>
    </td>
    <td class="f_two" style="vertical-align:top;">$newthreads</td>
    <td style="vertical-align:top;">$replythreads</td>
    <td class="f_two" style="vertical-align:top;">$digestthreads</td>
    <td style="vertical-align:top;">$memberposttoday</td>
  </tr>
</table>
</div>
<!-- 主题排行结束 -->




觉得好的,给我加分吧。。。感谢CCTV!

演示地址:http://www.hxhack.com/bbs
[ 此贴被hxhack在2007-10-31 12:31重新编辑 ]
附件: 首页幻灯图+主题排行+会员排行.rar (25 K) 下载次数:1787
清空我的评分动态本帖最近评分记录: 共6条评分记录
龙二哥 威望 +2 2007-10-30 -
honglake 威望 +2 2007-10-30 很好用哈
苏狐 威望 +3 2007-10-30 优秀文章-欢迎进行技术交 ..
龙二哥 威望 +2 2007-10-30 -
honglake 威望 +2 2007-10-30 很好用哈
苏狐 威望 +3 2007-10-30 优秀文章-欢迎进行技术交 ..
隐藏评分记录
hxhack 在线
级别: 五星会员
UID: 1015549
精华: 0
发帖: 6737
金钱: 933 两
威望: 874 点
PW积分: 671 点
技术分: 0 分
团队工龄: 0 月
群组: PHPWind官方团队
在线时间: 2141(时)
注册时间: 2006-12-31
最后登录: 2010-03-15
沙发  发表于: 2007-10-30   
      自己坐沙发!
离线
级别: 六星会员
UID: 788143
精华: 0
发帖: 11521
金钱: 189 两
威望: 46355 点
PW积分: 30 点
技术分: 0 分
团队工龄: 0 月
群组: 天堂
在线时间: 1654(时)
注册时间: 2006-06-27
最后登录: 2010-02-25
2楼  发表于: 2007-10-30   
强烈支持···好东西
a188 离线
级别: 四星会员
UID: 381922
精华: 0
发帖: 1786
金钱: 200 两
威望: 35 点
PW积分: 15 点
技术分: 0 分
团队工龄: 0 月
在线时间: 267(时)
注册时间: 2005-07-22
最后登录: 2010-03-14
3楼  发表于: 2007-10-30   
我顶你一个
a188 离线
级别: 四星会员
UID: 381922
精华: 0
发帖: 1786
金钱: 200 两
威望: 35 点
PW积分: 15 点
技术分: 0 分
团队工龄: 0 月
在线时间: 267(时)
注册时间: 2005-07-22
最后登录: 2010-03-14
4楼  发表于: 2007-10-30   
index.php不要改?
evhoo 离线
级别: 二星会员
UID: 1231898
精华: 0
发帖: 615
金钱: 190 两
威望: 52 点
PW积分: 0 点
技术分: 0 分
团队工龄: 0 月
在线时间: 109(时)
注册时间: 2007-05-31
最后登录: 2008-06-05
5楼  发表于: 2007-10-30   
回帖是礼貌,谢谢分享!!
yftx 离线
级别: 二星会员
UID: 1062889
精华: 0
发帖: 387
金钱: 208 两
威望: 12 点
PW积分: 8 点
技术分: 0 分
团队工龄: 0 月
在线时间: 143(时)
注册时间: 2007-02-13
最后登录: 2008-12-22
6楼  发表于: 2007-10-30   
不错,已经用了! 演示:  http://www.chaosh.cn
mqhk 离线
级别: 一星会员
UID: 946105
精华: 0
发帖: 36
金钱: 178 两
威望: 1 点
PW积分: 0 点
技术分: 0 分
团队工龄: 0 月
在线时间: 252(时)
注册时间: 2006-10-25
最后登录: 2009-12-07
7楼  发表于: 2007-10-30   
不能用

覆盖了没效果
mqhk 离线
级别: 一星会员
UID: 946105
精华: 0
发帖: 36
金钱: 178 两
威望: 1 点
PW积分: 0 点
技术分: 0 分
团队工龄: 0 月
在线时间: 252(时)
注册时间: 2006-10-25
最后登录: 2009-12-07
8楼  发表于: 2007-10-30   
怎么我用 了没效果哈
andylan 离线
级别: 五星会员
UID: 188664
精华: 0
发帖: 6106
金钱: 912 两
威望: 1114 点
PW积分: 6 点
技术分: 0 分
团队工龄: 0 月
群组: 大火星帝国
在线时间: 1900(时)
注册时间: 2005-03-08
最后登录: 2010-03-15
9楼  发表于: 2007-10-30   
    我怎么还不行啊,
谁帮我看下。www.91kb.cn
evhoo 离线
级别: 二星会员
UID: 1231898
精华: 0
发帖: 615
金钱: 190 两
威望: 52 点
PW积分: 0 点
技术分: 0 分
团队工龄: 0 月
在线时间: 109(时)
注册时间: 2007-05-31
最后登录: 2008-06-05
10楼  发表于: 2007-10-30   
不能用
楼主留言:
可以用的呀
hxhack 在线
级别: 五星会员
UID: 1015549
精华: 0
发帖: 6737
金钱: 933 两
威望: 874 点
PW积分: 671 点
技术分: 0 分
团队工龄: 0 月
群组: PHPWind官方团队
在线时间: 2141(时)
注册时间: 2006-12-31
最后登录: 2010-03-15
11楼  发表于: 2007-10-30   
  可以用的呀
a188 离线
级别: 四星会员
UID: 381922
精华: 0
发帖: 1786
金钱: 200 两
威望: 35 点
PW积分: 15 点
技术分: 0 分
团队工龄: 0 月
在线时间: 267(时)
注册时间: 2005-07-22
最后登录: 2010-03-14
12楼  发表于: 2007-10-30   
我也是这样,改来改去不能用!郁闷!
晦迹韬光 离线
级别: 新手上路
UID: 473373
精华: 0
发帖: 43
金钱: 180 两
威望: 0 点
PW积分: 0 点
技术分: 0 分
团队工龄: 0 月
在线时间: 52(时)
注册时间: 2005-10-06
最后登录: 2007-12-20
13楼  发表于: 2007-10-30   
楼主不厚道哦,少个index.php 没放上来吧
andylan 离线
级别: 五星会员
UID: 188664
精华: 0
发帖: 6106
金钱: 912 两
威望: 1114 点
PW积分: 6 点
技术分: 0 分
团队工龄: 0 月
群组: 大火星帝国
在线时间: 1900(时)
注册时间: 2005-03-08
最后登录: 2010-03-15
14楼  发表于: 2007-10-30   
楼主不厚道哦
给我个有用的好伐?
描述
快速回复

温馨提示:欢迎交流讨论,请勿纯表情、纯引用!
验证问题:
你将要注册的是什么网站<答:phpwind> 正确答案:phpwind
按"Ctrl+Enter"直接提交