Author |
Message |
chixy
New Member


Joined: Jun 29, 2006
Posts: 4
|
Posted:
Mon Jul 03, 2006 5:43 am |
|
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 |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Mon Jul 03, 2006 6:29 am |
|
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 search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
chixy

|
Posted:
Mon Jul 03, 2006 8:11 am |
|
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  |
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Mon Jul 03, 2006 3:59 pm |
|
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!! |
|
 |
 |
chixy

|
Posted:
Tue Jul 04, 2006 3:28 am |
|
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

|
Posted:
Tue Jul 04, 2006 3:24 pm |
|
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

|
Posted:
Wed Jul 05, 2006 5:35 pm |
|
I may come across as completely stupid, but im not quite that dumb.. yet...although sometimes it can be debated
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

|
Posted:
Wed Jul 05, 2006 8:49 pm |
|
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. |
|
|
|
 |
|