Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's Collapsing Forums Block
Author Message
dean
Worker
Worker



Joined: Apr 14, 2004
Posts: 193

PostPosted: Tue May 25, 2004 11:10 pm Reply with quote

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 &amp's
$contents = preg_replace("(&(?!([a-zA-Z]{2,6}|[0-9\#]{1,6})[\;]))", "&amp;", $contents);
//Fix up for && in script and bad coding of middot;'s, and  ;'s
$contents = str_replace(array("&amp;&amp;", "&amp;middot", "&amp;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})[\;]))", "&amp;", $contents);
   $contents = str_replace(array("&amp;&amp;", "&amp;middot", "&amp;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&nbsp;and&nbsp;Bye");
    }
    global $nukeuser, $db, $prefix;
    $user = addslashes($user);
    $nukeuser = base64_decode($user);


Im sure its a simple error but I dont see it.
 
View user's profile Send private message
dean







PostPosted: Wed May 26, 2004 9:17 am Reply with quote

On second thought, maybe all I need is your collapsing block in a GT Next Gen friendly flavor. I tried converting it using audioslaved's block convertor. Perhaps thats whats creating the errors.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's Collapsing Forums Block

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©