1
I want to allow the smarty debug mode just for admin.
/*
* Smarty plugin
* -------------------------------------------------------------
* Type: function
* Name: debug
* Version: 1.0
* Date: July 1, 2002
* Author: Monte Ohrt
* Purpose: popup debug window
* -------------------------------------------------------------
*/
function smarty_function_debug($params, &$smarty)
{
if($params['output']) && ($xoopsUser->isAdmin)) {
$smarty->assign('_smarty_debug_output',$params['output']);
}
return $smarty->_generate_debug_output();
}
/* vim: set expandtab: */
?>
file: /class/smarty/plugins/fuction.debug.php
added: && ($xoopsUser->isAdmin))
Don't work. How to fix?