Chinaz.com - 中国站长站

匿名投稿 投稿指南 RSS订阅 站长资讯通告:
搜索: 您的位置主页>精华转载>技术专题>阅读资讯:PHPWind 5.3 读贴页面只显示会员各一次签名-节约你的论坛资源

PHPWind 5.3 读贴页面只显示会员各一次签名-节约你的论坛资源

2007-07-26 11:11:58 来源:PHPWind中文网 作者:霓虹陌路 【 评论:0

在部份会员的签名当中包含了大量的图或者其它占用了空间较大的版面,不仅影响美观,而且消耗论坛资源,该插件可以限制了在发贴页面每一位会员只有一次机会显示签名档,节约和美化你的论坛资源。

 修改方案

打开 template/wind/read.htm页面,找到其中的

以下为引用的内容:

<!--
EOT;
}if($read[signature]){print <<<EOT
-->
        <div><img src="$imgpath/$stylepath/sigline.gif" align="absbottom" /></div>
        <div class="signature" style="max-height:{$db_signheight}px;maxHeight:{$db_signheight}px; overflow:hidden;"><table width="100%"><tr><td>$read[signature]<td></tr></table></div>
<!--
EOT;
} print <<<EOT
-->

替换为

以下为引用的内容:

<!--
EOT;
}if($read[signature]){
$cm=1;
$where=0;
for(;;){
    $checkwhere=explode(",",$check);
    if(strpos($check.',',",$read[authorid],") != false){
        $cm++;
        if($checkwhere[$cm]==$read[authorid]){
            $where=$cm-1;
            break;
        }
    }else{
        break;
    }
}
$wherenum=$where+$db_readperpage*($page-1);
$wherenum=$wherenum==0 ? "主楼" : "第 $wherenum 楼";
$signature=strpos($check.',',",$read[authorid],") === false ? "$read[signature]" : "<b>温馨提醒:<font color=red>为了节省论坛

资源,每位会员的自定义签名在同一页面只显示一次! 该会员的具体签名请查看</font><font color=green>$wherenum</font></b>";
print <<<EOT
-->
        <div><img src="$imgpath/$stylepath/sigline.gif" align="absbottom" /></div>
        <div class="signature" style="max-height:{$db_signheight}px;maxHeight:{$db_signheight}px;

overflow:hidden;"><table width="100%"><tr><td><a name="$where" >$signature</a><td></tr></table></div>
<!--
EOT;
}$check=$check.','.$read['authorid'];
print <<<EOT
-->



Tags:PHPWind   签名   资源  
责任编辑:阿小
  • 请文明参与讨论,禁止漫骂攻击。 用户名:新注册) 密码: 匿名:
    评论总数: [ 查看全部 ] 网友评论
    关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助