My approach:
place lines in file plugins/function.content.php
Code: Select all
//Vilkis BEGIN
$smarty->calculate=1;
$oldvalue = $smarty->caching;
$smarty->caching = false;
$result = $smarty->fetch(str_replace(' ', '_', 'content:' . (isset($params['block'])?$params['block']:'content_en')), '', $pageinfo->content_id);
$smarty->caching = $oldvalue;
$smarty->calculate=0;
//Vilkis END
Code: Select all
$returnid = '';
if (isset($params['returnid']))
{
$returnid = $params['returnid'];
}
else
{
$returnid = $pageinfo->content_id;
}
$result = $cmsmodules[$modulename]['object']->DoActionBase($action, $id, $params, $returnid);
if ($result !== FALSE)
{
echo $result;
}
$modresult = @ob_get_contents();
@ob_end_clean();
AND modify the file lib/module.functions.php :
place a line
Code: Select all
if ($smarty->calculate==1) return;
Code: Select all
function cms_module_plugin($params,&$smarty)
{
global $gCms;
$cmsmodules = &$gCms->modules;
$id = 'm' . ++$gCms->variables["modulenum"];
I hope it will help somebody.
Vilkis
EDIT: As Mark reminded me.
WARNING Before you make any modification read this topic and make a backup of files.