View Full Version : Show the Usergroup AND Member Groups in postbit
Gary King
02-07-2004, 10:00 PM
This hack will show what usergroups and membergroups a user is a part of, in the postbit.
This is a very simple hack to install, will take only 1 minute or less :)
Screenshot attached below.
NOTE: There are modifications for both postbit and postbit_legacy templates!
Anyways let's get started! :D
Open includes/functions_showthread.php and find $show['messageicon'] = iif($post['iconpath'], true, false);
Above, add: $show[usergroup] = 1;
$show[member_groups] = 1;
$membergroupids = explode(',',$post[membergroupids]);
$membergroups = '';
foreach ($membergroupids as $group)
{
if ($membergroups == '')
{
$membergroups .= $usergroupcache[$group][title];
}
else
{
$membergroups .= ', '.$usergroupcache[$group][title];
}
}
Open postbit template and find: <if condition="$show['reputation']">$post[reputationdisplay]</if>
Below, add <if condition="$show[usergroup]"><br />$vbphrase[usergroup]: $post[displaygrouptitle]</if>
<if condition="$show[member_groups]"><br />$vbphrase[member_groups]: $membergroups</if>
And just add one new phrase, member_groups, with the following content:Member Groups
NOTE: If you are using postbit_legacy instead of postbit then add the new code for postbit, to wherever you want to show up in postbit_legacy, that's all!
Please click install if you installed this, thanks! :)
AN-net
02-08-2004, 04:59 AM
very cool hack ill install later;)
gmarik
02-08-2004, 07:07 AM
Not very cool just normal ...
Dean C
02-08-2004, 10:33 AM
Nice us of the cache :)
Gary King
02-08-2004, 01:04 PM
Nice us of the cache :)
Thanks I always try to use my resources ;) Saves me one query :D
Gary King
02-08-2004, 01:06 PM
Not very cool just normal ...
Eh? :p
Hialls
02-08-2004, 01:55 PM
Hmm just spent few hours yesterday coding this :D. Nice job all the same
Gary King
02-08-2004, 02:06 PM
Hmm just spent few hours yesterday coding this :D. Nice job all the same
Thanks :D
seth044_x
02-09-2004, 02:09 AM
weee my request!!! thanks man you rock.
Ocean
03-29-2004, 12:20 PM
Hi, Gary!
Same question.... <grin>
How's this hack for vB 3.0 Gold?
Also, which part needs to be surrounded by:
<if condition="is_member_of($bbuserinfo,6)">
<!-- code goes here -->
</if>
... in order to make this hack viewable by admins only?
Thanks, and again - Great Hack! (Hmm... I seem to keep saying this to you.... :) )
Gary King
03-29-2004, 07:11 PM
Hi, Gary!
Same question.... <grin>
How's this hack for vB 3.0 Gold?
Also, which part needs to be surrounded by:
<if condition="is_member_of($bbuserinfo,6)">
<!-- code goes here -->
</if>
... in order to make this hack viewable by admins only?
Thanks, and again - Great Hack! (Hmm... I seem to keep saying this to you.... :) )
Hack works perfectly for Gold, and put the conditionals around the code that you are required to add.
Ocean
03-29-2004, 07:34 PM
Hack works perfectly for Gold, and put the conditionals around the code that you are required to add.
In the postbit template, or the functions_showthread.php file?
Gary King
03-29-2004, 07:45 PM
In the postbit template, or the functions_showthread.php file?
<if condition=""></if> only goes in templates :)
Ocean
03-29-2004, 07:51 PM
<if condition=""></if> only goes in templates :)
Well that just shows what I know, doesn't it? But I learned something new, so for that - thank you. :)
Stray
03-31-2004, 12:38 AM
Could this be changed to show usergroup ranks or rank images?
I'd like to show multiple rank images in the postbit.
Ocean
04-14-2004, 12:05 AM
Gary, I just noticed something odd...
I have a bunch of users whom I Mass Moved into another UserGroup. However, although in the "User" Table, the "usergroupid" field shows the correct New Group - the "displaygroupid" field still has their old UserGroup.
Now, I don't know if this is what is supposed to happen or not - however, this hack seems to pull from the "displaygroupid" field, instead of the "usergroupid" field.
As such, a large number of users now show up with the wrong Group info in the Postbit!
Assuming that this is not a problem with vB (in other words, assuming that the "displaygroupid" field is *supposed* to show the old Group) - than what needs to be changed in this hack to reflect the correct field being used?
Gary King
04-14-2004, 12:56 PM
Replace $post[displaygrouptitle] with $usergroupcache[$post[usergroupid]][title]
Ocean
04-14-2004, 01:18 PM
Gary, I tried the replacement you suggested, and I got a Parse Error.
Parse error: parse error, unexpected '[', expecting ']' in C:\WebSite\forums\includes\adminfunctions_template .php(3037) : eval()'d code on line 74
Gary King
04-14-2004, 11:42 PM
In the includes/functions_showthread.php find $show['messageicon'] = iif($post['iconpath'], true, false); Above, add $usergroupname = $usergroupcache[$post[usergroupid]][title];
Then put $usergroupname in the postbit template wherever you want the usergroup to showu p.
Ocean
04-15-2004, 12:47 AM
Thanks, Gary! That did the trick perfectly!
Caiman
08-16-2004, 11:28 AM
Could this be changed to show usergroup ranks or rank images?
I'd like to show multiple rank images in the postbit.
Works great, clicked install. Thanks!
Caiman
08-16-2004, 11:36 AM
Hope you're still around Gary :) Would it be possible for the usergroups to be displayed with the colour assigned to them too?
forumsoup.com
02-07-2006, 07:30 PM
Does this work on 3.5.3? Open includes/functions_showthread.php? I dont have a functions_showthread.php.
JohnBee
02-09-2007, 12:56 PM
I love this modification! any chance it would be coded for 3.6.4?
ShannonRawls
05-04-2007, 02:37 PM
I would like this mod for 3.6.4 as well.
Hamednet
11-18-2007, 07:54 AM
thanks
How do I this ?
https://vborg.vbsupport.ru/external/2007/11/16.gif
Hamednet
11-22-2007, 05:29 PM
no body ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.