The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Want to display ads, but not for mods or subscribers?
I wanted to add a Google AdSense ad after the first post in every thread...but didn't want Mods, Admins or Subscribers to have to see it. Can this be done? This is the code in the postbit for displaying it to all users after the first post in each thread...
Code:
<if condition="$post['postid'] == $thread['firstpostid']"> Your Adsense Code Goes Here </if> |
#2
|
|||
|
|||
i would also like to see somthing like this
|
#3
|
||||
|
||||
Just add conditions for the usergroups you want to exclude (or include).
|
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
Yeah I'm also wondering about this. What if I have a usergroup called "Premium Users" and I don't want them to view ads? This can be done using some simple "if" functions, but I don't know how to identify what usergroup a user is in.
|
#6
|
|||
|
|||
Quote:
If this is the first post in a thread and if user is not part of user groups 1, 2, 3 or 4....display this. |
#7
|
|||
|
|||
I managed to figure it out...this displays to all the groups except for those listed:
Code:
<if condition="$post['postid'] == $thread['firstpostid']"> <if condition="($bbuserinfo[usergroupid]!=5 AND $bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=7 AND $bbuserinfo[usergroupid]!=10)"> Ad code goes here </if> </if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|