用户组颜色区别的更改
作者:cmscn 日期:2005-06-29
不添加任何数据字段,轻松完成用户颜色更改.
首先配置后台
①在后台设置颜色如下:
在include/admin_config_edit.asp找到
<tr>
<td>用户组 <%response.write i+1%>:</td>
<td><input type=text name=user_power_<%response.write i+1%> value='<%response.write tdim(i)%>' size=30 maxlength=20></td>
<td class=gray> </td>
</tr>把maxlength=100
②在include/common_other.asp在,web_n_girl后面定义web_forum_tcolor
找到web_n_girl="女孩"在其下面添加:
web_forum_tcolor=""
③在include/admin_config_edit.asp里面找到
web_n_girl=code_config(request.form("web_n_girl"),0),在其下面添加:
web_forum_tcolor=code_config(request.form("web_forum_tcolor"),0)在<tr>
<td>网站目录:</td>
<td><input type=text name=web_dim_6 value='<%response.write web_dim(6)%>' size=20 maxlength=100></td>
<td class=gray></td>
</tr>
下面添加:<tr>
<td>用户颜色:</td>
<td><input type=text name=web_forum_tcolor value='<% response.write web_forum_tcolor %>' size=10 maxlength=6> <a href='javascript:;' onClick="javascript:slect_color('web_forum_tcolor');"><img border=0 src="html_edit/images/btn_fgcolor.gif" width=23 height=22 align=absmiddle alt='点击选取主题字体颜色'></a> 请正确填写<font class=red_3>6</font>位颜色代码。</td>
<td class=gray>用户在论坛所用的外围颜色</td>
</tr>=======================================
④在include/jk_template.asp里面找到,web_n_girl,定义web_forum_tcolor在 vbcrlf&"web_n_girl="""&web_n_girl&"""" & _下面一行添加:
vbcrlf&"web_forum_tcolor="""&web_forum_tcolor&"""" & _
=======================================
⑤打开forum_view,找到
dim bg_var,n_user,temp1
在其下方添加:
dim dim_power,dim_grade,si,sdim,snum,u_color
dim_power=dim_user
dim_grade=split(web_user_grade,"|")
snum=ubound(dim_power)
for si=0 to snum
sdim=split(dim_power(si),":")
if u_power=sdim(0) then
u_color=sdim(3)
end if
next
if u_color="" then
sdim=split(dim_power(0),":")
u_color=sdim(3)
end if在下面将<td class=bw><font class=blue><b>"&n_user&"</b></font></td>修改为:
引用内容
<td style='filter:glow
(color=#"&web_forum_tcolor&",strength=2);'><a target=_blank href='user_view.asp?username="&server.urlencode(u_username)&"'><font color='"&u_color&"'><b>"&n_user&"</b></font></a></td>
http://www.up173.com/forum_view.asp?forum_id=6&view_id=488
评论: 8 | 引用: 0 | 查看次数: 830
发表评论