vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Google DMCA PROBLEM And Vbulletin (https://vborg.vbsupport.ru/showthread.php?t=259442)

PAKIDIL 03-01-2011 07:31 AM

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

Lynne 03-01-2011 04:07 PM

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))

PAKIDIL 03-01-2011 05:49 PM

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.

BirdOPrey5 03-01-2011 07:16 PM

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.


All times are GMT. The time now is 01:17 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.01123 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete