Admin Name Color? Admin Name Color?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Admin Name Color?

Started by SirMoo, April 24, 2011, 10:14:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SirMoo

I did do a bit of searching before hand, but there seems to be a lot of things cluttering the forum and 'admin' just adds too many useless things to the mix. If this is discussed elsewhere, please point me in the right direction.

When viewing comments, I'd like for administrators names to be shown in color (that is different from normal users), is there a way to do this? I've noticed that it appears to treat them all the same regardless. Is there an easy way to change this? Can I make it distinguish between admin and normal members? Either by CSS or else where? I use a modified version of Hardwired if that helps.

Thanks!

-SirMoo-

ΑndrĂ©

Copy function theme_html_comments from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist.

Then, find
                $profile_lnk = '<a href="profile.php?uid='.$row['author_id'].'">'.stripslashes($row['msg_author']).'</a>';
and replace with
                $has_admin_access = mysql_result(cpg_db_query("SELECT has_admin_access FROM {$CONFIG['TABLE_USERGROUPS']} AS g INNER JOIN {$CONFIG['TABLE_USERS']} AS u ON g.group_id = u.user_group WHERE user_id = {$row['author_id']}"), 0);
                $admin_color = $has_admin_access ? 'style="color:red;"' : '';
                $profile_lnk = '<a href="profile.php?uid='.$row['author_id'].'" '.$admin_color.'>'.stripslashes($row['msg_author']).'</a>';

SirMoo

This appears to have worked perfectly! Thank you so much!