Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 03-01-2011, 07:31 AM
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks i tried this but getting the old error if i place this code in showthread template.

Code:
<if condition="THIS_SCRIPT != 'register' AND $threadinfo[forumid] != 6">
my google ad code here
</if>
Any Help Please . I want to place two 300x250 box banner after navbar and this place is not available in ads template so i am using showthread.

i am using the conditional so that i can enable my software section where my users share software with each other and google ads wouldn't appear in Software section in this way , I wouldn't break the google dcma and have the software section on my forum too. thanks waiting for reply

--------------- Added [DATE]1298972595[/DATE] at [TIME]1298972595[/TIME] ---------------

Thanks i have found out its place in ad_navbar_below template and its working fine. However, i have also found out that when i add like forum restriction

Code:
<if condition="THIS_SCRIPT != 'register' AND $GLOBALS[forumid] != 6,51,58,69,75,97,95,100,52">
google ads
</if>
then this error appears
Code:
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ',' in /home/forums/public_html/includes/adminfunctions_template.php(3772) : eval()'d code on line 1

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
otherwise its work ok if i keep it to 6 forum id.
any help please waiting for reply
Reply With Quote
  #12  
Old 03-01-2011, 04:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Instead of:
HTML Code:
$GLOBALS[forumid] != 6,51,58,69,75,97,95,100,52
Do:
HTML Code:
in_array($GLOBALS['forumid'], array(6,51,58,69,75,97,95,100,52))
Reply With Quote
  #13  
Old 03-01-2011, 05:49 PM
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok here i put this

Code:
<if condition="THIS_SCRIPT != 'register' AND in_array($GLOBALS['forumid'], array(6,51,58,69,75,97,95,100,52))">
google ads
[/if]
but still it doesn't work with multiple forum section . i tried it with navbar_below ads and with also in showthread .

Anyhelp please

--------------- Added [DATE]1299012484[/DATE] at [TIME]1299012484[/TIME] ---------------

Okay found the solution . Explaining incase anyone else need help regarding this.
Actually in template navbar_below ads i have to include the id in which i want to show the google ads . for example
i want to show the ads on forum id 2,3,4,5
so i have to add the code in navbar_below ads template like this

[code]<if condition="THIS_SCRIPT != 'register' AND in_array($GLOBALS['forumid'], array(2,3,4,5))">
google ads
[/if]

ads will show on forum id 2,3,4,5 and the rest wouldn't appear.

Thanks once again for the help.
Reply With Quote
  #14  
Old 03-01-2011, 07:16 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will show ads ONLY in forums 2, 3, 4, 5:
Code:
<if condition="THIS_SCRIPT != 'register' AND in_array($GLOBALS['forumid'], array(2,3,4,5))">
This will show in ads in all forums EXCEPT 2, 3, 4, 5:
Code:
<if condition="THIS_SCRIPT != 'register' AND !in_array($GLOBALS['forumid'], array(2,3,4,5))">
Note the exclamation point (!) in front of _in_array.
Reply With Quote
Reply


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:28 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.03591 seconds
  • Memory Usage 2,197KB
  • 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
  • (6)bbcode_code
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete