vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Any way to block ads from being shown in perticular forums or pages ? (https://vborg.vbsupport.ru/showthread.php?t=179603)

anantthakor 05-18-2008 02:51 AM

Any way to block ads from being shown in perticular forums or pages ?
 
Is there any way to stop from being shown ads in perticular forums of site ?

This is will be good help for those who have adult sites and want to use google adsense revenue sharing :)

veenuisthebest 05-18-2008 03:08 AM

Wrap your Ad code in the following conditional ..

Code:

<if condition="$forumid != X">

Your Ad Code here

</if>


where X is your forum ID where you do not want to display Ad

anantthakor 05-18-2008 03:11 AM

but where ? in which template. please give me example using any google adsense modification :)

veenuisthebest 05-18-2008 03:15 AM

For vB 3.7, you now have Ad Location Templates, paste the Google Adsense code in any of the desired templates like ad_header_logo.

And simply wrap that code in the conditional i.e.

Code:

<if condition="$forumid != X">

YOUR
GOOGLE
ADSENSE
CODE
HERE

</if>


where X is the forum ID where you do NOT want to show the Ad. Hope this helpsss

anantthakor 05-18-2008 03:24 AM

I tried this but while adding i am having this error

Quote:

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

veenuisthebest 05-18-2008 03:26 AM

Post your complete code.. that you applied to the template !!

anantthakor 05-18-2008 03:30 AM

<if condition="$forumid != 12,235,236,267">

my adsense code

</if>

I used this bcoz i dont want show these ads more above these 4 forums

veenuisthebest 05-18-2008 03:32 AM

Code:

<if condition="$forumid != 12,235,236,267">
this is wrong, it won't accept an array of ID's..
the conditional I provided works for just 1 forum like this

Code:

<if condition="$forumid != X">

anantthakor 05-18-2008 03:33 AM

But i want to bock this in 4 forums like i tried :(

Please provide me codes for that :)

veenuisthebest 05-18-2008 03:35 AM

okk... try this for multiple forums.. not sure if it works !!

Code:

<if condition="out_array($forum['forumid'], array(12,235,236,267))">


All times are GMT. The time now is 02:08 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.01115 seconds
  • Memory Usage 1,728KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_quote_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
  • (10)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