|
From: Jon O. <jon...@us...> - 2005-10-23 18:49:27
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21830/modules/mx_calsnails Modified Files: calendar.php mx_calendar_events.php mx_calendar_query.php Log Message: Updated all blocks to use the new $mx_block->get_parameters() api, instead of old red_block_config() function Index: mx_calendar_events.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_events.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_calendar_events.php 12 Oct 2005 15:38:35 -0000 1.12 --- mx_calendar_events.php 23 Oct 2005 18:49:18 -0000 1.13 *************** *** 28,43 **** include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); ! // Read block Configuration ! $title = $block_config[$block_id]['block_title']; ! ! $block_config = read_block_config( $block_id ); $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! $block_title = $block_config[$block_id]['Calendar_Block_Title']['parameter_value']; ! $block_vsize = $block_config[$block_id]['Calendar_Vertical_Size']['parameter_value']; ! $text_length = $block_config[$block_id]['Calendar_Text_Length']['parameter_value']; ! $events_range = $block_config[$block_id]['Calendar_Events_Range']['parameter_value']; ! $events_prev = $block_config[$block_id]['Calendar_Events_Prev']['parameter_value']; ! $events_next = $block_config[$block_id]['Calendar_Events_Next']['parameter_value']; ! $block_datefmt = $block_config[$block_id]['Calendar_Events_dateformat']['parameter_value']; if ( empty( $block_datefmt ) ) --- 28,44 ---- include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! ! $block_title = $mx_block->get_parameters( 'Calendar_Block_Title' ); ! $block_vsize = $mx_block->get_parameters( 'Calendar_Vertical_Size' ); ! $text_length = $mx_block->get_parameters( 'Calendar_Text_Length' ); ! $events_range = $mx_block->get_parameters( 'Calendar_Events_Range' ); ! $events_prev = $mx_block->get_parameters( 'Calendar_Events_Prev' ); ! $events_next = $mx_block->get_parameters( 'Calendar_Events_Next' ); ! $block_datefmt = $mx_block->get_parameters( 'Calendar_Events_dateformat' ); if ( empty( $block_datefmt ) ) *************** *** 76,80 **** // Get Calsnails target block ! $cal_block_id = $block_config[$block_id]['target_block']['parameter_value']; $cal_page_id = get_page_id( $cal_block_id ); --- 77,81 ---- // Get Calsnails target block ! $cal_block_id = $mx_block->get_parameters( 'target_block' ); $cal_page_id = get_page_id( $cal_block_id ); Index: mx_calendar_query.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_query.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_calendar_query.php 1 Oct 2005 14:12:12 -0000 1.7 --- mx_calendar_query.php 23 Oct 2005 18:49:18 -0000 1.8 *************** *** 28,39 **** include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); ! // Read block Configuration ! ! $block_config = read_block_config( $block_id ); $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! $block_title = $block_config[$block_id]['Calendar_Block_Title']['parameter_value']; ! $query_where = $block_config[$block_id]['Calendar_Where']['parameter_value']; ! $query_order = $block_config[$block_id]['Calendar_Order']['parameter_value']; ! $block_datefmt = $block_config[$block_id]['Calendar_Events_dateformat']['parameter_value']; if ( empty( $block_datefmt ) ) { --- 28,42 ---- include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! ! $block_title = $mx_block->get_parameters( 'Calendar_Block_Title' ); ! $query_where = $mx_block->get_parameters( 'Calendar_Where' ); ! $query_order = $mx_block->get_parameters( 'Calendar_Order' ); ! $block_datefmt = $mx_block->get_parameters( 'Calendar_Events_dateformat' ); ! if ( empty( $block_datefmt ) ) { Index: calendar.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/calendar.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** calendar.php 1 Oct 2005 14:12:12 -0000 1.17 --- calendar.php 23 Oct 2005 18:49:18 -0000 1.18 *************** *** 75,79 **** // +MX001: Begin - // die(var_export($_SESSION)); if ( !function_exists( 'read_block_config' ) ) { --- 75,78 ---- *************** *** 113,130 **** include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); ! // Read block Configuration ! ! $block_config = read_block_config( $block_id ); $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! $title = $block_config[$block_id]['block_title']; // Permission variables ! $cal_auth_all = $block_config[$block_id]['auth_all']['parameter_value'] ; ! $cal_auth_reg = $block_config[$block_id]['auth_reg']['parameter_value'] ; ! $cal_filter = $block_config[$block_id]['cal_filter']['parameter_value'] == 'TRUE' ; ! $cal_mod_group = $block_config[$block_id]['cal_mod_group']['parameter_value']; // echo($cal_auth_all.$cal_auth_reg.$cal_filter); // Get Calsnails target block ! $cal_block_id = $block_config[$block_id]['target_block']['parameter_value']; $cal_page_id = get_page_id( $cal_block_id ); --- 112,130 ---- include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! // Permission variables ! $cal_auth_all = $mx_block->get_parameters( 'auth_all' ); ! $cal_auth_reg = $mx_block->get_parameters( 'auth_reg' ); ! $cal_filter = $mx_block->get_parameters( 'cal_filter' ) == 'TRUE' ; ! $cal_mod_group = $mx_block->get_parameters( 'cal_mod_group' ); // echo($cal_auth_all.$cal_auth_reg.$cal_filter); // Get Calsnails target block ! $cal_block_id = $mx_block->get_parameters( 'target_block' ); $cal_page_id = get_page_id( $cal_block_id ); *************** *** 275,279 **** // Add EDIT block nav // $is_auth_ary = array(); - // $is_auth_ary = block_auth(AUTH_EDIT, $block_id , $userdata, $block_config[$block_id][auth_edit], $block_config[$block_id][auth_edit_group] ); $is_cal_moderator = !$cal_mode_mini ? mx_is_group_member( $cal_mod_group ) : false; --- 275,278 ---- |