The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Hide something from specified Usergroups
I'm sure it is quick and easy, but I'm no programmer.
I am running Adsense ads in my templates with just the straight Google code. I want to just put a couple variables around the ad script so it does not show to certain usergroups, can someone help? |
#2
|
||||
|
||||
To remove your Adsense from the view of certain usergroups, you can simply use a conditional in your templates. Just place this around your code you wish to remove from the view of your usergroups....
HTML Code:
<if condition="!is_member_of($vbulletin->userinfo, 1, 2, 3)"></if> |
#3
|
||||
|
||||
Trying to use a slight modification of this for the code block template
I have: Code:
<if condition="is_member_of($vbulletin->userinfo, 2, 5, 6, 7)"> is member </if> <if condition="!is_member_of($vbulletin->userinfo, 2, 5, 6, 7)"> is not member </if> Also tried this Code:
<if condition="is_member_of($vbulletin->userinfo, 2, 5, 6, 7)"> is member <else /> is not member </if> Code:
<if condition="is_member_of($bbuserinfo, 2, 5, 6, 7)"> is member <else /> is not member </if> Problem is that guests still see "is member". or registered users see is_not_member (depends on which one) guests are not logged in and should be group 1 and thus should hit the second if clause. registered and logged in should be group 2 and hit first one. any ideas? |
#4
|
|||
|
|||
You could try
Code:
<if condition="$show['member']"> is member <else /> is not member </if> Code:
<if condition="$show['guest']"> is not member <else /> is member </if> Not sure why your code isn't working. I'm tired though. You could also try this: Code:
<if condition="is_member_of($bbuserinfo, 2, 5, 6, 7)"> is member <else /> <if condition="is_member_of($bbuserinfo, 1)"> is not member </if> </if> |
#5
|
||||
|
||||
Very cool, I will try tonight.
Thank You all for the help. Matt |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|