PDA

View Full Version : Show usergroup for staff members in postbit


Velocd
15 Jul 2002, 04:16
File Edits: 1 (functions.php)
Install time: 4 minutes

A very easy hack, so easy I hope it hasn't been released before. :p

Basically it will allow staff members to have their usergroup shown in the postbit. I always once in awhile get a question asked of who is the administrator or who are the moderators, because there are other people on the forum, other than just the staff members, who use custom titles. For example, I have a member who has been on the forum for about 2 months just found out one of the members is a super moderator :dead:

If you want also, you can have it display a small icon for the staff member instead. :ninja:


---------- Installation ----------

1. In functions.php find


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



And below it place:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Make sure that the usergroupid and $poststaff value correspond to the correct usergroup.

1b. If you want to use an icon, use the following code instead in functions.php:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Once again make sure to replace the correct values. Also you will need to create the 3 icons and place them in your images folder. (heh heh, I inputted {*imagesfolder} and it was parsed into http://www.vbulletin.org/forum/images/modicon.gif" Didn't know that could happen here..) Be sure to replace that URL with your gif url.

2. Now in the postbit template, place $poststaff where ever you like. I have mine right above $post[usertitle]. But if you use an icon, I would place it to the right of the username.

Well that's it! Now check out this cool banana guy--> :banana:

Velocd
15 Jul 2002, 04:37
A picture for those deprived of one:
:p

TECK
15 Jul 2002, 04:49
this was done by someone else, if i'm correct.

Velocd
15 Jul 2002, 04:52
let's just pretend that "other" hack never existed :) *evil grin*

ps: thnx

Velocd
15 Jul 2002, 05:40
Here is another small add-on, to enhance things somewhat..

If you want your users with customtitles to have their original status displayed above, you can do this:

Replace the ENTIRE code I posted above (the non-icon one) in functions.php, with the following:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Where you see the numeric value 700, you need to replace that with the least amount of posts your users can have before they are allowed a custom title.

Then where you see user group name, fill that with the highest usergroup name allowed right before a custom title. For example on these forums if you were allowed a custom title reaching some high amount of posts like 1500, the previous title would be Ultimate Hacker.


Now say your forum allows custom titles from the very start, but you still want to display the usergroup titles. This is easy, but requires a small amount of code to add.

Right below


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



just add the amount of levels you have using IF-THEN, and fill them in with the appropriate values, for example:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Now in the postbit replace, if needed, $poststaff with $postgroup. I'm sure there is a much cleaner way of doing it, but oh well. This will suit fine for now..

Xenon
15 Jul 2002, 16:00
as i know, there are more than just 1 hack which actually do this, we should merge them all ;)

who use custom titles. For example, I have a member who has been on the forum for about 2 months just found out one of the members is a super moderator
isn't there an option in the ACP, to disallow some titles? ;)

Velocd
15 Jul 2002, 16:04
Disallow some titles? I'm not sure I'm following you there. There is an option in the AdminCp that allows you to prevent users from using certain words in their custom titles..and I think that's about it...

Xenon
15 Jul 2002, 16:55
yes, that was what i meant ;)

damn, english skills become bader with every hour you go to university and have to work ^^

but now, i see what you meant *gg*
you meant a supermod has definied a title so nobody could see it's a supermod right? ;)

Dean C
15 Jul 2002, 18:18
this hack is great and SOOOO simple to do... its exactly what i want :D

thanks velocd

Velocd
15 Jul 2002, 18:36
Originally posted by Xenon
you meant a supermod has definied a title so nobody could see it's a supermod right? ;)

yeah, he has defined a custom title that overwrited his original "supermod" status in the postbit, so unless you checked out that "forum leaders" page (which nobody does, seen here (http://www.vbulletin.org/forum/showgroups.php?s=)), or his profile I suppose, you wouldn't have known he was a super moderator.

Originally posted by Mist
this hack is great and SOOOO simple to do... its exactly what i want :D

thanks velocd

np :)

Vivi Ornitier
07 Oct 2002, 09:59
:) Very nice hack there.

anuj
09 Oct 2002, 21:47
Props. I've been trying to find/do this for a while.

007
11 Feb 2003, 22:33
is there any way to make this so normal users don't just have an empty space? i know i could use the original title, but is there a way to have one less row on normal users posts? hope someone can understand that.

so on a mod or admins postbit it would show:

Name
Admin
Custom Title
Avatar

but on a normal users postbit, instead of showing what it shows now:

Name

Custom Title
Avatar

it would show:

Name
Custom Title
Avatar

?? any ideas? thanks.

TranceMaster
12 Feb 2003, 13:23
very nice
thanks man :)