![]() |
hiding post counts
i was wondering if there was anything that i could hide post counts from certain user groups
|
Use template conditionals:
<if condition="!in_array($post['usergroup'], array(5,6,7,8,9))"> $post[posts] </if> I'm not sure the $post['usergroup'] is correct, but it is the basic structure that you would need to handle the check. |
If you want to hide it from certain user groups I think you need to use $vbulletin->userinfo[usergroupid] as opposed to the checking the usergroup of whoever wrote the post.
|
You should use the following:
Code:
<if condition="!is_member_of($bbuserinfo, 1,2,3,4)">$post[posts]</if> |
If he is using it in a template are they allowed? (the apostrophes) or doesn't make much difference, I remember reading somewhere that it should be avoided in templates.
|
I think in templates it's better to not quote the array key, because they're stripped out when the template is stored, but don't quote me on that.
|
which template should i add this too and where abouts
|
It depends; if you'd like the Post count hidden only from the Postbit, then you'd edit the postbit or postbit_legacy template (depending on which your forum uses). Post counts are also displayed on User Profiles (MEMBERINFO template) and the Member List (memberlist_resultsbit template).
In the postbit templates you're looking for $post[posts] and in the MEMBERINFO and memberlist_resultsbit templates, you're looking for $userinfo[posts]. |
thanks
|
All times are GMT. The time now is 03:06 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|