PDA

View Full Version : Colored Group Legend using Phrases


obmob
11-02-2006, 10:00 PM
Well, i wanted to add a usergroup legend in the forumhome page to let everyone know who is in charge. Cause they are always asking me, who are you? :hurt:

So, i tried some of the mods available, but i remembered my site uses more than english language. And i wanted to show my tags in more than one language.

I based my idea in the Dark User Legend (https://vborg.vbsupport.ru/showthread.php?t=123981) by Dark D (https://vborg.vbsupport.ru/member.php?u=116060).

All i did was to add my the idea i had, very simple and neat. I mean, if you don't need more than one language, use the one by Dark D, you need no more.

Ok, let's start.

FIRST: Lets add some color tags to our usergroups.

Enter Usergroups > Usergroup Manager.

Now lets edit Administrators Group. Look down for Username HTML Markup. In the first cell add:
<font color = "black"><u><b>
You can also use the color code instead of black and use #000000.

in the second one -to wrap the name- add:
</b></u></font>

Do the same to the other usergroups you want to show and don't forget which colors and style you used.

SECOND: Add a new phrase in Languages & Phrases > Phrase Manager > Then Click Add New Phrase in the bottom of that screen.

Phrase Type: GLOBAL
Product: vBulletin
Varname: group_legend
Text: <span class="smallfont"><font color = "black"><u><b>Administrators</b></u></font> | <font color = "red"><b>Super Moderators</b></font> | <font color = "blue"><b>Moderators</b></font> | <font color = "lightgray"><b>Registered Members</b></font></span>

THIRD: Don't press enter! You still need to translate to the desired language, as an example, i added spanish translation to the phrase. ;)

<span class="smallfont"><font color = black><u><b>Administradores</b></font></u> | <font color = red><b>Super Moderadores</b></font> | <font color = blue><b>Moderadores</b></font> | <font color = lightgray><b>Usuario Registrado</b></font></span>

Now you can press enter and save your new phrase :D

FOURTH: Now let's call the phrase in our forumhome template.

Enter in Styles & Templates > Style Manager and open your template groups, search for FORUMHOME and open it.

Search for:
<div>$activeusers</div>

Replace it with:
<div>$vbphrase[group_legend]<br />$activeusers</div>

This will show our phrase right above the active users, if you have some HTML experience you can call it whereever you want.

That's it... hope it didn't take too much time! ;)

Oh, and check the preview attached. :D
Hope it's useful for some of you.

ChavMagnet
11-03-2006, 02:24 PM
V. Nice thanks alot mate.

Thug
11-04-2006, 11:51 AM
nice, thankyou.

apiasto
11-06-2006, 08:12 AM
kool thnx

Tacama
11-07-2006, 07:51 AM
Just what i needed, thanks.

Justo lo que necesitaba, muchas gracias ;)

apiasto
11-08-2006, 04:21 PM
great idea installed it already thnx

obmob
11-08-2006, 04:24 PM
:) Glad it is useful!

PassLab.net
11-10-2006, 01:53 AM
thanks a lot ;)

Khawar
11-14-2006, 05:08 PM
helped alottttttttttttttt

krazycivik
12-17-2006, 07:08 PM
awsome thank you!

krazycivik
12-18-2006, 06:40 AM
is there anyway to add the legend out of the way or seperate box.. it kinda makes it crowded.. cheers,

obmob
12-19-2006, 04:08 PM
You can place the $vbphrase[group_legend] anywhere, you can create a new table for it also.

Creating a new row just for this would make the table look odd, but it can be done.

Maybe something like this:
<tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
<tr>
<td class="alt2"><a href="online.php$session[sessionurl_q]" rel="nofollow"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
<div>$activeusers</div>
</div> </td>
</tr>
<tr>
<td class="alt2">&nbsp;</td>
<td class="alt1">$vbphrase[group_legend]</td>
</tr>
</tbody>

ezekiel97
12-27-2006, 02:42 PM
Nevermind, found it out! Thanks alot!! INSTALLED!

phreezex
06-15-2007, 11:26 AM
ya really thanks alot i needed to find this one bad and thanks to you i got it :)

rasp187
06-15-2007, 12:52 PM
Works very well. Thanks.

obmob
06-15-2007, 02:41 PM
:) Glad this is useful for you.

RatherBecamping
10-21-2007, 04:56 PM
Works Very Well. Thank you for sharing.

DjiveWMD
06-14-2009, 02:41 AM
Usergroup Color Bar Legend

This hack shows the user group tags under the name of the active users. This is an easy but usefull for you to determine the order of the groups. install

Go to your admin cp, then:
Plugin System -> Manage Products -> [Add/Import Product] -> Select 'product-ugcb.xml' from your computer then press 'Import'

Usergroup Color Bar Setting
Go to your admin cp, then:
vBulletin Options -> Usergroup Color Bar ->

Versions:
v1.0 - Initial vB 3.7 version.
v2.0 - Initial vB 3.8 version.

Modifications Info

Plugin : 1
Phrases : 5
Template : 0
Setting : 2


HTML Color Names
http://i259.photobucket.com/albums/hh308/mad-2008/downloadnc7.gif
LINK (http://www.w3schools.com/Html/html_colornames.asp)