Page 1 of 1

config.inc.php template problem

Posted: Thu Dec 24, 2009 5:11 am
by spackler
I just installed s9y on a new site, same host provider that I have several other installs on. Only problem is that this time I can't get my config.inc.php & index.tpl to work as I normally do. I use them to do the The "Easy and cool" way to add PHP code and this particular site does not work. Everything is the same. Is there a way to output errors or debug? My pages load blank, no errors.

My code is thus:

config.inc.php
<?php
$serendipity['smarty']->register_function('header_function', 'header_function');

function header_function($smarty) {
include("templates/default/header.php");
}

?>

also tried this with full path and it still doesn't work
<?php
$serendipity['smarty']->register_function('header_function', 'header_function');

function header_function($smarty) {
include("/services/webpages/t/o/mydomain.com/public/templates/default/header.php");
}

?>

index.tpl
{serendipity_hookPlugin hook="frontend_header"}
</head>

<body bgcolor="#007D48">
<table width="960" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>TEST</td>
</tr>
</table>
{header_function}

Any help would be great! Thanks!

Re: config.inc.php template problem

Posted: Thu Dec 24, 2009 11:05 am
by garvinhicking
Hi!

A blank page usually means a fatal PHP error. Maybe you can open the include/functions_smarty.inc.php file and change all "@include" statements to "Include" to reveal more error messages.

Also make sure your PHP's "display_errors" directive is "On" so that you can see errors. You can easily test this by creating a file like bad.php and put some parse errors in it, call the file, and see if you get results.

Regards,
Garvin

Re: config.inc.php template problem

Posted: Thu Dec 24, 2009 6:18 pm
by spackler
Thanks Garvin. I'm getting:

Fatal error: Smarty error: [in /services/webpages/t/o/mydomain.com/public/templates/default/index.tpl line 31]: syntax error: unrecognized tag 'header_function' (Smarty_Compiler.class.php, line 599) in /services8/webpages/util/i/x/ixoniaftp.site.aplus.net/mydomain.com/public/bundled-libs/Smarty/libs/Smarty.class.php on line 1092

I will start trying to figure it out but if this looks familiar to anyone that knows a quick solution please post a reply. :)

All the best!

Re: config.inc.php template problem

Posted: Thu Dec 24, 2009 6:47 pm
by spackler
really looks like it is just ignoring or not recognizing the config.inc.php file - :?

Re: config.inc.php template problem

Posted: Sat Dec 26, 2009 12:48 am
by garvinhicking
Hi!

Where did you put your config.inc.php file? It seems that s9y loads the index.tpl from the default/ directory, so either your own template does not have a index.tpl, or you might have not put the config.inc.php into the right folder -- or maybe that file is not readable?!

Regards,
Garvin

Re: config.inc.php template problem

Posted: Thu Dec 31, 2009 7:49 am
by spackler
just did an uninstall/reinstall of s9y and that took care of it. Thanks!