vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Blocking of Adsense on certain IPs (https://vborg.vbsupport.ru/showthread.php?t=146354)

feverhost 05-03-2007 03:31 AM

Blocking of Adsense on certain IPs
 
Is there a way to block adsense ads under my navbar by IP Address?

I have some members that I don't want to see the adsense IPs, but only want certain ones to not be able to see this?

Is this possible.. if so... how?

tobybird 05-03-2007 07:12 PM

Possibly. You could place the members in a usergroup and then by the use of conditionals restrict access to the ads. Also, I'm fairly certain there is a mod or three out here that has the same ability.

feverhost 05-03-2007 09:20 PM

That is a good idea, but curious if there is a way I can do this just by IP Address?

feverhost 05-07-2007 01:45 AM

Does anyone have an idea how I can block ads to certain IP Addresses?

HMBeaty 05-07-2007 02:48 AM

I really don't think this is possible as a similar question was asked a few months ago and nobody discovered how to do it

feverhost 05-07-2007 09:33 PM

I was able to accomplish this using IFRAME and .htaccess. So if your interested this is what I did:

First I created a directory under my mainsite called /google

Secondly I created .htaccess and put this code into it:

<Limit GET HEAD POST>
order allow,deny
deny from IP.ADDRESS.HERE
allow from all
</LIMIT>

Thirdly I created google.php within /google

I then went into my navbar and pasted this info:

<CENTER>

<iframe src="/google/index.php" width="750" height="110" scrolling="no" name="content" frameborder="0"></iframe>
</CENTER>

It will show a blank area if you are on the IP Address that is blocked, and it shows the Google ads perfectly for any other IP Address. To get around the 403 Forbidden Denied error.. I had to change the apache config file to point to a blank page which I created /google/403.html then restarted apache.

I know its not a PHP fix, but it does seem to work. We have a programmer who is looking into making some code to coincide with VB that is PHP based. Once I have that, and its working, i'll paste that or create a Mod in the Mods Section. As everyone I asked said it can't be done, just as VB staff said it can't be done. I'm sure it can be done.. its just maybe know one has done it yet.


All times are GMT. The time now is 12:15 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.01121 seconds
  • Memory Usage 1,714KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete