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)
-   -   Keep User Group title for Moderators with a Custom Tag (https://vborg.vbsupport.ru/showthread.php?t=41394)

Darth Cow 07-21-2002 10:00 PM

Keep User Group title for Moderators with a Custom Tag
 
On my forums, we give out a custom title at 3000 posts, so it's quite an acomplishment. Of course, the moderators want this too, even though they have to keep their "Moderator" or "Super Moderator" tags as well. Previously we were doing this through the admin panel, but that got a bit tidious, so I did a quick hack that will add moderator custom tags after the "Moderator" bit.

Install time: About 2 minutes - just one file edit :)

In member.php, after:
PHP Code:

$customtext substr($customtext0$ctMaxChars);
        
$customtext censortext($customtext);
        if (!
ismoderator() or (ismoderator() and $ctCensorMod==0)) {
          
$customtext customcensortext($customtext);
        } 

Add:
PHP Code:

// Keep user group titles in addition to custom tags for mods
        // Add a user group id to the array definition below to make
        // this hack apply to that group as well:
        
$keepgrouptitle = array(567);
        if (
in_array($bbuserinfo['usergroupid'], $keepgrouptitle)) {
          
$group $DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]");
          
$usertitle $group['usertitle'];
          
$customtext $usertitle '<br />' $customtext;
          
$customtitle 1;
        }
// Keep user group titles in addition to custom tags for mods 

Yep, that's it :). Let me know if there are any issues, trouble, ect.

Note: This will enble HTML for moderators in custom tags as well, but you can trust them not to use it. Right? :paranoid:

If you use this hack, please hit the "Install" button on this thread so I know :).

The latest version is merely a slight modification of the original, to allow for easier addition of user groups. Feel no need to upgrade, it doesn't actually change how the hack works except make it easier to modify.

Chris M 07-22-2002 07:49 PM

Any Screenshots?

Satan

Darth Cow 07-22-2002 08:17 PM

Quote:

Originally posted by hellsatan
Any Screenshots?

Satan

Well, what do you want? It's pretty simple - it'll just take your default moderator tag, then add a line break and the user's custom tag. In Edit Profile under custom tag, they'll see something like this under their current tag:

Moderator
My Custom Tag!

Does that answer your question?

Chris M 07-22-2002 08:45 PM

Oh ok...

It just sounded more complicated than it actually is...

Thanks:) Great hack!

Satan

Mephisteus 07-22-2002 11:25 PM

Quote:

Originally posted by Darth Cow
Note: This will enble HTML for moderators in custom tags as well, but you can trust them not to use it. Right?
I trust on it that my mods don't know html :p nice hack :)

Dark Shogun 09-17-2002 02:07 PM

Doesn't seem to work for me. Does this work with 2.2.7 because I installed the code correctly.

Dark Shogun

Feanor 09-17-2002 09:06 PM

It doesn't work for me either, I'm also on 2.2.7 :(

Darth Cow 09-18-2002 01:18 AM

I'll have to get back to you guys on this one - we're running 2.2.6, and I'm not the one who owns the license (that's the other webmaster), so I haven't had a look at the source code for 2.2.7 yet. I'll see if he can send it over to me though :).

kmfdm_kid2000 09-18-2002 05:25 AM

I did this an easier way, just make a custom profile field only Admin Edittable for the Moderator Rank, and put that above the user title in the post bit template...Same idea I guess, and Mods can still edit their titles as well...

FeDe 09-29-2002 12:22 AM

Quote:

Originally posted by Darth Cow
I'll have to get back to you guys on this one - we're running 2.2.6, and I'm not the one who owns the license (that's the other webmaster), so I haven't had a look at the source code for 2.2.7 yet. I'll see if he can send it over to me though :).
Any news with it :D? *is really hoping to be able to use this hack*


All times are GMT. The time now is 08:25 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.01106 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_php_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