6
Quote:
Follow-up:
The include_php function requires an absolute path to the PHP file. That's a bit cumbersome when you're dealing with win32 dev and RH8 prod. I couldn't seem to find any way to get the template's directory pre-pended to the include file (XOOPS vars unavailable, smarty vars not set??)
However, the {php} directive does work as advertised and allows me to accomplish what I wanted. The downside is I need to include the PHP code in my template--less than ideal.
I suppose it's possible the XOOPS vars are available within the smarty PHP block but I didn't check that.
Here's how I included the PHP code in my template, in case anyone wants to try it with theirs.
...
<{php}>
// Include theme-specific functions
function dt_AZtime() {
# Calculate current AZ time -- Server is not in MST time zone
# offset to server = -7h - (server offset)
$MST_to_Server_offset = -7 * 60 * 60 - date( "Z" );
return time() + $MST_to_Server_offset;
}
$this->assign('theme_localtime', date( "g:ia, F j, Y", dt_AZtime()));
<{/php}>
<table cellspacing="0">
...
<td id="headerbar"><a href="<{$xoops_url}>/">GAPTa>: <{$xoops_pagetitle}>td>
<td id="headerbar-right"><{$theme_localtime}>td>
...
P.S. Many thanks to Chapi to pointing me to the Smarty site and getting me headed in the right direction.