dean
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Apr 14, 2004
Posts: 193
|
Posted:
Tue May 25, 2004 11:10 pm |
|
I installed collapsing forum block and had no problems until I installed GT Next gen. It happened somewhere in my changes to header, footer and modules php. If someone would look at my code, I would appreciate it! I added code just before and after..........
Header php:Code:if (eregi("header.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
#Start of Google Tap Header
global $nextgen_name, $prefix, $db;
// Google Tap On or Off, 1=On, 0=Off
$next_gen_ob = 1;
//Used for main module or a module without a name
if ($nextgen_name == "") {
$sql = "SELECT main_module FROM ".$prefix."_main";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$mainmod_name = $row[main_module];
$nextgen_name = $mainmod_name;
}
//Make the path to the GT-NExtGEn Files
$nextgen_path = "GoogleTap/GT-".$nextgen_name.".php";
if ($next_gen_ob == 1) {
if (file_exists($nextgen_path)) {
ob_start();
} else {
$next_gen_ob = 0;
}
}
function replace_for_mod_rewrite(&$s, $nextgen_path) {
//Check to see if file exists before continuing
if (file_exists($nextgen_path)) {
include($nextgen_path);
}
$s = preg_replace($urlin, $urlout, $s);
return $s;
} #End of Google Tap Header
require_once("mainfile.php");
|
Footer:Code: themefooter();
echo "</body>\n"
."</html>";
die();
}
#Start of GoogleTap Footer
if ($next_gen_ob == 1) {
// Store Buffer in $contents
$contents = ob_get_contents();
//Replace all standalone &'s with &'s
$contents = preg_replace("(&(?!([a-zA-Z]{2,6}|[0-9\#]{1,6})[\;]))", "&", $contents);
//Fix up for && in script and bad coding of middot;'s, and ;'s
$contents = str_replace(array("&&", "&middot", "&nbsp"), array("&&", "·", " ;"), $contents);
//delete output buffer and stop buffering
ob_end_clean();
//display modified buffer to screen
echo replace_for_mod_rewrite($contents, $nextgen_path);
} else {
//if module has unusual method of including footer, make NExtGEn variables
//global and try it again. If variables have values for NExtGEn it will succeed
//else it will go to normal footer.
global $next_gen_ob, $nextgen_path;
if ($next_gen_ob == 1 AND $nextgen_path != "") {
$contents = ob_get_contents();
$contents = preg_replace("(&(?!([a-zA-Z]{2,6}|[0-9\#]{1,6})[\;]))", "&", $contents);
$contents = str_replace(array("&&", "&middot", "&nbsp"), array("&&", "·", " ;"), $contents);
ob_end_clean();
echo replace_for_mod_rewrite($contents, $nextgen_path);
}
}
#End of GoogleTap Footer
foot();
?>
|
Modulesphp: Code:$module = 1;
$name = trim($name);
if (isset($name)) {
$nextgen_name = $name;
if (eregi("http\:\/\/", $name)) {
die("Hi and Bye");
}
global $nukeuser, $db, $prefix;
$user = addslashes($user);
$nukeuser = base64_decode($user);
|
Im sure its a simple error but I dont see it. |
|
|