Quote:
Originally Posted by TitanJeff
Here's what I added:
<!-- / post #$post[postid] -->
<if condition="is_member_of($bbuserinfo,array(2,5,6,7) )">
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
My goal is for groups 2,5,6,7 to not see the ads.
Where did I goof? Thanks.
|
Did you add an other </if> to close the statement?
You're logic would also only show it to users that are in groups 2,5,6,7. If you want to stop them from seeing it I suggest you use the template code listed in my first post with the following change:
instead of
PHP Code:
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
use
PHP Code:
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && ! is_member_of($bbuserinfo,array(2,5,6,7))">
This will mean the ad is not shown to groups 2,5,6 and 7.
If you wanted to do the opposite and only show it to groups 2,5,6 and 7 then you should remove the ! like:
PHP Code:
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && is_member_of($bbuserinfo,array(2,5,6,7))">
No other changes to the template will be necessary