SimplePortal
Customization => Custom Coding => Topic started by: mee on September 24, 2009, 03:50:26 PM
-
Hello,
Excuse me, if I post this question to a wrong board. I want to ask, if it possible to make a custom page, with my own PHP but inside whole forum's main template (like heading, footers, and portal blocks on left and right)?
thanks in advance,
Michael
-
Yes, use the Custom Pages feature in SimplePortal 2.3.
-
Great, thanks a lot!
-
Sorry, but I still can't add a page, I get the following error:
<i>Syntax error in block code. Please check the code. </i>
I used include, to include original php file, and it didn't work either. it works with preview, but when I click "add" it gives me the same error :(
My "Include" code:
<?php
include("calc.php");
?>
-
Try the code below:
global $boarddir;
include($boarddir . '/calc.php');
You should never use 'relative' file paths. The $boarddir gives you the abolute filepath of your main forum directory.
-
ah.. at last, I understood that. All the content of "PHP" page is proccessed by "eval()" right? So I can't just do my html, then put <?php echo?> and then do my HTML again. Ok, thanks for explanation.
-
You can use HTML, but you have to put it in like in the examples below:
Either:
?>
HTML
<?php
or
echo 'HTML';
-
dont mean to bump an old topic, but if your using HTML code for the custom page, why not just use a HTML custom block.
for the PHP needs you can just add another top/bottom block
-
Sorry to dig again but im trying to include a file that is outside of the main forum directory my forum is at:
http://dth-scripts.com/Forum
and the file i wish to include is at:
http://dth-scripts.com/inc/contact.php
how can i go about including that as if i use a standard relative include i get the syntax error message?
-
how can i go about including that as if i use a standard relative include i get the syntax error message?
There are issues with the PHP syntax validator in SP 2.3, don't use relative paths, they don't work properly. This will be resolved in SP 2.3.1.