Module creator problem

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Module creator problem
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Hi !
I got a problem.
When installing the module created with module creator. it works fine.
But when i try to put it in "home" it says "You can't access this file directly...".
What do i do to make this work ?.
I wan't unregistered users to see this html module at my homepage.
ps.maybe there is some module that someone can recommend to put a html
page in home.
Dobbelina icon_biggrin.gif
Here's the code:
<?php
#### Generated by Module Creator - By Disipal site (www.disipal.net) ####
if (!eregi("modules.php", $PHP_SELF)) {
   die ("You can't access this file directly...");

}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
$index = 0;
OpenTable();
echo"<body bgcolor=\"#CCCCCC\">"
  . ""
  . "<p><FONT class=option><B>Welcome to linkking's portal !</p>"
  . "<p>we are the best !</B></FONT></p>";
CloseTable();
include("footer.php");

?>



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
$index = 0;

function index() {
include("header.php");
OpenTable();
echo"<body bgcolor=\"#CCCCCC\">"
  . ""
  . "<p><FONT class=option><B>Welcome to linkking's portal !</p>"
  . "<p>we are the best !</B></FONT></p>";
CloseTable();
include("footer.php");
}


switch ($op) {

    default:
    index();
    break;

    }
?>


Give that a try.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Module creator problem
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
I tried it,but still get "You can't access this file directly..." when putting it in home icon_cry.gif



Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
I edited it some try that one please.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: Module creator problem
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
No it doesn't work either icon_cry.gif
I'm getting desperate here, i tried both the "CWC_CoverPage1.1" and the
"CZIframe" module.But get's the same error message when trying to put it in home.
It's strange, all the original modules (like downloads,feedback etc) works fine
in home but not these one's ?



Back to top Reply with quote
#6   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
I tested it here on my site and it worked fine. Make sure that you refresh after you change it maybe you where still seeing the old module.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: Module creator problem
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Now i know what is wrong , it's the 2.5 patch !!
I reinstalled the whole v7.3 package, and applied both the 208->209 and 209->210
BB updates without a hitch.
But after applying the nuke 2.5 patch i get this problem ?
After you told me it worked for you, i gave it a shot to reinstall to see if it works,
and it does as long as i don't use the 2.5 patch files.
What is causing this and how do i do to get this to work with the 2.5 patch ?
Many thanks for helping me out
Dobbelina icon_biggrin.gif



Back to top Reply with quote
#8   re: Module creator problem
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Finally i got it solved !
"Evaders99" at Nukeresources.com told me to do this change, and now it works
fine with the 2.5 patch version as well.
Change this:
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {

to this:
if (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) {

Many thanks for helping me this far
Dobbelina icon_biggrin.gif


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum