--- nfo/php/libs/net.php.smarty/plugins/function.debug.php 2002/10/09 00:53:36 1.1 +++ nfo/php/libs/net.php.smarty/plugins/function.debug.php 2004/06/16 21:58:16 1.3 @@ -1,40 +1,33 @@ - * Credits: Mark Priatel - * Gerard - * Jason Sweat - * Purpose: cycle through given values - * Input: name = name of cycle (optional) - * values = comma separated list of values to cycle, - * or an array of values to cycle - * (this can be left out for subsequent calls) + * @package Smarty + * @subpackage plugins + */ + + +/** + * Smarty {debug} function plugin * - * reset = boolean - resets given var to true - * print = boolean - print var or not. default is true - * advance = boolean - whether or not to advance the cycle - * delimiter = the value delimiter, default is "," - * assign = boolean, assigns to template var instead of - * printed. - * - * Examples: {cycle values="#eeeeee,#d0d0d0d"} - * {cycle name=row values="one,two,three" reset=true} - * {cycle name=row} - * ------------------------------------------------------------- + * Type: function
+ * Name: debug
+ * Date: July 1, 2002
+ * Purpose: popup debug window + * @link http://smarty.php.net/manual/en/language.function.debug.php {debug} + * (Smarty online manual) + * @author Monte Ohrt + * @version 1.0 + * @param array + * @param Smarty + * @return string output from {@link Smarty::_generate_debug_output()} */ function smarty_function_debug($params, &$smarty) { - if($params['output']) { - $smarty->assign('_smarty_debug_output',$params['output']); - } - echo $smarty->_generate_debug_output(); + if($params['output']) { + $smarty->assign('_smarty_debug_output',$params['output']); + } + require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.display_debug_console.php'); + return smarty_core_display_debug_console(null, $smarty); } /* vim: set expandtab: */