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
  #12  
Old 10-07-2002, 08:59 AM
Vivi Ornitier's Avatar
Vivi Ornitier Vivi Ornitier is offline
 
Join Date: Nov 2001
Location: Black Mage Village
Posts: 442
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice hack there.
  #13  
Old 10-09-2002, 08:47 PM
anuj's Avatar
anuj anuj is offline
 
Join Date: Sep 2002
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Props. I've been trying to find/do this for a while.
  #14  
Old 02-11-2003, 09:33 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there any way to make this so normal users don't just have an empty space? i know i could use the original title, but is there a way to have one less row on normal users posts? hope someone can understand that.

so on a mod or admins postbit it would show:

Name
Admin
Custom Title
Avatar

but on a normal users postbit, instead of showing what it shows now:

Name

Custom Title
Avatar

it would show:

Name
Custom Title
Avatar

?? any ideas? thanks.
  #15  
Old 02-12-2003, 12:23 PM
TranceMaster TranceMaster is offline
 
Join Date: Mar 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice
thanks man
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 11:16 AM.


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.05505 seconds
  • Memory Usage 2,244KB
  • Queries Executed 21 (?)
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
  • (3)bbcode_php
  • (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
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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