(仿PHPWind)用等级图片替代星星图片FOR5.0(9月27日已更新)
2楼是无在线状态的修改方法作者:sxrm
适用: DZ 5.0
修改: 有
include/global.func.php
templates\default\viewthread.htm
templates\default\viewpro.htm
复杂程度: 简单 1、include/global.func.php
找到- function showstars($num) {
- global $starthreshold;
- $alt = 'alt="Rank: '.$num.'"';
- if(empty($starthreshold)) {
- for($i = 0; $i < $num; $i++) {
- echo '
- ';
- }
- } else {
- for($i = 3; $i > 0; $i--) {
- $numlevel = intval($num / pow($starthreshold, ($i - 1)));
- $num = ($num % pow($starthreshold, ($i - 1)));
- for($j = 0; $j < $numlevel; $j++) {
- echo '
- ';
- }
- }
- }
- }
复制代码 下面加上- function showrankstars($num) {
- echo "
- ";
- }
复制代码 2、templates\default\viewthread.htm
2.1找到并删除- $post[authortitle]
-
- {eval showstars($post['stars']);}
- <!--{if $post['customstatus']}-->$post[customstatus]
- <!--{/if}-->
复制代码备注:
{eval showstars($post['stars']);}
这段不删除,就可以显示星星数 2.2查找- <!--{if $post['medals']}-->
- <!--{loop $post['medals'] $medal}-->
-
-
- <!--{/loop}-->
-
- <!--{/if}-->
复制代码 下面加- <!--{if $post['customstatus']}-->
- $post[customstatus]<!--{/if}-->
- {eval showrankstars($post['stars']);}
- <!--{if $vtonlinestatus && $post['authorid']}-->
- <!--{if ($vtonlinestatus == 2 && $onlineauthors[$post[authorid]]) || ($vtonlinestatus == 1 && ($timestamp - $post['lastactivity'] <= 10800) && !$post['invisible'])}-->
-
- <!--{else}-->
-
- <!--{/if}-->
- <!--{/if}-->
- {级别} $post[authortitle]
复制代码 3、templates\default\viewpro.htm
找到替换成有三个改后两个就行了
4. 把附件的图片上传到相应目录就可以了
等级图片下载
下面2张演示图片:的区别在于步骤2.1
是否删除- {eval showstars($post['stars']);}
复制代码 这段代码
[ 本帖最后由 sxrm 于 2007-1-27 17:46 编辑 ] |