|
From: Jon O. <jon...@us...> - 2005-10-22 23:07:12
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6347/includes Modified Files: mx_functions_core.php Log Message: adding a wrapper to get block parameters to be used by the dev_startkit module - and the rest as soon as they are updated minor fixes to the adminCP Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mx_functions_core.php 22 Oct 2005 10:51:02 -0000 1.13 --- mx_functions_core.php 22 Oct 2005 23:07:00 -0000 1.14 *************** *** 58,61 **** --- 58,65 ---- define('MX_CACHE_DEBUG' , false); // echo lots of debug info + define('MX_GET_ALL_PARS' , -10); // Flag - get all parameters + define('MX_GET_PAR_VALUE' , -20); // Flag - get parameter value + define('MX_GET_PAR_OPTIONS' , -30); // Flag - get parameter option + class mx_cache { *************** *** 920,924 **** // $layouttemplate->assign_block_vars( 'layout_column.blocks.edit.switch_edit_' . ( $edit_on ? 'on' : 'off' ), array() ); ! } } // class mx_block --- 924,967 ---- // $layouttemplate->assign_block_vars( 'layout_column.blocks.edit.switch_edit_' . ( $edit_on ? 'on' : 'off' ), array() ); ! } ! ! /********************************************************************************\ ! | Module Parameters Api ! | ------------------ ! | Core provides a rich set of parameter types. Additional block specific types are defined in module_root/admin/mx_module_defs.php. ! | Block parameters are accessed with the mx_block->get_parameters() method. ! | ! | mx_block->get_parameters() Api ! | ! | Available switches: MX_GET_ALL_PARS, MX_GET_PAR_VALUE (default), MX_GET_PAR_OPTIONS ! | ! | Examples: ! | ! | $mx_block->get_parameters( MX_GET_ALL_PARS ) ! | - returns an array with all parameters :: array('par_name1' => $par1_value, 'par_name2' => $par2_value, ...) ! | ! | $mx_block->get_parameters( 'parameter_name' ) ! | - returns value for 'parameter_name' ! | ! | $mx_block->get_parameters( 'parameter_name', MX_GET_PAR_OPTIONS ) ! | - returns options for 'parameter_name', eg bbcodes etc ! \********************************************************************************/ ! function get_parameters($key = MX_GET_ALL_PARS, $mode = MX_GET_PAR_VALUE) ! { ! if ($key == MX_GET_ALL_PARS) ! { ! $block_config_temp = array_merge($this->block_info, $this->block_parameters); ! return $block_config_temp; ! } ! ! if ($mode == MX_GET_PAR_OPTIONS) ! { ! $block_config_temp = $this->block_parameters[$key]['parameter_option']; ! return $block_config_temp; ! } ! ! $block_config_temp = $this->block_parameters[$key]['parameter_value']; ! return $block_config_temp; ! } } // class mx_block |