Hello!
How can I make it so when reading posts in threaded mode, the names of the authors in the list bellow to be colorized according to their group membership?
Thanks in advance!
Umm, something like:
<font color=[usergroupcolor}>{username}</font>
Maybe?
I know it won't work atm, you'll have to do more than that...
This can be done with a code modification to
showthread.php.
Open the file up, and find:
$post['profilelink'] = build_profile_link($post['username'], $post['uid']);
Replace with
$post['profilelink'] = build_profile_link(format_name($post['username'], $post['usergroup'], $post['displaygroup']), $post['uid']);
Also find:
SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline
FROM ".TABLE_PREFIX."posts p
Replace with
SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON p.uid=u.uid
Thanks a lot ZiNgA BuRgA!
That is exactly what I needed.
I tried to follow the logic of the code but didnt have success. I guess it's due to lack of knowledge in PHP
Thanks again