Log in

View Full Version : 2 if condition ih postbit legacy adsense


croportal
04-24-2007, 02:58 PM
<if condition="((($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax'])) and $foruminfo['forumid'] != 69">
<div align="center">
<!-- START: Google Code -->
<script type="text/javascript"><!--
google_ad_client =
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-04-24: forumdisplay_728
google_ad_channel =
google_color_border = "B4D0DC";
google_color_bg = "ECF8FF";
google_color_link = "0000CC";
google_color_text = "6F6F6F";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- END: Google Code -->
</div></if>

anybody knwos why this not working

2 if is the problem

when i put just this <if condition="$foruminfo['forumid'] != 69"> it works, adsense are not shown in that forum

but when i put this <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
<if condition="$foruminfo['forumid'] != 69">

not working?

EnIgMa1234
04-24-2007, 03:13 PM
i can see one error.

<if condition="((($post[postcount]==1)
to
<if condition="(($post[postcount]==1)

croportal
04-24-2007, 03:17 PM
still doesnt work?

dxguru
04-24-2007, 03:36 PM
Try this ...

<if condition="((($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax'])) and $foruminfo['forumid'] != 69)">

croportal
04-24-2007, 03:41 PM
not working?
<if condition="((($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax'])) and $foruminfo['forumid'] != 69)">
<div align="center">
<!-- START: Google Code -->
<script type="text/javascript"><!--
google_ad_client = *******
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-04-24: forumdisplay_728
google_ad_channel = "2541613169";
google_color_border = "B4D0DC";
google_color_bg = "ECF8FF";
google_color_link = "0000CC";
google_color_text = "6F6F6F";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- END: Google Code -->
</div></if></if>

dxguru
04-24-2007, 03:55 PM
Could be the double </if> at the end?

If that still doesn't work, try building it up slowly until it fails ...

<if condition="$post[postcount]==1> should show after the first post in all forums

<if condition="$post[postcount]==1 and $foruminfo['forumid'] != 69"> should show after the first post in all BUT forum 69

<if condition="($post[postcount]==1 or $post[islastshown])"> should show after the first and last post in all forums

<if condition="($post[postcount]==1 or $post[islastshown]) and $foruminfo['forumid'] != 69"> should show after the first and last post in all BUT forum 69

magnus
04-25-2007, 07:21 PM
Try this:
<if condition="(($post['postcount'] == 1) || ($post['islastshown'] && !$GLOBALS['vbulletin']->GPC['ajax'])) && $foruminfo['forumid'] != 69">


If not, break it down into multiple conditionals. Not pretty, but effective:

<if condition="$foruminfo['forumid'] != 69">
<if condition="$post['postcount'] == 1 || ($post['islastshown'] && !$GLOBALS['vbulletin']->GPC['ajax'])">

croportal
04-25-2007, 07:32 PM
not working? try tested on your board, its still shows in that forum, it works but still show in that forum