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)
-   -   Custom Moderator Titles (https://vborg.vbsupport.ru/showthread.php?t=44744)

TECK 10-18-2002 10:00 PM

Custom Moderator Titles
 
This goes for my friend Danny (LeeCHeSSS) who asked me to make it for him.
Basically is a very simple hack to change the user title for each mod in function of the numer of posts, the same way like a regular user.

I wanted first to make it admin CP based, but that would involve new fields added to database, several files hacked, etc.
Why do all this when we can do it in less then 20seconds with a simple file edit? ;)

functions.php
FIND:
Code:

    $post[joindate]=vbdate($registereddateformat,$post[joindate]);
REPLACE WITH:
Code:

    if ( $post[usertitle] == 'Moderator' )
    {
      $post[usertitle] = 'Expert Moderator';

      if ( $post[posts] < 30 )
      {
        $post[usertitle] = 'Junior Moderator';
      }
      elseif ( $post[posts] < 100 )
      {
        $post[usertitle] = 'Regular Moderator';
      }
      elseif ( $post[posts] < 300 )
      {
        $post[usertitle] = 'Senior Moderator';
      }
    }

    $post[joindate]=vbdate($registereddateformat,$post[joindate]);

It's as simple as this. :)
Customize your titles the way you want. You can it do the same way with Super Mods and Admins. Is up to you how to have fun with it.

You could also use:
Code:

    if ( $post[usertitle] == 'Moderator' )
    {
      $post[usertitle] = 'Sleeps With The Monitor Moderator';

      if ( $postsperday < 5 )
      {
        $post[usertitle] = 'Sleepy Moderator';
      }
      elseif ( $postsperday < 15 )
      {
        $post[usertitle] = 'Alert Moderator';
      }
      elseif ( $postsperday < 30 )
      {
        $post[usertitle] = 'Super Alert Moderator';
      }
    }

    $post[joindate]=vbdate($registereddateformat,$post[joindate]);

Just another way to write it, the code, not using the ELSE condition and saving another few lines of code.
That will change the name of your moderators in function of how many posts per day they make.
The more posts per days they make, the better it will be their title and the members will count more on their support.

TECK 10-19-2002 03:19 AM

btw, that's the new way the vBulletin 3 code is written. :)

Vile 10-19-2002 05:08 AM

Cool idea, thanks :)
Installed.

N9ne 10-19-2002 08:01 AM

It says postsperday...? Doesn't that mean posts per day?

TECK 10-19-2002 09:15 AM

ya. :)

John 10-19-2002 10:04 AM

Nice :D

You're a good lad, teck ;)

Neo 10-19-2002 10:50 AM

Quote:

Originally posted by TECK
btw, that's the new way the vBulletin 3 code is written. :)
Since when :bunny:

N9ne 10-19-2002 11:13 AM

So TECK, if it means postsperday, it will go by how many posts the moderator posts for that day? I'm confused...

Bison 10-19-2002 01:33 PM

Nice hack ... but here's how I set it up on my forum:

// Custom Moderator Titles
if ( $post[usertitle] == 'Moderator' )
{
if ( $post[posts] > 30 and $post[posts] < 100 )
{
$post[usertitle] = 'Junior Moderator';
}
elseif ( $post[posts] == 100 and $post[posts] < 301 )
{
$post[usertitle] = 'Special Moderator';
}
elseif ( $post[posts] > 300 )
{
$post[usertitle] = 'Expert Moderator';
}
}
// End Custom Moderator Titles

Velocd 10-19-2002 04:24 PM

This is pretty basic, but useful. ;) I do this with mine as well, using one of my very earlier hacks.
Quote:

Quote:

btw, that's the new way the vBulletin 3 code is written.
Since when
I also agree, it looks like regular basic code, Teck... ~_~
:p


All times are GMT. The time now is 04:30 PM.

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.01417 seconds
  • Memory Usage 1,744KB
  • 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
  • (3)bbcode_code_printable
  • (3)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