[PW]社区明星 v1.0 for phpwind 4.32
插件相关说明:显示当日发帖最多的3名会员。
如无发帖会员,或不足3名,显示资料未知,修正以往空白现象!(NEW)
增加 当日发帖TOP10 (NEW)
其他功能在制作中。。
为完善和区别,定此版为 社区明星 v1.0
已在 win2003系统 PHPwind 432 上测试通过!
=======================================
需要修改的2个文件
=====================
修改index.php
找 require_once PrintEot('index');footer();
在上面加
/**
* bbsother BY nekoo,happylife,ino
*/
require_once(R_P.'require/bbsother.php');
--------------------------
再找到
$rawnewuser=rawurlencode($newmember);
在下面添加
//调用开始 hack by nekoo
$cachefile="./data/bbscache/indexhotpost.php";
$cachetime=60;//缓存修改时间单位秒
if (($timestamp-@filemtime($cachefile)>=$cachetime)){
$hotmember=$newthreads=$hitthreads=$replythreads="";
$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,10");
while($members=$db->fetch_array($query)){
$hotmember10.="<a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a> [<font color=red>$members[todaypost]</font>] ";
}
unset($members);
@writeover($cachefile,"<?php\n\$hotmember10=\"$hotmember10\";\n?>");
}else{
@include($cachefile);
}
//调用结束
===================================
修改index.htm
适合的地方加一下代码
<!--
EOT;
if($tsdb_ckpostbest=='1'){
print <<<EOT
-->
<table cellpadding=0 cellspacing=0 width='$tablewidth' $i_table align=center>
<tr><td width='$tablewidth' valign=top bgcolor="#FFFFFF">
<table cellspacing=1 cellpadding=0 width=100%>
<tr><td width=33% height=25 valign=top>
<table cellspacing=0 cellpadding=0 width=100%>
<tr><td width=33% height=25 class=head align=center>
<b>今日发帖状元</b></td></tr>
</table>
</td>
<td width=33% valign=top>
<table cellspacing=0 cellpadding=0 width=100%>
<tr><td width=33% height=25 class=head align=center>
<b>今日发帖榜眼</b></td></tr>
</table>
</td>
<td width=33% valign=top>
<table cellspacing=0 cellpadding=0 width=100%>
<tr><td width=33% height=25 class=head align=center>
<b>今日发帖探花</b>
</td></tr>
</table>
</td></tr>
<tr>$topuserdb</tr>
</table>
</td></tr>
<tr><td class=head>
$tuserother
</td></tr>
<tr>
<td class=f_one width=95%><b>今日发贴TOP10 </b>:$hotmember10</td></tr>
</table>
<br>
<!--
EOT;
}print <<<EOT
-->
例如这段的上面
<script language="JavaScript" src="$imgpath/Deploy.js"></script>
<table cellpadding=5 cellspacing=1 width='$tablewidth' $i_table align=center>
<tr><td colspan=2 class=head>
<a style="float:right" href="#" onclick="return IndexDeploy('info',0)"><img id="img_info" src="$imgpath/$stylepath/index/cate_$cate_img.gif"></a><b>-=>论坛相关</b></td></tr>
后台添加插件
插件名:社区明星
唯一标识符:indexset
前台:(留空)
后台:indexset.php
相关文件:
hack/indexset.php,require/bbsother.php,template/admin/adminindexset.htm,data/tstmp/db_index.php,data/tstmp/db_postbest.php
=========
注意
============
添加好以后请设置 开启灌水明显 开启头像(如有需要,并设置头像大小)
image/face/none.gif(检查时候有此图片,这个是默认显示头像的图片)(有的时候是有图片,但是打开是空白,请仔细检查 好东西 觉得还不错 不过 没头像的会员 头像处是空白 不是很爽~ 说我把
已经加上了
嘿嘿 (添加好以后请设置 开启灌水明显 开启头像)
在那设置? 在后台设置的~ 好东西。
但是不会。 汗。
我是新手上路。
我下不了文件。
没有权限。哭哭哭:'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'(
页:
[1]
