vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Moderator Icon on postbit (https://vborg.vbsupport.ru/showthread.php?t=38120)

Dark Odin 05-03-2002 07:03 PM

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. :)

Scott MacVicar 05-03-2002 09:22 PM

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

Dark Odin 05-03-2002 09:38 PM

Spiffy. Thanks!

lichtflits 06-05-2002 07:08 PM

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 :paranoid: :nervous:


i attached an screenshot, maybe you understand dat :laugh:

Chris M 06-05-2002 07:32 PM

Oh...

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

Satan

rascal 06-06-2002 12:32 AM

Good Job and thanks for sharing!

Boofo 06-07-2002 09:12 AM

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


Boofo 06-07-2002 09:25 AM

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


Martin64 07-16-2002 11:53 PM

Installed and works great - exactly what I wanted. Thanks :)

PHiXTiT 09-13-2002 03:45 AM

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! ;)


All times are GMT. The time now is 06:17 AM.

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.01184 seconds
  • Memory Usage 1,771KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete