I've used the following hack to add a SE friendly archive to a phpbb forum. http://www.phpbbhacks.com/download/2841 I've added the ad script to the forum here: http://www.nzimforums.info/forums/ What's bothering me is the SE friendly archive: http://www.nzimforums.info/forums/archive/ The ads are showing on the index page of the archive. They are also showing on ALL of the archived posts, converted to htm files. BUT they are not showing on the pages that link to the posts. For example: http://www.nzimforums.info/forums/archive/health-medical-and-education-matters-7/ The way I understand it, this means the whole archive won't validate for the ad network. Help please?
I should add that in the archive, there is only one php script - index.php. I've already modified this to show that ads that are running at http://www.nzimforums.info/forums/archive/ I guess, (since this is the only script in the archive subdirectory) that this script is also adding the footers to the rest of the archive pages but I can't figure out what I need to do to get the ads to run on these pages. The index.php script is: <?php //#################################################################################### //### phpBB2 HTML Archiver //## Script created by http://ScriptWiz.com## //### Copyright info MUST stay on the bottom of all scripts #### //#### Visit http://www.ScriptWiz.com/phpbb-html-archiver.html for full release and instructions #### //#################################################################################### //configure archiver $title = "NZIM Forums — nzimforums.info —"; $domain = "http://www.nzimforums.info"; $bburl = "http://www.nzimforums.info/forums"; $path = "/forums/archive/"; //this is path from the root folder like /archive/ //no need to change anything below this line $asked = substr($_SERVER['REQUEST_URI'],strlen($path)); //----------------------------------------------------------------- function GetForumsByCategory($cid) { global $domain,$path; $level = 2; $res = mysql_query("select forum_id,forum_name,forum_desc from ".FORUMS_TABLE." where cat_id=$cid and auth_view=0 order by forum_order"); $started = false; $indent = str_repeat("\t",$level); while ($row = mysql_fetch_row($res)) { if (!$started) { $started = true; echo $indent."<ul>\n"; } echo $indent."\t<li><h$level><a href=\"$domain$path".preparename($row[1])."-{$row[0]}/\">{$row[1]}</a></h$level><br><a href='$domain$path".preparename($row[1])."-{$row[0]}.html' style='color:black'>{$row[2]}</a></li>\n"; } if ($started) echo $indent."</ul>\n"; } //----------------------------------------------------------------- function ExtractExtension($filename) { return strtolower(substr($filename,strrpos($filename,'.')+1)); } //----------------------------------------------------------------- function PrepareName($s) { $abc = "1234567890abcdefghijklmnopqrstuvwxyz_"; $s = strtolower($s); $r = ""; for($i=0;$i<strlen($s);$i++) { if (strpos($abc,$s[$i])!==false) $r .= $s[$i]; if (($s[$i]==' ')&&($r[strlen($r)-1]!=' ')) $r .= ' '; } $r = trim($r); return str_replace(' ','-',$r); } //----------------------------------------------------------------- function webousshutdown() { die('<div align=center><b><a href="http://Scriptwiz.com/scriptwiz-phpbb-html-archiver.html" target="_new">ScriptWiz.com phpbb HTML Archiver</a></b> - Created by <a href="http://www.ScriptWiz.com/">ScriptWiz.com</a> and released by <a href="http://www.skinz.org/">Skinz.org</a><br></div></body></html>'); } register_shutdown_function("webousshutdown"); $webous = array(); if (ExtractExtension($asked)=='htm') {//someone wants to read SEF thread ob_start(); echo "<base href=\"$bburl/\">\n"; $asked = substr($asked,0,-4); $webous = array(); $webous['t'] = substr($asked,strrpos($asked,'-')+1); if (strpos($webous['t'],'_')!==false) list($webous['t'],$webous['start']) = explode('_',$webous['t']); $_GET = array_merge($_GET,$webous); $HTTP_GET_VARS = array_merge($HTTP_GET_VARS,$webous); extract($webous); chdir("./.."); require ("viewtopic.php"); die(""); } if (ExtractExtension($asked)=='html') { ob_start(); echo "<base href=\"$bburl/\">\n"; $asked = substr($asked,0,-5); if (substr($asked,0,6)=='member') {//show profile $webous = array('mode'=>'viewprofile'); $webous['u'] = substr($asked,strrpos($asked,'-')+1); $_GET = array_merge($_GET,$webous); $HTTP_GET_VARS = array_merge($HTTP_GET_VARS,$webous); extract($webous); chdir("./.."); require ("profile.php"); } else{ $webous = array(); $webous['f'] = substr($asked,strrpos($asked,'-')+1); $_GET = array_merge($_GET,$webous); $HTTP_GET_VARS = array_merge($HTTP_GET_VARS,$webous); extract($webous); chdir("./.."); require ("viewforum.php"); } die(); } //it's not a wrapper, we shall to show some listing: index, members of topis require ("./../config.php"); DEFINE ("IN_PHPBB","WEBOUS"); require ("./../includes/constants.php"); @mysql_connect ($dbhost,$dbuser,$dbpasswd) or Die("Database Server is Busy. Try later."); @mysql_select_db ($dbname) or Die("Database Server is Busy. Try later."); if (($asked=="members")||($asked=="members/")) { echo "<html><title>$title Forum Members</title>\n"; include ("./header.htm"); $res = mysql_query("select user_id,username from ".USERS_TABLE." where user_id>0 and user_active=1 order by username"); echo "<h1>Forum members</h1>\n<ul>"; while ($row = mysql_fetch_row($res)) { echo "\t<li><a href=\"$domain{$path}member-".PrepareName($row[1])."-{$row[0]}.html\">{$row[1]}</a></li>\n"; } echo "</ul>\n"; die(); } if (strpos($asked,'-')!==false) {//seemes to be forum listing $id = intval(substr($asked,strrpos($asked,'-')+1)); $res = mysql_query("select forum_name from ".FORUMS_TABLE." where forum_id=$id"); $forum = mysql_fetch_row($res); if (!$forum) die("Forum not found"); $res = mysql_query("select config_value from ".CONFIG_TABLE." where config_name='posts_per_page'"); $set = mysql_fetch_row($res); $onp = $set[0]; //here we will list all topics from $id forum echo "<html><title>$title {$forum[0]} topics</title>\n"; include ("./header.htm"); $res = mysql_query("select topic_id,topic_title,topic_replies from ".TOPICS_TABLE." where forum_id=$id order by topic_last_post_id desc"); echo "<h1>{$forum[0]} topics</h1>\n<ul>"; while ($row = mysql_fetch_row($res)) { $name = PrepareName($row[1]); echo "\t<li><a href=\"$domain$path$name-{$row[0]}.htm\">{$row[1]}</a>"; $total = $row[2]+1; $last = intval($total/$onp+1); if ($total % $onp == 0) $last--; if ($last>1) { echo " ("; for($p=1;$p<=$last;$p++) { if ($p>1) echo " "; $r = ($p-1)*$onp; echo "<a href=\"$domain$path$name-{$row[0]}_$r.htm\">$p</a>"; } echo ")"; } echo "</li>\n"; } echo "</ul>\n"; die(); } //showing index: echo "<html><title>$title Forum Archive</title>\n"; include ("./header.htm"); echo "<ul>"; $res = mysql_query("select cat_id,cat_title from ".CATEGORIES_TABLE." order by cat_order ASC"); while ($row = mysql_fetch_row($res)) { echo "\t<li><h1>{$row[1]}</h1></li>\n"; GetForumsByCategory($row[0]); } echo "\t<li><h1><a href=\"$domain$path"."members/\">Forum Members</a></h1><br>Alphabetical list of all members</li>\n"; echo "</ul>"; mysql_close(); //ads ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network_194.php'); echo ' '.$ad_network[0].' | '.$ad_network[1].' | '.$ad_network[2].' | '.$ad_network[3].' | '.$ad_network[4]; ?>