Quote:
Originally Posted by croft
This worked great 
Is there any hooklocation where the 'TAG' is visible all over the forum and cms ?
|
Okay, if you want it to show up everywhere, try the following approach. Suppose I want the tag "[Admin]" to show up before those whose displaygroupid is 6. And I want this tag to be red.
First, I go to the Usergroup Manager, and edit the HTML markup to give the span element containing the username a classname:
In the "Username HTML Markup" fields, I enter:
Opening tag:
HTML Code:
<span class="group6" style="font-weight: bold; color: #FF8000;">
Closing tag:
Of course, you would use the "style" attributes you want, on my dev site, admins' names are in bold orange. I simply added the class attribute.
Now, we can inject a CSS selector on all pages with the following plugin, hook location "parse_templates":
PHP Code:
$template_hook['headinclude_css'] .= '<style>.group6::before{content: "[Admin] "; color: red;}</style>';
Now, everywhere an admin whose displaygroupid is 6 has their marked up username shown, the tag will be present.