Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[修改] Discuz! X贴内用户名根据性别显示不同颜色,并小图标标识

[复制链接]
530761333 发表于 2010-5-31 01:09:29 | 显示全部楼层 |阅读模式


方法步骤:

1、下载附件,将解压出来的两个图片文件上传至论坛static\image目录;

2、打开template\default\forum\viewthread_node.htm文件,

查找:
  1. <a target="_blank" href="home.php?mod=space&uid=$post['authorid']" style="margin-left: 20px; font-weight: 700">$post[author]</a>
复制代码
替换为:
  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>  &nbsp;&nbsp;<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> &nbsp;&nbsp;<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> &nbsp;&nbsp;(未知性别)<!--{/if}-->
复制代码
注:里面颜色、图片都可以自己定义,修改成自己想要的!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
上山下石 发表于 2010-5-31 02:15:55 | 显示全部楼层
回复

使用道具 举报

itmgl2007 发表于 2010-5-31 10:40:41 | 显示全部楼层
这个好
回复

使用道具 举报

itmgl2007 发表于 2010-5-31 11:17:17 | 显示全部楼层
自己弄了个不男不女的图标 代替 那 未知性别 4个字了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

王可儿 发表于 2010-5-31 12:03:01 | 显示全部楼层
资料怎么加亮呢
回复

使用道具 举报

5474025 发表于 2010-6-18 06:12:55 | 显示全部楼层
定了! 以后有用!
回复

使用道具 举报

柏林风雪 发表于 2010-9-17 22:19:47 | 显示全部楼层
回复 itmgl2007 的帖子

你太有才了
回复

使用道具 举报

dqh000 发表于 2010-11-12 19:46:15 | 显示全部楼层
回复

使用道具 举报

龍Oo 发表于 2012-10-10 16:27:46 | 显示全部楼层
X2.5找不到此代码
回复

使用道具 举报

carlkyo 发表于 2012-10-13 10:24:40 | 显示全部楼层
感谢分享
回复

使用道具 举报

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

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-18 19:21 , Processed in 0.127420 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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