4
ok, from the code you sent by pm I can see you are using index.php which renders system_homepage.html template
That template has a cache time set in header.php (look inside).
What is happening is that you are hiting the cache and the code after header.php is not being executed at all.
Now, you should not change the code in header.php, you can disable the cache using preloads.
Create a new preload and add this code inside:
function eventCoreHeaderCheckcache($args)
{
if ((!empty($GLOBALS['xoopsOption']['template_main']) && $GLOBALS['xoopsOption']['template_main'] == 'db:system_homepage.html')) {
$GLOBALS['xoTheme']->contentCacheLifetime = 0;
}
}
This code will disable cache on front page.