vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - UGL - Usergroup Legend (vBA Support Included) (https://vborg.vbsupport.ru/showthread.php?t=201385)

Trek 01-10-2009 10:00 PM

UGL - Usergroup Legend (vBA Support Included)
 
1 Attachment(s)
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:

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?

Trek 01-11-2009 04:39 AM

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 (Post 1708207)
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 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

Trek 01-11-2009 05:01 AM

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.

dt_truck11 01-11-2009 05:08 AM

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.

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.

Trek 01-12-2009 03:03 PM

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 (Post 1709489)
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.


All times are GMT. The time now is 02:57 PM.

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.02204 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete