Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 04-24-2007, 02:58 PM
croportal's Avatar
croportal croportal is offline
 
Join Date: Oct 2005
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 2 if condition ih postbit legacy adsense

<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?
Reply With Quote
  #2  
Old 04-24-2007, 03:13 PM
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Location: .:: Ireland ::.
Posts: 1,306
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i can see one error.

<if condition="((($post[postcount]==1)
to
<if condition="(($post[postcount]==1)
Reply With Quote
  #3  
Old 04-24-2007, 03:17 PM
croportal's Avatar
croportal croportal is offline
 
Join Date: Oct 2005
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

still doesnt work?
Reply With Quote
  #4  
Old 04-24-2007, 03:36 PM
dxguru dxguru is offline
 
Join Date: May 2005
Location: England
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this ...

<if condition="((($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax'])) and $foruminfo['forumid'] != 69)">
Reply With Quote
  #5  
Old 04-24-2007, 03:41 PM
croportal's Avatar
croportal croportal is offline
 
Join Date: Oct 2005
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #6  
Old 04-24-2007, 03:55 PM
dxguru dxguru is offline
 
Join Date: May 2005
Location: England
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 04-25-2007, 07:21 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:
Code:
<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:
Code:
<if condition="$foruminfo['forumid'] != 69">
	<if condition="$post['postcount'] == 1 || ($post['islastshown'] && !$GLOBALS['vbulletin']->GPC['ajax'])">
Reply With Quote
  #8  
Old 04-25-2007, 07:32 PM
croportal's Avatar
croportal croportal is offline
 
Join Date: Oct 2005
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working? try tested on your board, its still shows in that forum, it works but still show in that forum
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:39 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03706 seconds
  • Memory Usage 2,215KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete