|
From: FlorinCB <ory...@us...> - 2008-10-04 07:09:17
|
Update of /cvsroot/mxbb/core/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30073/includes Modified Files: mx_functions.php mx_functions_admincp.php mx_functions_bbcode.php mx_functions_core.php mx_functions_style.php mx_functions_tools.php page_header.php page_tail.php Log Message: new Mx_BBcode merged in one backend file Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** mx_functions_core.php 30 Sep 2008 07:04:37 -0000 1.106 --- mx_functions_core.php 4 Oct 2008 07:04:25 -0000 1.107 *************** *** 81,85 **** // include_once($mx_root_path . 'includes/sessions/'.$portal_config['portal_backend'].'/core.' . $phpEx); - // // Instantiate the mx_backend class --- 81,84 ---- Index: mx_functions_bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_bbcode.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mx_functions_bbcode.php 24 Sep 2008 14:37:15 -0000 1.15 --- mx_functions_bbcode.php 4 Oct 2008 07:04:25 -0000 1.16 *************** *** 26,29 **** --- 26,30 ---- $bbcode_tpl = null; + $bbcode_uid = null; // Need to initialize the random numbers only ONCE *************** *** 33,36 **** --- 34,43 ---- class bbcode_base { + + function bbcode() + { + $this->bbcode_uid = $this->make_bbcode_uid(); + } + /** * Loads bbcode templates from the bbcode.tpl file of the current template set. *************** *** 207,211 **** $text = str_replace("[i:$uid]", $bbcode_tpl['i_open'], $text); $text = str_replace("[/i:$uid]", $bbcode_tpl['i_close'], $text); ! // Patterns and replacements for URL and email tags.. $patterns = array(); --- 214,220 ---- $text = str_replace("[i:$uid]", $bbcode_tpl['i_open'], $text); $text = str_replace("[/i:$uid]", $bbcode_tpl['i_close'], $text); ! ! //$text = str_replace('url:' . $uid, 'url', $text); ! // Patterns and replacements for URL and email tags.. $patterns = array(); *************** *** 264,270 **** $text = preg_replace($patterns, $replacements, $text); // Remove our padding from the string.. $text = substr($text, 1); ! return $text; --- 273,282 ---- $text = preg_replace($patterns, $replacements, $text); + // Remove the uid from tags that have not been transformed into HTML + //$text = str_replace(':' . $uid, '', $text); + // Remove our padding from the string.. $text = substr($text, 1); ! return $text; *************** *** 288,293 **** global $mx_backend; // Unique ID for this message.. ! $uid = $mx_backend->dss_rand(); $uid = substr($uid, 0, BBCODE_UID_LEN); --- 300,309 ---- global $mx_backend; // Unique ID for this message.. ! $uid = $mx_backend->dss_rand(); + + // BBCode UID length fix + @define('BBCODE_UID_LEN', (PORTAL_BACKEND == 'phpbb3') ? 8 : 10); + $uid = substr($uid, 0, BBCODE_UID_LEN); *************** *** 340,344 **** //Start more bbcode ! // [stream]Sound URL[/stream] code.. $text = preg_replace("#\[stream\](.*?)\[/stream\]#si", "[stream:$uid]\\1[/stream:$uid]", $text); --- 356,361 ---- //Start more bbcode ! $text = str_replace('url:' . $uid, 'url', $text); ! // [stream]Sound URL[/stream] code.. $text = preg_replace("#\[stream\](.*?)\[/stream\]#si", "[stream:$uid]\\1[/stream:$uid]", $text); Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** mx_functions_tools.php 30 Sep 2008 07:04:37 -0000 1.44 --- mx_functions_tools.php 4 Oct 2008 07:04:25 -0000 1.45 *************** *** 67,71 **** function init($html_on = false, $bbcode_on = true, $smilies_on = false, $links_on = true, $images_on = true) { ! global $theme, $mx_cache; // --- 67,71 ---- function init($html_on = false, $bbcode_on = true, $smilies_on = false, $links_on = true, $images_on = true) { ! global $theme, $mx_cache, $phpBB2; // *************** *** 327,331 **** function encode_username($username) { ! global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; // --- 327,331 ---- function encode_username($username) { ! global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path,$phpBB2; // *************** *** 1625,1634 **** if( !function_exists('prepare_message') ) { ! $mx_backend->load_file('functions_post', 'phpbb2'); } if( !function_exists('add_search_words') ) { ! $mx_backend->load_file('functions_search', 'phpbb2'); } --- 1625,1634 ---- if( !function_exists('prepare_message') ) { ! include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_post.' . $phpEx); } if( !function_exists('add_search_words') ) { ! include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_search.' . $phpEx); } *************** *** 3125,3129 **** $smilies_on = 1) { ! global $db, $phpbb_root_path, $phpEx, $board_config, $user_ip, $portal_config, $lang, $userdata; // --- 3125,3129 ---- $smilies_on = 1) { ! global $db, $phpbb_root_path, $phpEx, $board_config, $user_ip, $portal_config, $lang, $userdata, $phpBB2; // *************** *** 3773,3777 **** function display_internal_comments() { ! global $template, $lang, $board_config, $phpEx, $db, $userdata, $images, $mx_user; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; --- 3773,3777 ---- function display_internal_comments() { ! global $template, $lang, $board_config, $phpEx, $db, $userdata, $images, $mx_user, $phpBB2; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; *************** *** 3986,3990 **** function display_phpbb_comments( ) { ! global $template, $lang, $board_config, $phpEx, $db, $userdata, $images, $mx_user; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; --- 3986,3990 ---- function display_phpbb_comments( ) { ! global $template, $lang, $board_config, $phpEx, $db, $userdata, $images, $mx_user, $phpBB2; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** page_header.php 30 Sep 2008 07:04:38 -0000 1.62 --- page_header.php 4 Oct 2008 07:04:25 -0000 1.63 *************** *** 367,371 **** // ob_start(); ! include($module_root_path . $mx_block->block_file); $overall_navigation_menu = ob_get_contents(); ob_end_clean(); --- 367,371 ---- // ob_start(); ! @include($module_root_path . $mx_block->block_file); $overall_navigation_menu = ob_get_contents(); ob_end_clean(); Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** mx_functions_admincp.php 27 Aug 2008 05:17:35 -0000 1.60 --- mx_functions_admincp.php 4 Oct 2008 07:04:25 -0000 1.61 *************** *** 15,18 **** --- 15,23 ---- } + if( !function_exists('sync') ) + { + include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_admin.' . $phpEx); + } + /**#@+ * AdminCP Class Flags Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** mx_functions.php 30 Sep 2008 07:04:36 -0000 1.94 --- mx_functions.php 4 Oct 2008 07:04:24 -0000 1.95 *************** *** 795,799 **** { global $phpEx, $mx_root_path; ! $dir = opendir($mx_root_path . $dirname); --- 795,799 ---- { global $phpEx, $mx_root_path; ! global $phpBB2; $dir = opendir($mx_root_path . $dirname); |