The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
hiding post counts
i was wondering if there was anything that i could hide post counts from certain user groups
|
#2
|
||||
|
||||
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. |
#3
|
|||
|
|||
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.
|
#4
|
||||
|
||||
You should use the following:
Code:
<if condition="!is_member_of($bbuserinfo, 1,2,3,4)">$post[posts]</if> |
#5
|
|||
|
|||
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.
|
#6
|
||||
|
||||
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.
|
#7
|
|||
|
|||
which template should i add this too and where abouts
|
#8
|
||||
|
||||
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]. |
#9
|
|||
|
|||
thanks
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|