View Full Version : Add-On Releases - UGL - Usergroup Legend (vBA Support Included)
What it does:
This plugin displays the user group color legend at the bottom of the forums index and/or in the Users Online box for those with vBAdvanced installed. Basically, this will work for people with vBAvanced as well as those without it.
This is my first vB mod and I wrote it only after a few hours of looking into how to make a plugin, so please... be nice in your comments. ;)
How to install:
Admin CP -> Plugins & Products -> Manage Products -> Add/Import Product
Select the XML File
Import the file
IF YOU ARE USING vBA, then follow the next set of installation instructions (upload the file, make the module edit)
This mod requires a hook that doesn't exist in vBA, so I've created one myself.
Upload the file hooks_ugl.xml into your /includes/xml folder.
Now you have to add in the call to the hook.
Open the file /modules/onlineusers.php
Find:
if (!$activeusers)
{
$activeusers = construct_phrase($vbphrase['no_x_online'], $vbphrase['members']);
}
Add After:
// Added by UGL module
($hook = vBulletinHook::fetch_hook('vba_cmps_module_onlineu sers_complete')) ? eval($hook) : false;
Configuration:
Admin CP -> vBulletin Options, User Group Legend
By default the display for vbAdvanced is turned off, so if you use vBA, turn it on here. Otherwise, configure the usergroups you'd like displayed and in what order.
How do I change the usergroup colors?
In order to change the colors of the different usergroups, you have to edit the user groups themselves, this is standard for vBulletin but some people have a hard time figuring it out (myself included at first).
AdminCP -> Usergroups -> Usergroup Manager -> Edit (next to whatever usergroup)
What you are looking for is the field: Username HTML Markup
Edit the first box and add in: <span style="color: #FF6600;">
Edit the next box and add in: </span>
Do that for each usergroup you want, changing the HTML color value to your liking.
Credits:
This mod is derived from the mod Usergroup Color Bar Legend, https://vborg.vbsupport.ru/showthread.php?p=1707616 by Atakan KOC.
Mostly all I did was add in support for vBAdvanced.
Screen Shots:
http://www.darkhandofvalor.com/UGL/forums_index_ss.jpg
http://www.darkhandofvalor.com/UGL/online_users_ss.jpg
dt_truck11
01-11-2009, 04:34 AM
im assuming the second screenshot is what it looks like on vbadvanced? because im looking for exactly that for vb 3.8 to put on a side column. any way u could help me with that?
Yes, that's the vBA screenshot. I'll look into doing what you want as it sounds like a good addition to the plugin. More than likely, you could just edit the Online Users plugin to point to the correct hook where you want it displayed, but... that's just a guess.
Where exactly on what side column are you looking to put it?
im assuming the second screenshot is what it looks like on vbadvanced? because im looking for exactly that for vb 3.8 to put on a side column. any way u could help me with that?
dt_truck11
01-11-2009, 04:49 AM
if u look at my site (http://www.sureshotters.com) i have a mod that adds a menu on the left side of my forum home and i would like to put the online users in one of the blocks
What you'd need to do is edit whatever file creates that module, wherever you want the forum legend to display, you need to add in the:
// Added by UGL module
($hook = vBulletinHook::fetch_hook('vba_cmps_module_onlineu sers_complete')) ? eval($hook) : false;
Then make sure you enable it in the vBulletin options and you should hopefully get it to display there. It's hard to say not knowing that addon you're using, but that's really all it should take it to make it work. It depends on if the same data is available in that module as is needed.
dt_truck11
01-11-2009, 05:08 AM
welllll.....lol it didnt exactly work this is what comes up when i add your code
// Added by UGL module (// Custom Block Processing if (($vbulletin->options['usc_custom_block']) && ($vbulletin->userinfo['permissions']['uscpermissions'] & $vbulletin->bf_ugp['uscpermissions']['usecustomblocks'])) { $custom_contents = $vbulletin->db->query("SELECT displayorder, link_url, title FROM " . TABLE_PREFIX . "usc_custom_block WHERE userid = " . $vbulletin->userinfo['userid'] . " AND displayorder > '0' ORDER BY displayorder ASC;"); $row = 0; while($content = $db->fetch_array($custom_contents)) { eval('$custom_row = $custom_row . "' . fetch_template('usc_custom_row') . '";'); $row++; } eval ('$usc_custom_block = "' . fetch_template('usc_custom_block') . '";'); } // end fetch and display custom contents eval('$block1 = "' . fetch_template('usc_block_1') . '";'); eval('$block2 = "' . fetch_template('usc_block_2') . '";'); eval('$block3 = "' . fetch_template('usc_block_3') . '";'); eval('$block4 = "' . fetch_template('usc_block_4') . '";'); eval('$block5 = "' . fetch_template('usc_block_5') . '";'); eval('$block6 = "' . fetch_template('usc_block_6') . '";'); eval('$block7 = "' . fetch_template('usc_block_7') . '";'); eval('$block8 = "' . fetch_template('usc_block_8') . '";'); eval('$block9 = "' . fetch_template('usc_block_9') . '";'); eval('$block10 = "' . fetch_template('usc_block_10') . '";'); eval('$block11 = "' . fetch_template('usc_block_11') . '";'); eval('$block12 = "' . fetch_template('usc_block_12') . '";'); eval('$block13 = "' . fetch_template('usc_block_13') . '";'); eval('$block14 = "' . fetch_template('usc_block_14') . '";'); eval('$block15 = "' . fetch_template('usc_block_15') . '";'); eval('$block16 = "' . fetch_template('usc_block_16') . '";'); eval('$block17 = "' . fetch_template('usc_block_17') . '";'); eval('$block18 = "' . fetch_template('usc_block_18') . '";'); eval('$block19 = "' . fetch_template('usc_block_19') . '";'); eval('$block20 = "' . fetch_template('usc_block_20') . '";'); $process = false; if ($vbulletin->userinfo['userid'] == 0 AND $vbulletin->options['trg']) { $scripts = explode(',',$vbulletin->options['trgscript']); if (empty($scripts)) { $process = true; } else if (!in_array(THIS_SCRIPT, $scripts)) { $process = true; } } if ($process) { $time = TIMENOW; $host= SESSION_HOST; $script = THIS_SCRIPT; $requests = $_REQUEST; $guest = md5(USER_AGENT.IPADDRESS.COOKIE_SALT); $useragent = $vbulletin->db->escape_string(USER_AGENT); $excludes = explode(',',$vbulletin->options['trgrequests']); if (!empty($excludes)) { foreach ($excludes AS $exclude) { unset ($requests[$exclude]); } } $spidername = ''; $requests = $vbulletin->db->escape_string(serialize($requests)); if ($vbulletin->options['trgspiders'] AND $vbulletin->options['enablespiders']) { unset($agent, $vbulletin->wol_spiders, $ip); if (method_exists($vbulletin->datastore,'do_fetch')) { // Datastore extension exists, use it $vbulletin->datastore->do_fetch('wol_spiders',$errors); if ($errors[0]) { // Fetch failed, use original datastore $vbulletin->datastore->do_db_fetch("'wol_spiders'"); } } else { // No e
theres actually more stuff but it wont fit in this post
im using the Ultimate Side Columns (https://vborg.vbsupport.ru/showthread.php?t=175181) mod. i edit all the blocks through the style templates.
RedDevil
01-11-2009, 01:05 PM
very nice - installed Vba working fine too nice 1st mod
Leo Brazil
01-12-2009, 08:48 AM
Question before installation.
You said this mod derived from the mod Usergroup Color Bar Legend, https://vborg.vbsupport.ru/showthread.php?p=1707616 by Atakan KOC, right ?
I already have his mod installed but the idea to give integration for vBA really atracts me.
In this case, can I just installed hooks plug in instead of delete Atakan one and install everything ?
Thank you the idea is great.
First, I'm glad you like the mod! Second... it might work together.
When I first started working on it, I wasn't planning on releasing it (didn't think many people would use it, my first mod, etc). So when I wrote it, I redid some of how the original mod works and added my own things to it.
By default, you'd get it double printing in the forums index. However in my mod, I added in the ability to turn on/off each section it displays in. So I guess you could turn off the main forums index display in my mod and leave the vBA one intact and it should work fine.
You'll have two mods running technically and a little more overhead in storage, etc... but obviously, nothing serious. Either way, I think that'll work. Let me know how it works out for ya!
Question before installation.
You said this mod derived from the mod Usergroup Color Bar Legend, https://vborg.vbsupport.ru/showthread.php?p=1707616 by Atakan KOC, right ?
I already have his mod installed but the idea to give integration for vBA really atracts me.
In this case, can I just installed hooks plug in instead of delete Atakan one and install everything ?
Thank you the idea is great.
meissenation
01-13-2009, 02:06 PM
Neither yours nor the other one that's identical to this works for me. :? It shows the usergroups legend but it doesn't show the HTML markup that I've already done for each of those usergroups.
Leo Brazil
01-13-2009, 05:15 PM
Installed and working fine.
Just a tip: phrase the sentence "Color Legend:"
Thanks.
Can you paste in what the HTML you have is? That seems to be the common issue between my mod and the other that you are having trouble with.
Neither yours nor the other one that's identical to this works for me. :? It shows the usergroups legend but it doesn't show the HTML markup that I've already done for each of those usergroups.
Good idea, thanks! Now... to figure that out! ;)
Installed and working fine.
Just a tip: phrase the sentence "Color Legend:"
Thanks.
NLP-er
07-06-2009, 10:37 PM
Screenshot please :)
Screenshot please :)
Umm, there are screenshots already. ;)
NLP-er
07-07-2009, 07:50 AM
Umm, there are screenshots already. ;)
Yeah :) Sorry - my browser didn't get it. I will reload page. Thanks! :)
NLP-er
07-08-2009, 02:53 AM
Yeah :) Sorry - my browser didn't get it. I will reload page. Thanks! :)
Something wrong with those screenshots - I don't see those at all...
Mahar
07-08-2009, 03:03 AM
Can this be set underneath the users who are currently online in it's own little box? Also, will it display Bold itallic etc?= because I'm not currently using coloured usernames for staff.
kool_zero
07-11-2009, 12:27 AM
no matter what i set in the start box and end box, i never see colors. any ideas here?
love.
07-11-2009, 03:03 AM
thank u
kool_zero
07-11-2009, 08:32 PM
no matter what i set in the start box and end box, i never see colors. any ideas here?
nevermind i had a bigger issue that is now resolved
viper357
03-01-2011, 09:04 AM
Thanks for this, quick question, if I want to add the words "Color Legend:" at the bottom of the forums page, I assume I would need to edit the plugin code:
if (THIS_SCRIPT == "index" and $vbulletin->options['ugl_forumsindex_onoff'])
{
$activeusers2 .= '<br />';
$userbuls = split(',', $vbulletin->options['ugl_display_order']);
foreach($userbuls AS $userbul) {
$activeusers2 .= $vbulletin->usergroupcache["$userbul"]['opentag'] . '? '.$vbulletin->usergroupcache["$userbul"]['title'] . $vbulletin->usergroupcache["$userbul"]['closetag'].' ';
}
$activeusers = ''.$activeusers2 .'<br /><br />'. $activeusers;
}
I've tried to put it in a couple of places but it is either not in alignment or it completely stops the legend from showing. Thanks. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.