Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Usergroup Legend on Mouseover Details »»
Usergroup Legend on Mouseover
Version: 1.02, by SuperTaz SuperTaz is offline
Developer Last Online: Mar 2022 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.1.x Rating:
Released: 03-03-2011 Last Update: 04-28-2012 Installs: 19
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

/*================================================= =========*\
|| ################################################## ## ||
|| # Usergroup Legend For vBulletin Forums 4.1.x
|| # Version 1.01
|| # Author: Warden
|| # This mod may only be used from vbulletin.org
|| # DO NOT display this mod on any other modification site without my
|| # permission!
|| # You can alter this code and re-display it here on vbulletin.org
|| ################################################## ## ||
\*================================================ ==========*/

Description: This makes a usergroup legend that you can see what group belongs to whom by hovering over the color.

This mod is ported from this one here: https://vborg.vbsupport.ru/showthread.php?t=140019

All credits go to Digitalus since he came up with this design.

Note: This mod does work with vBulletin 4.1.8.

It is easy to add more colors for usergroups. I will post that below.

Installation time: About 2 minutes (2 Phrases, 1 Manual Template Change)

Note: If you are using this mod, https://vborg.vbsupport.ru/showthread.php?t=254239, it will conflict with my mod. Make sure if you use my mod, to delete the other one.

Also note: Make sure your style is updated to the newest version or there may be issues.

Also Note: This mod may contain a few glitches and/or bugs until I get them worked out. If someone wants to make this into an XML product, knock yourself out.

Installation:

Step 1: Go to admincp > Languages & Phrases > Phrase Manager > Add New Phrase:

Code:
Phrase Type: Global
Product: vBulletin
Varname: legend_title
Text: Usergroup Legend
Save!

Step 2: Go to Admincp > Languages & Phrases > Phrase Manager > Ass New Phrase:

Code:
Phrase Type: Global
Product: vBulletin
Varname: legend_alt_title
Text: User Group Legend
Save!

Step 3: Go to your AdminCP > Styles & Templates > Style Manager

Step 4: Choose your style

Step 5: Click on "Forum Home Templates", then click on "Forum Home"

Step 6: Look for:


Code:
<!-- what's going on box -->
Add Below:

Code:
<script type="text/javascript">
<!--

setup_memberlegend = function(tobj)
{
	prefix = ''
	suffix = ''

	if (tobj.getAttribute('ital'))
	{
		prefix += '<em>'
		suffix += '</em>'
	}

	if (tobj.getAttribute('undr'))
	{
		prefix += '<u>'
		suffix += '</u>'
	}

	if (tobj.getAttribute('bold'))
	{
		prefix += '<b>'
		suffix += '</b>'
	}

	if (tobj.getAttribute('line'))
	{
		prefix += '<s>'
		suffix += '</s>'
	}

	if (tobj.getAttribute('clr'))
	{
		prefix += '<span style="color:' + tobj.getAttribute('clr') + ';">'
		suffix += '</span>'
	}



	fetch_object('memberlegend').innerHTML = prefix + tobj.getAttribute('group') + suffix
}

-->
</script>
Step 7: Also in the "Forum Home" template, look for:

Code:
<!-- end logged-in users -->
Add below:

Code:
<!-- Usergroup Legend --> 
<div id="wgo_legend" class="wgo_subblock section collapse"><h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:phrase legend_alt_title}"/>{vb:phrase legend_title}</h3> <a class="collapse" id="collapse_legend_list" href="{vb:raw relpath}#top"><img src="{vb:stylevar imgdir_button}/collapse_40b.png" alt="Collapse/Expand" /></a>
</div>
            <div>
               <div style="float:left; width:18px; height:2px"></div>
                <div style="float:left;">&nbsp;</div>
		<div class="alt2" style="float:left;height:15px;width:15px;padding:0px;" group="Administrator" 

clr="#FF0000" bold="y" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = 

''">
			<div style="height:15px;width:15px;background:#FF0000;"></div>
                </div>
                <div style="float:left;">&nbsp;</div>
		<div class="alt2" style="float:left;height:15px;width:15px;padding:0px;" group="Super Moderator" 

bold="y" clr="#00FF00" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = 

''">
			<div style="height:15px;width:15px;background:#00FF00;"></div>
		</div>
                <div style="float:left;">&nbsp;</div>
		<div class="alt2" style="float:left;height:15px;width:15px;padding:0px;" group="Moderator" 

bold="y" clr="#008000" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = 

''">
			<div style="height:15px;width:15px;background:#008000;"></div>
		</div>
                <div style="float:left;">&nbsp;</div>
		<div class="alt2" style="float:left;height:15px;width:15px;padding:0px;" group="Supporter" 

bold="y" clr="#FFFF00" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = 

''">
			<div style="height:15px;width:15px;background:#FFFF00;"></div>
		</div>
                <div style="float:left;">&nbsp;</div>
		<div class="alt2" style="float:left;height:15px;width:15px;padding:0px;" group="Member" 

clr="#00FFFF" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
			<div style="height:15px;width:15px;background:#00FFFF;"></div>
		</div>
                <div style="float:left;">&nbsp;</div>
		<div class="alt2" style="float:left;height:15px;width:15px;padding:0px;" group="Validating" 

clr="#A0522D" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = 

''">
			<div style="height:15px;width:15px;background:#A0522D;"></div>
		</div>
                <div style="float:left">&nbsp;</div>
                <div class="alt2" style="float:left;height:15px;width:15px;padding:0px;" group="Banned" 

ital="y" line="y" clr="#FF00FF" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object

('memberlegend').innerHTML = ''">
			<div style="height:15px;width:15px;background:#FF00FF;"></div>
		</div>
		<div style="float:left;width:10px;height:1px;">&nbsp;</div>
		<div style="float:left;" id="memberlegend"></div>
         </div>
<br><br>
<!-- End Usergroup Legend -->
Click on Save and Reload!

You can adjust the usergroup names and colors to your liking.

If you want to add another usergroup, find the spot you want in the code above, and add this code:


Code:
<div style="float:left;">&nbsp;</div>
		<div class="alt2" style="float:left;height:12px;width:12px;padding:0px;" group="Member" bold="y" 

clr="#000000" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
			<div style="height:12px;width:12px;background:#000000;"></div>
		</div>
The blue highlighted area is the name you can change
The red highlighted area is the html color code you can change.

Live Demo Here

Scroll down to the bottom.

Remember: If you want support, CLICK INSTALL

Any problems, let me know.

Download Now

File Type: txt Usergroup Legend Install - Updated.txt (6.7 KB, 40 views)

Screenshots

File Type: png userlegend.png (9.8 KB, 0 views)
File Type: png userlegend1.png (11.2 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
JamalFree

Comments
  #22  
Old 08-09-2011, 09:45 PM
SuperTaz's Avatar
SuperTaz SuperTaz is offline
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 744
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mitch84 View Post
very nice, thank you
Sorry for the delay, but, You're welcome.
Reply With Quote
  #23  
Old 11-20-2011, 11:59 PM
SuperTaz's Avatar
SuperTaz SuperTaz is offline
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 744
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated mod to work with 4.1.8.
Reply With Quote
  #24  
Old 12-02-2011, 07:43 AM
Kiran-E-Sehar Kiran-E-Sehar is offline
 
Join Date: Jan 2011
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks buddy
Reply With Quote
  #25  
Old 12-02-2011, 08:27 AM
Merenguista's Avatar
Merenguista Merenguista is offline
 
Join Date: Sep 2010
Location: Morocco
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SuperTaz View Post
Updated mod to work with 4.1.8.
thanks ..
Reply With Quote
  #26  
Old 12-02-2011, 11:04 PM
SuperTaz's Avatar
SuperTaz SuperTaz is offline
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 744
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to help.
Reply With Quote
  #27  
Old 04-29-2012, 02:20 AM
SuperTaz's Avatar
SuperTaz SuperTaz is offline
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 744
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Minor code update.
Reply With Quote
  #28  
Old 08-08-2012, 09:30 PM
faisaly.com faisaly.com is offline
 
Join Date: Mar 2007
Posts: 226
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working using vB4.2.0 without the mod installed as noted in the very first post...
Reply With Quote
  #29  
Old 08-09-2012, 03:36 AM
vBThemer vBThemer is offline
 
Join Date: Aug 2012
Location: India
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for mod installed on vb 4.2
Reply With Quote
  #30  
Old 08-11-2012, 10:38 PM
SuperTaz's Avatar
SuperTaz SuperTaz is offline
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 744
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're welcome.
Reply With Quote
  #31  
Old 04-21-2013, 03:32 PM
Mysterious Ride's Avatar
Mysterious Ride Mysterious Ride is offline
 
Join Date: Feb 2008
Location: US
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, I was wondering if there's any way to make this into just an html code for a Forum Block. I already use a different legend for Out of Character accounts which is about eight usergroups, but I have a lot of other usergroups that's color coded depending on the character job and I would really like it to just be in a forum block on the side bar. I actually tried to put the code there and it works, except for the mouseover part.

I used:

Code:
<div style="height:15px;width:15px;background:#FF0000;"></div>
But I need something to make that have the mouseover effect and tell the usergroup in just plain HTML, under the box or to the right, would be great.
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 09:06 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.06040 seconds
  • Memory Usage 2,349KB
  • Queries Executed 27 (?)
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
  • (8)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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