Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro
Author Message
chixy
New Member
New Member


Joined: Jun 29, 2006
Posts: 4

PostPosted: Mon Jul 03, 2006 5:43 am Reply with quote

Im trying to set a custom module as "home" but all i get is a blank page, Works fine on the standard "PHP-Nuke 7.6/7.7/7.8 etc.. But not on your RavenNuke, Any help would be appreciated.

Code:


<?php


/********************************************************/
/* Add HTML Script 1.1 for PhP-Nuke 6.0                 */
/* By: Simonaut (webmaster@simonaut.com)                */
/* http://www.simonaut.com                              */
/* Copyright © 2003 by Simonaut                         */
/*                      */
/********************************************************/

// If you would like to Display the Right Side Bar $index = 1;
// Or if you would not want to Display the Right Side Bar it must be $index = 0;
if (!isset($mainfile)) { include("mainfile.php"); }
$index = 1;
include("header.php");
OpenTable();

?>
<font face="Tahoma"><b> Welcome To [RIDE]!!</font>

<?php
CloseTable();
include("footer.php");
?>


Ive tried changing it to:

Code:


if (!isset($mainfile)) { include("mainfile.php"); }
define('INDEX_FILE', true);
include("header.php");


Still doesnt work :S
 
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Mon Jul 03, 2006 6:29 am Reply with quote

Welcome!

I'd suggest comparing this to an existing, working module to see how it works and what is different.

What do you mean by still doesn't work? Is there an error in your error log? Do you have display_errors on or off? You might also wish to add some diagnostic code to see where it is stopping... By diagnostic code, I mean something like:
Code:
die("Stopped on step 1");

which you could then move around in your code to help diagnose the problem.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
chixy
PostPosted: Mon Jul 03, 2006 8:11 am Reply with quote

When i said it still doesnt work, I ment still a blank page, no errors, how do i set up error diagnostic stuff? im a complete noob when it comes to php Sad
 
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Mon Jul 03, 2006 3:59 pm Reply with quote

Try changing the code above to this :

<?php

if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}

//$index = 1; Rechterkolom AAN
//define('INDEX_FILE', true);
include("header.php");

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
chixy
PostPosted: Tue Jul 04, 2006 3:28 am Reply with quote

That gives me a blank page with: "You can't access this file directly..."

I set diplay errors to true, and with the original script i posted at the top, i get:

Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/xxxxxx/public_html/ride/mainfile.php on line 88

Fatal error: Cannot redeclare stripos_clone() (previously declared in /home/xxxxxx/public_html/ride/mainfile.php:110) in /home/xxxxxx/public_html/ride/mainfile.php on line 110
 
gregexp
PostPosted: Tue Jul 04, 2006 3:24 pm Reply with quote

Are you trying to make a custom MODULE in nuke_dir/modules or are you trying to overwrite the index.php in the core files of nuke?

overwriting index.php, will make your nuke non functional, What you want to do is make a nuke MODULE like i sated above and then in the admin panel, set that to home.
 
chixy
PostPosted: Wed Jul 05, 2006 5:35 pm Reply with quote

I may come across as completely stupid, but im not quite that dumb.. yet...although sometimes it can be debated Wink

This is a custom module, in my nuke_directory/modules/module_name/index.php

I did exactly as you said above, and I set it to "home" and got a blank page with: "You can't access this file directly..."

With the original script I posted at the top, and with display errors on, I got this:

"Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/xxxxxx/public_html/ride/mainfile.php on line 88

Fatal error: Cannot redeclare stripos_clone() (previously declared in /home/xxxxxx/public_html/ride/mainfile.php:110) in /home/xxxxxx/public_html/ride/mainfile.php on line 110"


--------------------
I fixed the problem, I played around and played around..
I dont know if this is right, as I know very little about php, but its seems to be working fine with this..

Code:
<?php

if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}

define('INDEX_FILE', true);
require_once("mainfile.php");
include("header.php");
OpenTable();
?>

blah blah blah

<?php
CloseTable();
include("footer.php");
?>
 
gregexp
PostPosted: Wed Jul 05, 2006 8:49 pm Reply with quote

Ohh my. My apologies, that seems to use the latest patch level but my code did not. Yes, you have created it properly, My apologies once again for missdirecting you.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro

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 ©