Adding new action and page for a mod, not working

Started by Zuma, May 21, 2007, 10:50:30 AM

Previous topic - Next topic

Rudolf

Well, if this doesn't outputs anything, then this is not the same index.php that you have online. It can't be.
Are you sure that you are not editing some backup version? Like the "index.php~".
Can you post the directory listing of your forum's root dir?

This is close to paranormal.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Zuma

Quote from: Rudolf on May 23, 2007, 12:51:47 PM
This is close to paranormal.

LMAO  ;D

o well, I thought the index.php file that loads the forum should be in the sources dir??? I've just found another index.php in the root, replaced it with the one I edited and the echo's are there. LOL...

Now that's the output after clicking TEST tab:

Quoteecho 1:entry point - action=test
echo 2:before logging - action=test
echo 4: after the actionArray - action=test
echo 6: calling the action - action=test

Fatal error: smf_main(): Failed opening required '/home/mfclanc/public_html/forum2/Sources/Test.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mfclanc/public_html/forum2/index.php on line 370

Zuma

Right, now I uppercased the T's and it works... LOL. I'm sorry for being stupid on this one guys, but really, the index.php that loads the forum shouldn't be in the sources dir instead of the root?

Rudolf

I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Zuma

lol... yeah but I thought it should work like a redirect, can I delete index.php in my sources dir then since it's pointless there?

Sorry for that and thanks a lot for all your help.

Rudolf

In the Sources the index.php should have this

<?php

// This file is here solely to protect your Sources directory.

// Look for Settings.php....
if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))
{
// Found it!
require(dirname(dirname(__FILE__)) . '/Settings.php');
header('Location: ' $boardurl);
}
// Can't find it... just forget it.
else
exit;

?>


This is to redirect people who type the path I just posted above.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Hyronymus

I'm too tired to think straight now but I'm going to look into this tomorrow. If it works for Zuma then I'm dead certain I made a similar mistake (and thus it should work for me too).

Hyronymus

The tiredness has gone and I too was messing with the wrong index.php! So this topic deserves a sticky from my point of view as it clearly explains the efforts needed to get a new action to work!

RRasco

lol...oh how simple some things can be when done correctly.  no worries, i have gone several days trying to fix errors that were caused by the simplest errors.  glad you got it fixed.
Vehicle Management System for SMF - SMFGarage.com

Hyronymus

For someone with only profound BASIC knowledge I still look amazed when things do work out :D as I intended. But as you said: those simple errors are what every "programmer" dreads, regardless of any experience.

Advertisement: