|
From: Jon O. <jon...@us...> - 2005-10-23 18:53:01
|
Update of /cvsroot/mxbb/mx_smartor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22562/modules/mx_smartor Modified Files: album.php album_lists.php Log Message: Updated all blocks to use the new $mx_block->get_parameters() api, instead of old red_block_config() function Index: album_lists.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_lists.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** album_lists.php 1 Oct 2005 14:17:36 -0000 1.10 --- album_lists.php 23 Oct 2005 18:52:53 -0000 1.11 *************** *** 48,56 **** else { ! ! // Read block Configuration ! ! $block_config = read_block_config( $block_id ); ! $title = $block_config[$block_id]['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); --- 48,55 ---- else { ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); *************** *** 60,89 **** $album_root_path = $module_root_path . 'album_mod/'; - include_once( $album_root_path . 'album_constants.' . $phpEx ); // Get smartor target block ! $smartor_block_id = $block_config[$block_id]['target_block']['parameter_value']; $smartor_page_id = get_page_id( $smartor_block_id ); - /* - $temp_list = $_SESSION['mx_pages']; - while ( list( $page_idd, $page_roww ) = each( $temp_list ) ) - { - $block_countt = count( $page_roww['blocks'] ); - - for( $j = 0; $j < $block_countt; $j++ ) - { - $block_idd = $page_roww['blocks'][$j]['block_id']; - - if ( $smartor_block_id == $block_idd ) - { - $smartor_page_id = str_replace( 'page_', '', $page_idd ); - break; - } - } - } - */ - // ********************************************************************** // Read language definition --- 59,70 ---- $album_root_path = $module_root_path . 'album_mod/'; include_once( $album_root_path . 'album_constants.' . $phpEx ); + // // Get smartor target block ! // ! $smartor_block_id = $mx_block->get_parameters( 'target_block' ); $smartor_page_id = get_page_id( $smartor_block_id ); // ********************************************************************** // Read language definition *************** *** 127,140 **** // Read block Configuration ! $block_config = read_block_config( $block_id ); ! ! $album_sp_config['img_rows'] = $block_config[$block_id][num_of_rows]['parameter_value']; ! $album_sp_config['img_cols'] = $block_config[$block_id][num_of_cols]['parameter_value']; ! ! $album_sp_config['disp_late'] = $block_config[$block_id][display_latest_posts]['parameter_value'] == 'TRUE' ? 1 : 0; ! $album_sp_config['disp_high'] = $block_config[$block_id][display_top_ranked]['parameter_value'] == 'TRUE' ? 1 : 0; ! $album_sp_config['disp_rand'] = $block_config[$block_id][display_random_posts]['parameter_value'] == 'TRUE' ? 1 : 0; ! $album_sp_config['disp_most'] = $block_config[$block_id][display_most_posts]['parameter_value'] == 'TRUE' ? 1 : 0; $album_config['rate'] = 1; --- 108,118 ---- // Read block Configuration + $album_sp_config['img_rows'] = $mx_block->get_parameters( 'num_of_rows' ); + $album_sp_config['img_cols'] = $mx_block->get_parameters( 'num_of_cols' ); ! $album_sp_config['disp_late'] = $mx_block->get_parameters( 'display_latest_posts' ) == 'TRUE' ? 1 : 0; ! $album_sp_config['disp_high'] = $mx_block->get_parameters( 'display_top_ranked' ) == 'TRUE' ? 1 : 0; ! $album_sp_config['disp_rand'] = $mx_block->get_parameters( 'display_random_posts' ) == 'TRUE' ? 1 : 0; ! $album_sp_config['disp_most'] = $mx_block->get_parameters( 'display_most_posts' ) == 'TRUE' ? 1 : 0; $album_config['rate'] = 1; Index: album.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** album.php 1 Oct 2005 14:17:36 -0000 1.7 --- album.php 23 Oct 2005 18:52:53 -0000 1.8 *************** *** 50,58 **** else { ! ! // Read block Configuration ! ! $block_config = read_block_config( $block_id ); ! $title = $block_config[$block_id]['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); --- 50,57 ---- else { ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); |