Log in

View Full Version : Change Post Icon when specific user group posts


Darkpsy
10-08-2011, 08:12 PM
Hello,

I'm looking for a way to change the post icon of a thread whenever a member of a specific user group posts in that thread. I'm also looking for a way to link that image to the last post posted by a member of that specific user group.

The functionality is similar to http://forums.startrekonline.com

Thank you!

kh99
10-13-2011, 07:08 PM
I think the thing to do would be to execute code in the function build_thread_counters() in includes/functions_databuild.php, do a check of the thread's posts and modify the iconid for the thead accordingly. Unfortunately there's no hook there to allow it to be done in a plugin. So you could either try to find hooks to cover everywhere the icon would need to change, or else edit includes/functions_databuild.php (normally you'd try to avoid that so that you don't have to deal with it when upgrading, but sometimes there's no choice).

Darkpsy
10-13-2011, 10:39 PM
Thank you for your response. How would I go about checking what usergroup a particular poster is in? Would it be a variable or function I can call?