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*

Darth Cow 09-29-2002 08:28 PM

Quote:

Originally posted by FeDe
Any news with it :D? *is really hoping to be able to use this hack*
Ok, my webmaster has been very busy and not around much for the past couple of weeks. If someone could email me the new member.php file (darth.cow@mindspring.com) it would be appreciated :).

desmondw 11-17-2002 06:05 AM

It stuffed my User CP page up, and I'm using 2.2.8 :confused:

Darth Cow 11-17-2002 05:28 PM

Quote:

Originally posted by desmondw
It stuffed my User CP page up, and I'm using 2.2.8 :confused:
What do you mean? How did it stuff it up? I just tried installing this hack on a fresh install of 2.2.8, and it worked just fine... :paranoid:

#01 12-10-2002 10:08 AM

Would this hack make it so I could set permissions for the mod in a different usergrop. But still let them have the moderator Status shown under their name?

Darth Cow 12-10-2002 10:02 PM

Quote:

Originally posted by #01
Would this hack make it so I could set permissions for the mod in a different usergrop. But still let them have the moderator Status shown under their name?
You'll need to set the default tag for your group to be "Moderator" (with whatever markup you choose), and this tag will added the custom title on underneath. I just updated the hack a bit so that it can be customized easier :). Just edit in the new usergroup of your moderators (e.g. change "$keepgrouptitle = array(5, 6, 7);" to "$keepgrouptitle = array(5, 6, 7, 20);" if 20 is the user group id of your new moderator group (or another group that you want to keep their default title in addition).

Logikos 01-17-2003 09:13 AM

I have been looking EVERYWHERE for this hack

Thank you so very much!

*CLicks Install*

-Nem :D

Zelda-King 02-18-2003 10:15 AM

That's great! I actually switched it round though so the custom title shows above the usergroup title. Just change
Code:

$customtext = $usertitle . '<br />' . $customtext;
to
Code:

$customtext = $customtext . '<br />' . $usertitle;

The Red Devil 03-08-2003 02:13 PM

Ive tried to install this on 2.3.0 but I cant see that it makes any changes there. As its just as before.
Dont this hack work with 2.3.0 ?

Darth Cow 03-09-2003 12:20 AM

If you find the same piece of code in 2.3.0, the hack should work fine. Even though I have not yet had the chance to test this on 2.3.0, the base code for vBulletin changes very little with new non-major releases (and I highly doubt that it would change in this area).

catocom2 03-18-2003 06:08 PM

I tried it on 2.3.0 too, and something seems to
cancel it out.
I'm still looking around in there to see if I can see
what is resetting it.

Logikos 03-19-2003 08:35 PM

Im not using this anymore. To many bugs. I made my own.


All times are GMT. The time now is 04:47 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.01096 seconds
  • Memory Usage 1,768KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete