Customizing SMF > SMF Coding Discussion
SSI.php
The Wizard:
Hello:
I'm using SMF 2.0.2 and would like to know if there is a general a hook to call the SSI.php? I'm working on a separate page that is in the sources Dir.
Note: I ready have read how to add a hook, but it there is one made and there should be (hint to designers of SMF) it will save me work.
Thanks
Wiz
emanuele:
What do you mean by "call the SSI.php"?
The Wizard:
Hello:
Everytime I use this code -
--- Code: ---require_once('Paradise/SSI.php');
--- End code ---
at the top of a php page I created and put into the sources dir I get this -
--- Quote ---Warning: require_once(Paradise/SSI.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxxxxx/xx/xxxxxxx/html/Paradise/Sources/shop/Remove-Item-Image.php on line 3
Fatal error: require_once() [function.require]: Failed opening required 'Paradise/SSI.php' (include_path='.:/usr/local/php5_3/lib/php') in /home/xxxxxxx/xx/xxxxxxx/html/Paradise/Sources/shop/Remove-Item-Image.php on line 3
--- End quote ---
For obvious reasons I have replaced some of the links with xxxxx, but this should give you a idea of my problem. Can you explane to me what I'm doing wrong?
Wiz
emanuele:
You are not giving the correct path.
Use for example:
--- Code: ---/home/xxxxxxx/xx/xxxxxxx/html/Paradise/SSI.php
--- End code ---
and it should work.
There isn't and there cannot be any "hook" to load SSI since SSI is an external file and if you need it you are not inside SMF where hooks can be used. Don't know if that makes sense. ;)
The Wizard:
OK that actually makes a lot of sense.
So here is my question -
If the code below was called test.php and the file was uploaded to the Source Dir and we call it by a URL -
--- Quote ---http://www.myforum.com/SMF/Sources/test.php
--- End quote ---
what code would I need to add to make the white page saying "Hello Bill this is a template test" have the same background, header, footer as the default?
--- Code: ---<php?
echo 'Hello Bill this is template test';
?>
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version