Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
UGL - Usergroup Legend (vBA Support Included) Details »»
UGL - Usergroup Legend (vBA Support Included)
Version: 3.8.01, by Trek Trek is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.0 Rating:
Released: 01-10-2009 Last Update: Never Installs: 65
Uses Plugins Template Edits
Re-useable Code Additional Files Translations  
No support by the author.

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:
[pre]if (!$activeusers)
{
$activeusers = construct_phrase($vbphrase['no_x_online'], $vbphrase['members']);
}
[/pre]

Add After:
[pre]
// Added by UGL module
($hook = vBulletinHook::fetch_hook('vba_cmps_module_onlineu sers_complete')) ? eval($hook) : false;
[/pre]


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:



Download Now

File Type: xml product-ugl.xml (3.6 KB, 396 views)
File Type: xml hooks_ugl.xml (159 Bytes, 245 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-11-2009, 04:34 AM
dt_truck11's Avatar
dt_truck11 dt_truck11 is offline
 
Join Date: Apr 2008
Location: Wisconsin, USA
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 01-11-2009, 04:39 AM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?

Quote:
Originally Posted by dt_truck11 View Post
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?
Reply With Quote
  #4  
Old 01-11-2009, 04:49 AM
dt_truck11's Avatar
dt_truck11 dt_truck11 is offline
 
Join Date: Apr 2008
Location: Wisconsin, USA
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if u look at my site 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
Reply With Quote
  #5  
Old 01-11-2009, 05:01 AM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Code:
// Added by UGL module

        ($hook = vBulletinHook::fetch_hook('vba_cmps_module_onlineusers_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.
Reply With Quote
  #6  
Old 01-11-2009, 05:08 AM
dt_truck11's Avatar
dt_truck11 dt_truck11 is offline
 
Join Date: Apr 2008
Location: Wisconsin, USA
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

welllll.....lol it didnt exactly work this is what comes up when i add your code

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 mod. i edit all the blocks through the style templates.
Reply With Quote
  #7  
Old 01-11-2009, 01:05 PM
RedDevil's Avatar
RedDevil RedDevil is offline
 
Join Date: Mar 2008
Location: Cumbria, UK
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice - installed Vba working fine too nice 1st mod
Reply With Quote
  #8  
Old 01-12-2009, 08:48 AM
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Location: Brazil
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 01-12-2009, 03:03 PM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!


Quote:
Originally Posted by Leo Brazil View Post
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.
Reply With Quote
  #10  
Old 01-13-2009, 02:06 PM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04240 seconds
  • Memory Usage 2,325KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete