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.02.02 Distro
Author Message
mrbilly
Worker
Worker



Joined: Jun 07, 2006
Posts: 114

PostPosted: Wed Jul 19, 2006 6:19 pm Reply with quote

I am trying to make a module I have created myself, (ie not a module already supplied with my PHPNuke Installation), display in the home page of my website.

However, when I select one I have created myself, all I can see on the home page is the following error:


You can't access this file directly...


If I select a module that is supplied with the PHPNuke package, it displayed in the home page without any problems.

Please can someone help with this?
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Jul 19, 2006 7:56 pm Reply with quote

Compare your module to one of the standard modules. Make sure that the first 6 or 8 lines are the same.
 
View user's profile Send private message
mrbilly







PostPosted: Sun Jul 23, 2006 6:02 am Reply with quote

Yes...Thank you for this Raven.

I took your advise and see the following difference...

The standard modules have the initial code as follows:

<?php

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

define('INDEX_FILE', true);
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);



However the modules I creat myself, (using an online html to php-nuke module converter), have the following code:


<?php

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

}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
define('INDEX_FILE', true);


If I change the code provided by the online converter to be the same as a standard module, (as you advised), the module I created does now display perfectly in the home page. I am not sure why this is exactly (and your further advise on this would be appreciated), but as i say everything does now work.

Thank you.


RavensScripts
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Jul 24, 2006 6:50 am Reply with quote

Quote:

If I change the code provided by the online converter to be the same as a standard module, (as you advised), the module I created does now display perfectly in the home page. I am not sure why this is exactly (and your further advise on this would be appreciated), but as i say everything does now work.


The reason is those converters a very, very old. The newer patchsets changed the way certain things are done in PHP-Nuke. Unfortunately, the converter you are using has not been updated in a long time.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
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.02.02 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 ©