FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Request: Message body color based on user level
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Request: Message body color based on user level [message #27945] Mon, 03 October 2005 12:25 Go to next message
Ernesto is currently offline  Ernesto   Sweden
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)


Re: Request: Message body color based on user level [message #27952 is a reply to message #27945] Mon, 03 October 2005 14:33 Go to previous message
Ilia is currently offline  Ilia   Canada
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: I can't search chinese topic
Next Topic: Mailing List Functionality w/crontab, instead of .procmailrc or .forward
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 04:44:35 GMT 2024

Total time taken to generate the page: 0.02634 seconds