Request: Message body color based on user level [message #27945] |
Mon, 03 October 2005 12:25 |
Ernesto
Messages: 413 Registered: August 2005
Karma: 0
|
Senior Member |
|
|
I would love to be able to set a different color on the message body if the poster has a special userlevel, for example moderator or administrator, or perhaps even if the poster belongs to a special usergroup like registered_user or anonymous_user or special_user etc.
I have searched the forums for quite some time but I was not able to find any "hacks" like this and would really appreciate a hand in this if anyone have a clue =)
I am not the best coder in the world, else I would of course not ask for help, but if you can give me an example either in PHP and in what file to edit, or just in "fudcode" how to edit in the template I would appreciate it alot.
My first idea was to just edit the drawmsg.tmpl -> dmsg_normal_message_body and add some sort of {IF} string, but I do not know how to format the syntax, nor do I know how, or where to edit the usergroup check or how to find out the usergroup number (if needed) since I am absolutelly horrible at reading MYSQL tables (and everything else that has to do with coding to be honest)
Ginnunga Gaming
|
|
|
Re: Request: Message body color based on user level [message #27952 is a reply to message #27945] |
Mon, 03 October 2005 14:33 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Your idea is right on the money so to speak, if you want to alter the colors of the message body based on user's status you can do that via the drawmsg.tmpl template.
The area of interest is the "{MAIN_SECTION: message_entry" section, in particular the "<tr><td colspan="2" class="MsgR3">" line in it. Add a style to the td tag with your color of choice.
FUDforum Core Developer
|
|
|