XF 2.1 Username Colors

Rettep

Member
Hello!

I wonder how I can make it so that in the forum nodes "Latest Post" were it says user posted ("Thread Title") by "User" i want the user to have colors depening on their usergroup. Owner = red, admin = blue and so on..

Thanks
 
Edit the node_list_forum template.

Change this:
HTML:
<li class="node-extra-user"><xf:username user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" /></li>

To this:
HTML:
<li class="node-extra-user"><xf:username user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" rich="true" /></li>


Edit the thread_list_macros template.

Change this:
HTML:
<li><xf:username user="$thread.User" defaultname="{$thread.username}" /></li>

To this:
HTML:
<li><xf:username user="$thread.User" defaultname="{$thread.username}" rich="true" /></li>


And this:
HTML:
<xf:username user="{$thread.LastPoster}" defaultname="{$thread.last_post_username}" />

To this:
HTML:
<xf:username user="{$thread.LastPoster}" defaultname="{$thread.last_post_username}" rich="true" />


Essentially, just add rich="true" to those three lines of code.
 
Top Bottom