Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Closed Thread
 
Thread Tools
Show usergroup for staff members in postbit Details »»
Show usergroup for staff members in postbit
Version: 1.00, by Velocd Velocd is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-14-2002 Last Update: Never Installs: 10
 
No support by the author.

File Edits: 1 (functions.php)
Install time: 4 minutes

A very easy hack, so easy I hope it hasn't been released before.

Basically it will allow staff members to have their usergroup shown in the postbit. I always once in awhile get a question asked of who is the administrator or who are the moderators, because there are other people on the forum, other than just the staff members, who use custom titles. For example, I have a member who has been on the forum for about 2 months just found out one of the members is a super moderator :dead:

If you want also, you can have it display a small icon for the staff member instead. :ninja:


---------- Installation ----------

1. In functions.php find
PHP Code:
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]); 
And below it place:
PHP Code:
if($post[usergroupid] == 6) { $poststaff "Administrator<br>"; }
    else if(
$post[usergroupid] == 7) { $poststaff "Moderator<br>"; }
    else if(
$post[usergroupid] == 5) { $poststaff "Super Moderator<br>"; } 
Make sure that the usergroupid and $poststaff value correspond to the correct usergroup.

1b. If you want to use an icon, use the following code instead in functions.php:
PHP Code:
if ($post[usergroupid] == "6") { $poststaff="[<img src=\"https://vborg.vbsupport.ru/images/adminicon.gif\" alt=\"Administrator\">]";}
   else if (
$post[usergroupid] == "5") { $poststaff="[<img src=\"https://vborg.vbsupport.ru/images/smodicon.gif\" alt=\"Super Moderator\">]";}
   else if (
$post[usergroupid] == "7") { $poststaff="[<img src=\"https://vborg.vbsupport.ru/images/modicon.gif\" alt=\"Moderator\">]";} 
Once again make sure to replace the correct values. Also you will need to create the 3 icons and place them in your images folder. (heh heh, I inputted {*imagesfolder} and it was parsed into https://vborg.vbsupport.ru/images/modicon.gif" Didn't know that could happen here..) Be sure to replace that URL with your gif url.

2. Now in the postbit template, place $poststaff where ever you like. I have mine right above $post[usertitle]. But if you use an icon, I would place it to the right of the username.

Well that's it! Now check out this cool banana guy--> :banana:

Show Your Support

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

Comments
  #2  
Old 07-15-2002, 03:37 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A picture for those deprived of one:
  #3  
Old 07-15-2002, 03:49 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this was done by someone else, if i'm correct.
  #4  
Old 07-15-2002, 03:52 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

let's just pretend that "other" hack never existed *evil grin*

ps: thnx
  #5  
Old 07-15-2002, 04:40 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is another small add-on, to enhance things somewhat..

If you want your users with customtitles to have their original status displayed above, you can do this:

Replace the ENTIRE code I posted above (the non-icon one) in functions.php, with the following:

PHP Code:
if($post[usergroupid] == 6) { $postgroup "<b>Administrator</b><br>"; }
    else if(
$post[usergroupid] == 7) { $postgroup "<b>Moderator</b><br>"; }
    else if(
$post[usergroupid] == 5) { $postgroup "<b>Super Moderator</b><br>"; }
    
    else if(
$post[usergroupid] == 2)
    {
      if(
$post[posts] >= 700) { $postgroup "User group name<br>"; }
    } 
Where you see the numeric value 700, you need to replace that with the least amount of posts your users can have before they are allowed a custom title.

Then where you see user group name, fill that with the highest usergroup name allowed right before a custom title. For example on these forums if you were allowed a custom title reaching some high amount of posts like 1500, the previous title would be Ultimate Hacker.


Now say your forum allows custom titles from the very start, but you still want to display the usergroup titles. This is easy, but requires a small amount of code to add.

Right below
PHP Code:
if($post[posts] >= 700) { $postgroup "User group name<br>"; } 
just add the amount of levels you have using IF-THEN, and fill them in with the appropriate values, for example:
PHP Code:
else if($post[posts] >= 500) { $postgroup "Ultimate Member<br>"; }
else if(
$post[posts] >= 300) { $postgroup "Master Member<br>"; }
else if(
$post[posts] >= 150) { $postgroup "Cool Member<br>"; }
else if(
$post[posts] >= 50) { $postgroup "Okay Member<br>"; }
else if(
$post[posts] >= 0) { $postgroup "Newby<br>"; } 
Now in the postbit replace, if needed, $poststaff with $postgroup. I'm sure there is a much cleaner way of doing it, but oh well. This will suit fine for now..
  #6  
Old 07-15-2002, 03:00 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

as i know, there are more than just 1 hack which actually do this, we should merge them all

Quote:
who use custom titles. For example, I have a member who has been on the forum for about 2 months just found out one of the members is a super moderator
isn't there an option in the ACP, to disallow some titles?
  #7  
Old 07-15-2002, 03:04 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Disallow some titles? I'm not sure I'm following you there. There is an option in the AdminCp that allows you to prevent users from using certain words in their custom titles..and I think that's about it...
  #8  
Old 07-15-2002, 03:55 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, that was what i meant

damn, english skills become bader with every hour you go to university and have to work ^^

but now, i see what you meant *gg*
you meant a supermod has definied a title so nobody could see it's a supermod right?
  #9  
Old 07-15-2002, 05:18 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this hack is great and SOOOO simple to do... its exactly what i want

thanks velocd
  #10  
Old 07-15-2002, 05:36 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Xenon
you meant a supermod has definied a title so nobody could see it's a supermod right?
yeah, he has defined a custom title that overwrited his original "supermod" status in the postbit, so unless you checked out that "forum leaders" page (which nobody does, seen here), or his profile I suppose, you wouldn't have known he was a super moderator.

Quote:
Originally posted by Mist
this hack is great and SOOOO simple to do... its exactly what i want

thanks velocd
np
Closed Thread

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 07:40 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.08764 seconds
  • Memory Usage 2,315KB
  • Queries Executed 23 (?)
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
  • (6)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
  • (1)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete