|
From: Jon O. <jon...@us...> - 2005-10-23 18:48:30
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21549/modules/mx_textblocks Modified Files: mx_textblock_bbcode.php mx_textblock_blog.php mx_textblock_html.php mx_textblock_multi.php Log Message: Updated all core blocks to use the new $mx_block->get_parameters() api, instead of old red_block_config() function Index: mx_textblock_html.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_html.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_textblock_html.php 1 Oct 2005 14:10:46 -0000 1.9 --- mx_textblock_html.php 23 Oct 2005 18:48:21 -0000 1.10 *************** *** 19,34 **** */ ! if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } ! ! $block_config = read_block_config($block_id); ! ! $title = $block_config[$block_id]['block_title']; ! $message = $block_config[$block_id]['Html']['parameter_value']; ! ! //$message = str_replace("\n", "\n<br />\n", $message); // --- 19,32 ---- */ ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; ! $message = $mx_block->get_parameters( 'Html' ); // Index: mx_textblock_multi.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_multi.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mx_textblock_multi.php 1 Oct 2005 14:10:46 -0000 1.11 --- mx_textblock_multi.php 23 Oct 2005 18:48:21 -0000 1.12 *************** *** 19,41 **** */ ! if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } ! $block_config = read_block_config($block_id); ! $title = $block_config[$block_id]['block_title']; ! ! $message = $block_config[$block_id]['Text']['parameter_value']; ! ! $block_style = $block_config[$block_id]['block_style']['parameter_value']; ! $text_style = $block_config[$block_id]['text_style']['parameter_value']; ! $title_style = $block_config[$block_id]['title_style']['parameter_value']; ! $show_title = $block_config[$block_id]['show_title']['parameter_value']; ! $allow_bbcode = $block_config[$block_id]['allow_bbcode']['parameter_value'] == 'TRUE'; ! $allow_html = $block_config[$block_id]['allow_html']['parameter_value'] == 'TRUE'; ! $allow_smilies = $block_config[$block_id]['allow_smilies']['parameter_value'] == 'TRUE'; // ********************************************************************** --- 19,41 ---- */ ! if( !defined('IN_PORTAL') || !is_object($mx_block) ) { die("Hacking attempt"); } + // + // Read Block Settings + // + $title = $mx_block->block_info['block_title']; + $message = $mx_block->get_parameters( 'Text' ); ! $block_style = $mx_block->get_parameters( 'block_style' ); ! $text_style = $mx_block->get_parameters( 'text_style' ); ! $title_style = $mx_block->get_parameters( 'title_style' ); ! $show_title = $mx_block->get_parameters( 'show_title' ); ! $allow_bbcode = $mx_block->get_parameters( 'allow_bbcode' ) == 'TRUE'; ! $allow_html = $mx_block->get_parameters( 'allow_html' ) == 'TRUE'; ! $allow_smilies = $mx_block->get_parameters( 'allow_smilies' ) == 'TRUE'; // ********************************************************************** *************** *** 78,82 **** if( $allow_bbcode ) { ! $bbcode_uid = $block_config[$block_id]['Text']['parameter_opt']; $message = mx_decode($message, $bbcode_uid, $allow_smilies, $allow_bbcode); } --- 78,82 ---- if( $allow_bbcode ) { ! $bbcode_uid = $mx_block->get_parameters( 'Text', MX_GET_PAR_OPTIONS ); $message = mx_decode($message, $bbcode_uid, $allow_smilies, $allow_bbcode); } Index: mx_textblock_blog.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_blog.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_textblock_blog.php 1 Oct 2005 14:10:46 -0000 1.9 --- mx_textblock_blog.php 23 Oct 2005 18:48:21 -0000 1.10 *************** *** 19,22 **** --- 19,24 ---- */ + // NOTE: This script is NOT updated for mxBB 2.8 + if( !defined('IN_PORTAL') ) { *************** *** 50,57 **** $blog_id = $block_config[$block_id]['blog_id']['parameter_value']; - // $block_style = $block_config[$block_id][block_style]['parameter_value']; - // $text_style = $block_config[$block_id][text_style]['parameter_value']; - // $title_style = $block_config[$block_id][title_style]['parameter_value']; - // $show_title = $block_config[$block_id][show_title]['parameter_value']; // ********************************************************************** // Read language definition --- 52,55 ---- Index: mx_textblock_bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_bbcode.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_textblock_bbcode.php 1 Oct 2005 14:10:46 -0000 1.10 --- mx_textblock_bbcode.php 23 Oct 2005 18:48:21 -0000 1.11 *************** *** 18,22 **** * (at your option) any later version. */ ! if( !defined('IN_PORTAL') ) { die("Hacking attempt"); --- 18,23 ---- * (at your option) any later version. */ ! ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); *************** *** 24,33 **** // ! // Read block Configuration // ! $block_config = read_block_config($block_id); ! ! $title = $block_config[$block_id]['block_title']; ! $message = $block_config[$block_id][Text]['parameter_value']; $bbcode_on = $board_config['allow_bbcode'] ? true : false; --- 25,32 ---- // ! // Read Block Settings // ! $title = $mx_block->block_info['block_title']; ! $message = $mx_block->get_parameters( 'Text' ); $bbcode_on = $board_config['allow_bbcode'] ? true : false; *************** *** 42,46 **** if( $bbcode_on ) { ! $bbcode_uid = $block_config[$block_id]['Text']['parameter_opt']; $message = mx_decode($message, $bbcode_uid, $smilies_on, $bbcode_on); } --- 41,45 ---- if( $bbcode_on ) { ! $bbcode_uid = $mx_block->get_parameters( 'Text', MX_GET_PAR_OPTIONS ); $message = mx_decode($message, $bbcode_uid, $smilies_on, $bbcode_on); } |