Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Usergroup Legend for ForumHome page Details »»
Usergroup Legend for ForumHome page
Version: 2.0, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.5.0 Beta 4 Rating:
Released: 07-13-2005 Last Update: 08-01-2005 Installs: 390
Uses Plugins Template Edits
 
No support by the author.

This little plugin shows a legend of what the various styles mean for the names on the who's online section of your forumhome page.

A big thank you to Link14716 for getting rid of the query.

Some people prefer different colors in the template changes. Their suggestions are posted below. I've posted what I am using on my board.

More advanced users may prefer: https://vborg.vbsupport.ru/showpost....0&postcount=61

Show Your Support

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

Comments
  #12  
Old 07-14-2005, 02:22 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea amy

Edit: I was just thinking - Is there any way you can create a "spacer" element for the usergroup titles?

What I mean is that "Administrator Super Moderator Moderator" etc looks a bit odd - I know how to add commas or dashes or other ascii characters to space the names out, but the problem is the last one listed will always have that character on the end of the name :ermm:

I added a "legendorder" field and ordered the groups by it, and tried calling $usergroups['legendorder'] and making it so that if the number was greater than or equal to 9, there was no "spacer" but it didn't work :ermm:

Satan
Reply With Quote
  #13  
Old 07-14-2005, 05:07 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK. I just released 2.0. It has the span tag for the smallfont and it has the separator to separate the usergroups.

I'll grab a new screenshot and post it in a second.
Reply With Quote
  #14  
Old 07-14-2005, 05:50 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this... Will be installing this in my test installation today. Definately makes it much easier than editing templates directly.
Reply With Quote
  #15  
Old 07-14-2005, 06:08 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did a few changes. First, in the template, I used
HTML Code:
<td class="thead" colspan="2">
instead of
HTML Code:
<td class="tcat" colspan="2">
It looks a lot better that way. Also, I changed to plugin code to save the query. (Feel free to use this, Amy.)
PHP Code:
// Get all usergroups that have style changes.

foreach ($vbulletin->usergroupcache AS $group)
{
    if (!
$group['opentag'] AND !$group['closetag']) {
        continue;
    }

    if (!isset(
$legend))
    {
        
$legend $group['opentag'] . $group['title'] . $group['closetag'];
    }
    else
    {
        
$legend .= " | " $group['opentag'] . $group['title'] . $group['closetag'];
    }

I would attach the plugin file, but xml attachments aren't allowed anymore.

Good job, Amy.
Reply With Quote
  #16  
Old 07-14-2005, 06:28 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Link14716
I did a few changes. First, in the template, I used
HTML Code:
<td class="thead" colspan="2">
instead of
HTML Code:
<td class="tcat" colspan="2">
It looks a lot better that way. Also, I changed to plugin code to save the query. (Feel free to use this, Amy.)
PHP Code:
// Get all usergroups that have style changes.

foreach ($vbulletin->usergroupcache AS $group)
{
    if (!
$group['opentag']) {
        continue;
    }

    if (!isset(
$legend))
    {
        
$legend $group['opentag'] . $group['title'] . $group['closetag'];
    }
    else
    {
        
$legend .= " | " $group['opentag'] . $group['title'] . $group['closetag'];
    }

I would attach the plugin file, but xml attachments aren't allowed anymore.

Good job, Amy.
Doh on using the cache! I'll update that and give you credit for catching my brain-fart

Amy
Reply With Quote
  #17  
Old 07-14-2005, 06:31 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amykhar
Doh on using the cache! I'll update that and give you credit for catching my brain-fart

Amy
Is there any way of making that display it based on a usergroup field?

Because I want it to display it by "legendorder" the field I created

I'm stuck using the query because I can't figure out how I can make it order it how I want

Satan
Reply With Quote
  #18  
Old 07-14-2005, 06:37 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thinking out loud. I would add each group and tag and legend order field to an array. I would sort the array based on the legendorder and then I would explode the whole thing out to the legend string.
Reply With Quote
  #19  
Old 07-14-2005, 06:38 PM
hotrod1 hotrod1 is offline
 
Join Date: Apr 2005
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack! Thanks
Reply With Quote
  #20  
Old 07-14-2005, 06:40 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hellsatan
Is there any way of making that display it based on a usergroup field?

Because I want it to display it by "legendorder" the field I created

I'm stuck using the query because I can't figure out how I can make it order it how I want

Satan
I'll give it a shot.

PHP Code:
// Get all usergroups that have style changes.

foreach ($vbulletin->usergroupcache AS $group)
{
    if (!
$group['opentag'] AND !$group['closetag']) {
        continue;
    }

    
$legend_array[$group['legendorder']] = $group['opentag'] . $group['title'] . $group['closetag'];
}
ksort($legend_arraySORT_NUMERIC);
$legend implode(" | "$legend_array); 
Reply With Quote
  #21  
Old 07-14-2005, 06:52 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll give it a try

It works well

Satan
Reply With Quote
Reply


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 07:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14606 seconds
  • Memory Usage 2,334KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_html
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete