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>
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.
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.
You can find out the # assigned to each usergroup in Usergroups > Usergroup Manager. You'll see the "id=#" for each group in the dropdowns. What I'm not sure about is what the syntax is to say...
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.
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>