MyBB Community Forums

Full Version: Usergroup Legend
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey, I recently decided to add a Usergroup Legend to my site, so I did a little template edit.

Anyway, firstly, go into your Admin Control Panel and go to:
ACP > Templates & Styles > Templates > yourtheme Template > Index Page Templates > index_whosonline

Underneath everything, add:

	<td colspan="2" class="tcat"><span class="smalltext"><strong>Usergroup Legend: </strong></span></td>
</tr>
	<td width="20px" class="trow1"><img src="images/blackbb/online.gif" alt="home image" title="Usergroup Legend"></td>
	<td class="trow1" valign="top" align="left"><span class="smalltext">
PLACE YOUR GROUPS HERE!
</td>
</tr>

Example of this in action (code):
	<td colspan="2" class="tcat"><span class="smalltext"><strong>Usergroup Legend: </strong></span></td>
</tr>
	<td width="20px" class="trow1"><img src="images/blackbb/online.gif" alt="home image" title="Usergroup Legend"></td>
	<td class="trow1" valign="top" align="left"><span class="smalltext">
<span style="color: #9f0202;"><strong>Root Administrator</strong></span> |
<span style="color: #edda74;"><strong>Administrators</strong></span> |
<span style="color: #4CC417;"><strong>Co-Administrators</strong></span> |
<span style="color: #dcb107;"><strong>Global Moderators</strong></span> |
<span style="color: #c4c0c0;"><strong>Feature Moderators</strong></span> |
<span style="color: #4e4efd;"><strong>Moderators</strong></span> |
<span style="color: #00ffff;">Writers</span> |
<span style="color: #ee9a4d;">SAW Graphics Team</span> |
<span style="color: #eff12c;">Donators</span> |
<span style="color: #f10de4;">Expert Members</span> |
Members |
<em>Validating</em> |
<s>Banned</s> |
<span style="color: #FFFFFF;"><s>Permanently Banned</s></span>
</span></td>
</tr>

This will create:
[Image: usergrouplegend.png]


Thanks, and I hope you enjoyed my first MyBB Tutorial. ^^;;

-Faint Brushfire.
I don't mean to rain on your parade, but plugins are better-suited to these kinds of things. Smile

In fact, there's already a plugin which does this and is customizable.

But, it's great that you are showing people how to modify the templates. There are, indeed, times that it is preferable. Smile
Actually, the plugin isn't customisable last time I checked. Yeah you can remove groups, but not change the order. I do exactly what Faint Brushfire does, which IMO gives more control as you can change the order etc.
(2009-01-19, 11:10 AM)MattR Wrote: [ -> ]Actually, the plugin isn't customisable last time I checked. Yeah you can remove groups, but not change the order. I do exactly what Faint Brushfire does, which IMO gives more control as you can change the order etc.

You are, of course, 100% correct. Somehow, I completely failed to notice this at first.

I've modified the Usergroups Legends plugin to properly sort on the disporder column of the usergroups table. It currently requires manually editing the database, so I'm not releasing my modification yet. Once I figure how to make the plugin add more fields to the Groups page in the ACP, I'll submit my changes to CraKteR. Since it's a sane enhancement, hopefully he'll accept them. Cool (By the way, the ACP already displays the groups by disporder; you just can't change it for non-staff groups for some strange reason.) Of course, if CraKteR asks, I'll gladly give him the changes I made to usergrouplegends.php. Smile

And, in my case, it's amazing that I didn't notice it at first; I think I must have just checked that they were all there. It managed to look like this:

[Image: legend-out_of_order.png]

It looks like this with the corrected plugin:

[Image: legend-in_order.png]
I don't see where your talking about to put this.
(2009-01-22, 03:33 AM)deltacommander Wrote: [ -> ]I don't see where your talking about to put this.

At what point are you failing to follow the directions? Are you able to find the Themes and Templates part of the ACP? Can you not find the index_whosonline template for the theme you are using?
I already do this, but thanks for sharing Smile
Plugins or not. I think this tutorial serves its purpose. It teaches. Smile
And it teaches people who know HTML how to do this with MyBB.
This is one of very few tutorials that do this!
Very nice tutorial!
Hi, i followed your instrustions fine, but somethings gone wrong, can someone tell me how i can fix it please.
(2009-01-25, 05:12 PM)Terri Wrote: [ -> ]Hi, i followed your instrustions fine, but somethings gone wrong, can someone tell me how i can fix it please.

Could I have a link to your board please?
Pages: 1 2