config.inc.php template problem

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
spackler
Regular
Posts: 27
Joined: Fri Aug 19, 2005 8:13 pm
Location: Milwaukee
Contact:

config.inc.php template problem

Post 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!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: config.inc.php template problem

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
spackler
Regular
Posts: 27
Joined: Fri Aug 19, 2005 8:13 pm
Location: Milwaukee
Contact:

Re: config.inc.php template problem

Post 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!
spackler
Regular
Posts: 27
Joined: Fri Aug 19, 2005 8:13 pm
Location: Milwaukee
Contact:

Re: config.inc.php template problem

Post by spackler »

really looks like it is just ignoring or not recognizing the config.inc.php file - :?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: config.inc.php template problem

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
spackler
Regular
Posts: 27
Joined: Fri Aug 19, 2005 8:13 pm
Location: Milwaukee
Contact:

Re: config.inc.php template problem

Post by spackler »

just did an uninstall/reinstall of s9y and that took care of it. Thanks!
Post Reply