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

Reply
 
Thread Tools
Moderator Icon on postbit Details »»
Moderator Icon on postbit
Version: 1.00, by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-30-2002 Last Update: Never Installs: 13
 
No support by the author.

This is a hack to show a small icon next to usernames on a post, when you mouse over you will also get told what rank they are, Admin, Super Mod or Moderator.

Add the following template
postbit_moderator_icon
Code:
<img src="{imagesfolder}/mod.gif" alt="$rank">
save the template

Edit the postbit template and place $mod_logo somewhere on it, i chose next to the username.

open up functions.php

look for

PHP Code:
        // do posts from ignored users
        
if (!$ignore[$post[userid]]) { 
ABOVE it put

PHP Code:
        switch($post['usergroupid']) {
          case 
"6";
          
$rank "Administrator";
          eval(
"\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
          break;

          case 
"5";
          
$rank "Super Moderator";
          eval(
"\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
          break;

          case 
"7";
          
$rank "Moderator";
          eval(
"\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
          break;

          default:
          
$mod_logo "";
          break;
        } 
save and upload functions.php

The hack will now work, but if you want to save on the extra query to the database to get the template.

Open showthread.php and add

PHP Code:
,postbit_moderator_icon 
to the end of $templatesused you will have to do this twice.

attached is the mod logo i used

Show Your Support

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

Comments
  #22  
Old 05-03-2002, 07:03 PM
Dark Odin Dark Odin is offline
 
Join Date: Jan 2002
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm, usertitle not username, and I only want the title to be bold if they are a moderator, super moderator, or administrator. I could do all the other suggestions myself.
Reply With Quote
  #23  
Old 05-03-2002, 09:22 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
switch($post['usergroupid']) {
          case 
"6";
          
$rank "Administrator";
          
$post[usertitle] = "<b>$post[usertitle]</b>";
          break;

          case 
"5";
          
$rank "Super Moderator";
          
$post[usertitle] = "<b>$post[usertitle]</b>";
          break;

          case 
"7";
          
$rank "Moderator";
          
$post[usertitle] = "<b>$post[usertitle]</b>";
          break;

          default:
          
$rank "";
          break;
        } 
use that code in your getpostbit function in /admin/functions.php
Reply With Quote
  #24  
Old 05-03-2002, 09:38 PM
Dark Odin Dark Odin is offline
 
Join Date: Jan 2002
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Spiffy. Thanks!
Reply With Quote
  #25  
Old 06-05-2002, 07:08 PM
lichtflits's Avatar
lichtflits lichtflits is offline
 
Join Date: Feb 2002
Location: The Netherlands
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it posibel to show the icon to "thread starter" and "last post" colom when it was a moderator that posts the post?

eeuh does anybody understand this, pff what is my englsich bad aranoid: :nervous:


i attached an screenshot, maybe you understand dat :laugh:
Reply With Quote
  #26  
Old 06-05-2002, 07:32 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

Oh...

You mean you want the icon in the Last Post column if they are a Mod?

Satan
Reply With Quote
  #27  
Old 06-06-2002, 12:32 AM
rascal rascal is offline
 
Join Date: Feb 2002
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good Job and thanks for sharing!
Reply With Quote
  #28  
Old 06-07-2002, 09:12 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Scott,

What do I need to do to have this in the privmsg template for private messages too?


Quote:
Originally posted by PPN
This is a hack to show a small icon next to usernames on a post, when you mouse over you will also get told what rank they are, Admin, Super Mod or Moderator.

Add the following template
postbit_moderator_icon
Code:
<img src="{imagesfolder}/mod.gif" alt="$rank">
save the template

Edit the postbit template and place $mod_logo somewhere on it, i chose next to the username.

open up functions.php

look for

PHP Code:
        // do posts from ignored users
        
if (!$ignore[$post[userid]]) { 
ABOVE it put

PHP Code:
        switch($post['usergroupid']) {
          case 
"6";
          
$rank "Administrator";
          eval(
"\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
          break;

          case 
"5";
          
$rank "Super Moderator";
          eval(
"\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
          break;

          case 
"7";
          
$rank "Moderator";
          eval(
"\$mod_logo = \"".gettemplate("postbit_moderator_icon")."\";");
          break;

          default:
          
$mod_logo "";
          break;
        } 
save and upload functions.php

The hack will now work, but if you want to save on the extra query to the database to get the template.

Open showthread.php and add

PHP Code:
,postbit_moderator_icon 
to the end of $templatesused you will have to do this twice.

attached is the mod logo i used
Reply With Quote
  #29  
Old 06-07-2002, 09:25 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where exactly would you add this in the getpostbit function?

Quote:
Originally posted by PPN
PHP Code:
switch($post['usergroupid']) {
          case 
"6";
          
$rank "Administrator";
          
$post[usertitle] = "<b>$post[usertitle]</b>";
          break;

          case 
"5";
          
$rank "Super Moderator";
          
$post[usertitle] = "<b>$post[usertitle]</b>";
          break;

          case 
"7";
          
$rank "Moderator";
          
$post[usertitle] = "<b>$post[usertitle]</b>";
          break;

          default:
          
$rank "";
          break;
        } 
use that code in your getpostbit function in /admin/functions.php
Reply With Quote
  #30  
Old 07-16-2002, 11:53 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and works great - exactly what I wanted. Thanks
Reply With Quote
  #31  
Old 09-13-2002, 03:45 AM
PHiXTiT PHiXTiT is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack! (5 Stars)

I have modified this to add 3 different .gif files for each user group.

Mod, SuperMod, and Admin.

You can use your own .gif files or use the ones included.

All credit goes out to PPN!
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 03:17 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.05948 seconds
  • Memory Usage 2,345KB
  • 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
  • (2)bbcode_code
  • (8)bbcode_php
  • (2)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
  • (2)pagenav_pagelink
  • (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_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