<{include_php file="$xoops_rootpath/themes/your_theme/your_file.php"}>
This only brings the php file code into the theme.
You still need to execute it inside the theme.
An example of this is Ryuji PM hack.
this is the php file inside your theme directory.
ex_assign.php
// $Id$
// FILE :: ex_assign.php
// AUTHOR :: Ryuji AMANO
// WEB :: Ryu's Planning
//
global $xoopsUser, $xoopsModule;
if (is_object($xoopsUser)) {
$pm_handler =& xoops_gethandler('privmessage');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
$this->assign("ex_new_messages", $pm_handler->getCount($criteria));
}
if ( is_object($xoopsModule) ) {
$this->assign('ex_moduledir', $xoopsModule->getVar('dirname'));
}
?>
Now to call into theme.html you place this below the body tag of the theme.html.
<{include_php file="$xoops_rootpath/themes/Your_Theme/ex_assign.php"}>
Now to execute this example of code into theme.html you use something like this inside the theme.html.
<{if $ex_new_messages < 1}>
<a href="<{$xoops_url}>/viewpmsg.php">Private Messagesa>
<{/if}>
<{if $ex_new_messages > 0}>
<{if $smarty.server.SCRIPT_NAME == "/index.php"}>
<script language="javascript" type="text/javascript">
script>
<{/if}>
<a href="<{$xoops_url}>/viewpmsg.php">
<span style="color:#ff6600;"><{$ex_new_messages}>-Message(s)
span>a>
<{/if}>
Now with the above code, if you have any PM's the number of PM's will show next to the static link 'Private Messages'. A popup will also happen when you enter your index page telling you number of PM's.
I hope this example of the PM hack helps you.
PEACE
::::EDITED:::::
without the whistles and bells of the popup and link, all you have to do to execute the code in the above example is place this in the theme.html:
<{$ex_new_messages}>