一路 BBS

 找回密码
 注册
搜索
查看: 2285|回复: 0
打印 上一主题 下一主题

贴内用户名根据性别显示不同颜色,并小图标标识

  [复制链接]
跳转到指定楼层
楼主
发表于 10-1-2010 10:32:45 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
方法步骤:

1、下载附件,将解压出来的两个图片文件上传至论坛static\image目录;
2、打开template\default\forum\viewthread_node.htm文件,

查找:
  1. <a href="home.php?mod=space&uid=$post['authorid']" target="_blank" class="xw1">$post[author]</a>$authorverifys
复制代码
替换成
  1. <!--{if $post['gender'] == 1}--><a target="_blank" href="home.php?uid=$post['authorid']" style="margin-left: 20px; font-weight: 800"><font color="#24A8EB">$post[author]</font></a>   <img src="static/image/m.gif" alt="男性">

  2. <!--{elseif $post['gender'] == 2}--><a target="_blank" href="home.php?uid=$post['authorid']" style="margin-left: 20px; font-weight: 800"><font color="#E60383">$post[author]</font></a>   <img src="static/image/w.gif" alt="女性">

  3. <!--{else}--><a target="_blank" href="home.php?uid=$post['authorid']" style="margin-left: 20px; font-weight: 800"><font color="#000000">$post[author]</font></a>   (未知性别);<img src="static/image/n.gif" alt="未知性别"><!--{/if}-->
复制代码

注:里面颜色、图片都可以自己定义,修改成自己想要的!

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表