|
From: Jon O. <jon...@us...> - 2005-10-23 18:51:13
|
Update of /cvsroot/mxbb/mx_newssuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22228/modules/mx_newssuite Modified Files: news.php Log Message: Updated all blocks to use the new $mx_block->get_parameters() api, instead of old red_block_config() function Index: news.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/news.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** news.php 1 Oct 2005 14:14:44 -0000 1.11 --- news.php 23 Oct 2005 18:51:01 -0000 1.12 *************** *** 47,55 **** // - // Read block Configuration - // - $block_config = read_block_config( $block_id ); - - // // Includes... // --- 47,50 ---- *************** *** 59,72 **** // Setup config parameters // ! $config_name = array( 'news_display', 'news_display_edit_info', 'news_display_signature', 'news_items', 'news_display_polls', 'news_time_format', 'news_trim_char', 'news_block_border', 'news_block_header', 'news_block_footer', 'news_display_block_title', 'news_show_title', 'news_sort_method', 'news_sort_par', 'news_sort_style', 'news_truncate_num', 'news_truncate_num_subject', 'news_mode_switch', 'news_source_switch', 'news_mode_operate', 'enable_html_msg', 'enable_bbcode_msg', 'fix_up', 'news_mode_tagging', 'news_mode_pinning', 'news_filter_time' ); for( $i = 0; $i < count( $config_name ); $i++ ) { ! $config_value = $block_config[$block_id][$config_name[$i]]['parameter_value']; $newssuite_config[$config_name[$i]] = $config_value; } ! $title = $block_config[$block_id]['block_title']; ! $description = $block_config[$block_id]['block_desc']; // --- 54,67 ---- // Setup config parameters // ! $config_name = array( 'news_display', 'news_display_edit_info', 'news_display_signature', 'news_items', 'news_display_polls', 'news_time_format', 'news_trim_char', 'news_block_border', 'news_block_header', 'news_block_footer', 'news_display_block_title', 'news_show_title', 'news_sort_method', 'news_sort_par', 'news_sort_style', 'news_truncate_num', 'news_truncate_num_subject', 'news_mode_switch', 'news_source_switch', 'news_mode_operate', 'enable_html_msg', 'enable_bbcode_msg', 'fix_up', 'news_mode_tagging', 'news_mode_pinning', 'news_filter_time', 'news_type_select' ); for( $i = 0; $i < count( $config_name ); $i++ ) { ! $config_value = $mx_block->get_parameters( $config_name[$i] ); $newssuite_config[$config_name[$i]] = $config_value; } ! $title = $mx_block->block_info['block_title']; ! $description = $mx_block->block_info['block_desc']; // *************** *** 93,105 **** // Extract 'what posts to view info', the cool Array ;) // ! ! /* ! $news_type_select_data = array(); ! $news_type_select_temp = $block_config[$block_id][news_type_select]['parameter_value']; ! $news_type_select_temp = stripslashes( $news_type_select_temp ); ! $news_type_select_data = eval( "return " . $news_type_select_temp . ";" ); ! */ ! ! $news_type_select_data = ( !empty( $block_config[$block_id][news_type_select]['parameter_value'] ) ) ? unserialize( $block_config[$block_id][news_type_select]['parameter_value'] ) : array(); // ----------------- --- 88,92 ---- // Extract 'what posts to view info', the cool Array ;) // ! $news_type_select_data = !empty( $newssuite_config['news_type_select'] ) ? unserialize( $newssuite_config['news_type_select'] ) : array(); // ----------------- |