I've noticed that when using this contribution the spiders like Googlebot would not be allowed our website restricted category and are redirected with a 302.
so I've created an spider detect script to allow the spiders to the restricted categorie.
find inside application_top.php this line:
$restricted_category = (AGE_PAGE_CATEGORY);
en replace with extra function spider detect
function spiderDetect() {
$agentArray = array("ArchitextSpider", "Googlebot", "TeomaAgent",
"Zyborg", "Gulliver", "Architext spider", "FAST-WebCrawler",
"Slurp", "Ask Jeeves", "ia_archiver", "Scooter", "Mercator",
"crawler@fast", "Crawler", "InfoSeek Sidewinder",
"almaden.ibm.com", "appie 1.1", "augurfind", "baiduspider",
"bannana_bot", "bdcindexer", "docomo", "frooglebot", "geobot",
"henrythemiragorobot", "sidewinder", "lachesis", "moget/1.0",
"nationaldirectory-webspider", "naverrobot", "ncsa beta",
"netresearchserver", "ng/1.0", "osis-project", "polybot",
"pompos", "seventwentyfour", "steeler/1.3", "szukacz",
"teoma", "turnitinbot", "vagabondo", "zao/0", "zyborg/1.0",
"Lycos_Spider_(T-Rex)", "Lycos_Spider_Beta2(T-Rex)",
"Fluffy the Spider", "Ultraseek", "MantraAgent","Moget",
"T-H-U-N-D-E-R-S-T-O-N-E", "MuscatFerret", "VoilaBot",
"Sleek Spider", "KIT_Fireball", "WISEnut", "WebCrawler",
"asterias2.0", "suchtop-bot", "YahooSeeker", "ai_archiver",
"Jetbot"
);
$theAgent = $_SERVER["HTTP_USER_AGENT"];
for($i=0;$i<count($agentArray);$i++){
if(strpos(" ".strtolower($theAgent), strtolower($agentArray[$i]))!= false){
return true;
};
};
return false;
}
/* START age code mfg */
if(spiderDetect()){
$restricted_category = 99999;
}else{
$restricted_category = (AGE_PAGE_CATEGORY);
}
this function detect if user_agent is spider and then the $restricted_category will be 99999
so it doesn't show the age_page.php
if it doesn't detect a spider the $restricted_category wil be (AGE_PAGE_CATEGORY);
and uses the given number for the categorie you have given to AGE_PAGE_CATEGORY inside admin
This is my first addon, hope you like te use of it ;-)