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

Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2014, 07:23 PM
matrog matrog is offline
 
Join Date: Jan 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default adsense hide on error pages

Hi All, google adsense is banning my account since they don't want to display ads on error or empty pages, how can I prevent this using come conditional statement in my pages?

thanks,
matteo
Reply With Quote
  #2  
Old 03-12-2014, 09:14 PM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hopefully you can get this fixed quickly. A lot of people miss the fine print and get banned this way.

Per Google:
Quote:
Google ads, search boxes or search results may not be:
  • Integrated into a software application (does not apply to AdMob) of any kind, including toolbars.
  • Displayed in pop-ups or pop-unders.
  • Placed in emails, email programs, including webmail, or on pages where dynamic content (such as live chat, instant messaging, or auto-refreshing comments) is the primary focus. (Does not apply to AdMob.)
  • Placed in emails, email programs, or chat programs. (Does not apply to AdMob.)
  • Obscured by elements on a page.
  • Placed on any non-content-based page. (Does not apply to AdSense for search, mobile AdSense for search, or AdMob.)
  • Placed on pages published specifically for the purpose of showing ads.
  • Placed on pages whose content or URL could confuse users into thinking it is associated with Google due to the misuse of logos, trademarks or other brand features.
  • Placed on, within or alongside other Google products or services in a manner that violates the policies of that product or service.
The code below will keep your ads off of vBulletin "non-content based pages" including error pages, starting a new thread page, registration pages, site rules, etc. and keep you in compliance with Google Adsense rules.

Code:
<vb:if condition="!in_array(THIS_SCRIPT, array('error', 'misc', 'newthread', 'private', 'register'))">
YOUR AD CODE HERE
</vb:if>
P.S. The "error" conditional above may not be the same for everyone depending on if you use the standard vB error pages or a mod to display error pages. To verify, check the source code of the error pages displayed by your particular installation and adjust the conditional as necessary to cover your script.

If you can't figure it out yourself, just post or pm a link to your site.
Reply With Quote
2 благодарности(ей) от:
matrog, MYU
  #3  
Old 03-13-2014, 12:07 AM
MYU MYU is offline
 
Join Date: Dec 2013
Location: London
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, I'm having the same problem. I had a news section which was breaking Adsense rules, I've deleted the section and it comes up with an error page now.

http://www.wearetherangersboys.com/f...sex-slave-case

I used the code above and the banner don't display on the page to register, however it still shows on the link above.

I'm using a test style to test it and I don't want the ad on some sections of the forums.

If you go into the default style the ads will not show on this error page. I have set that so it only shows on the forums I want, it will not display on global which is what I want. It's also set as non content.

I want my ads global, not to show on a few sections or non content pages if anyone can help?
Reply With Quote
  #4  
Old 03-13-2014, 07:20 AM
matrog matrog is offline
 
Join Date: Jan 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, your code works for the majority of non content pages except this one for example

http://www.digital-forum.it/showthre...agli-usa/page5

thanks,
Matteo
Reply With Quote
  #5  
Old 03-13-2014, 08:37 AM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MYU View Post
... I've deleted the section and it comes up with an error page now.

http://www.wearetherangersboys.com/f...sex-slave-case
Quote:
Originally Posted by matrog View Post
thanks, your code works for the majority of non content pages except this one for example

http://www.digital-forum.it/showthre...agli-usa/page5

thanks,
Matteo
Both of these links are threads that use the script 'showthread'. If you put that in the above code it will stop ads from displaying on all your forum threads. You really need to just permanently delete reference to those old threads/links.
Reply With Quote
  #6  
Old 03-13-2014, 01:11 PM
MYU MYU is offline
 
Join Date: Dec 2013
Location: London
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bzcomputers View Post
Both of these links are threads that use the script 'showthread'. If you put that in the above code it will stop ads from displaying on all your forum threads. You really need to just permanently delete reference to those old threads/links.
Thank you, problem is this link is from Google search.

My news section had over 200,000 threads which is all deleted now. These links are found on Google search and displays this page.

Surely the forum will know it's a non content page as it's displayed on the screen?
Reply With Quote
  #7  
Old 03-13-2014, 08:55 PM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MYU View Post
Thank you, problem is this link is from Google search.

My news section had over 200,000 threads which is all deleted now. These links are found on Google search and displays this page.

Surely the forum will know it's a non content page as it's displayed on the screen?
It appears you must be using either a mod or individual rewrite rules on your threads. The page that is resulting from the removed link you posted should be giving an error so Google knows to remove it (eventually), check your mod settings or your rewrite rules.
Reply With Quote
  #8  
Old 03-13-2014, 09:04 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Adsense always disabled my account no matter how many i added so i found a way around it. Add it to youtube first leave it running for a few months then add it to your forums have had it running now a few years and so far so good
Reply With Quote
  #9  
Old 03-14-2014, 12:02 AM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I currently use a combination of these two mods to get the results I needed and have never had any warnings/issues with Adsense:

1) DBSEO - previously used vbSEO
2) vb4 Error Pages

When setup correctly all removed deleted threads/urls which contain no content give a 404 Custom Error Page which does not display any Adsense ads.

After awhile Google will remove the urls leading to the 404 Error Pages from their search engines. In the mean time you will be complying with Google's Adsense rules by just keeping ads off of the non-content 404 Custom Error Pages by using the code I posted above.
Reply With Quote
  #10  
Old 03-14-2014, 09:28 PM
MYU MYU is offline
 
Join Date: Dec 2013
Location: London
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bzcomputers View Post
I currently use a combination of these two mods to get the results I needed and have never had any warnings/issues with Adsense:

1) DBSEO - previously used vbSEO
2) vb4 Error Pages

When setup correctly all removed deleted threads/urls which contain no content give a 404 Custom Error Page which does not display any Adsense ads.

After awhile Google will remove the urls leading to the 404 Error Pages from their search engines. In the mean time you will be complying with Google's Adsense rules by just keeping ads off of the non-content 404 Custom Error Pages by using the code I posted above.
I will try this and thank you for your help.
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 01:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04711 seconds
  • Memory Usage 2,271KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_code
  • (6)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete