Version: 1.00, by Darth Cow
Developer Last Online: Feb 2008
Version: 2.2.x
Rating:
Released: 07-21-2002
Last Update: Never
Installs: 43
No support by the author.
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($customtext, 0, $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(5, 6, 7);
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? aranoid:
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.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Originally posted by FeDe Any news with it ? *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 .
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?
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).
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).