|
From: Jon O. <jon...@us...> - 2008-07-13 19:30:37
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1162/includes Modified Files: mx_functions_bbcode.php mx_functions_blockcp.php mx_functions_core.php mx_functions_tools.php template.php Log Message: bbcodes as a class, backend extended Index: mx_functions_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_blockcp.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** mx_functions_blockcp.php 11 Jul 2008 22:00:04 -0000 1.27 --- mx_functions_blockcp.php 13 Jul 2008 19:30:28 -0000 1.28 *************** *** 472,476 **** // Get the list of phpBB usergroups // ! $mx_backend->generate_group_select_sql(); if( !($result = $db->sql_query($sql)) ) --- 472,476 ---- // Get the list of phpBB usergroups // ! $sql = $mx_backend->generate_group_select_sql(); if( !($result = $db->sql_query($sql)) ) Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** mx_functions_core.php 12 Jul 2008 20:24:13 -0000 1.96 --- mx_functions_core.php 13 Jul 2008 19:30:28 -0000 1.97 *************** *** 65,69 **** global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $mx_table_prefix, $table_prefix, $phpEx, $tplEx; ! global $mx_backend, $phpbb_auth; // --- 65,69 ---- global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $mx_table_prefix, $table_prefix, $phpEx, $tplEx; ! global $mx_backend, $phpbb_auth, $mx_bbcode; // Index: mx_functions_bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_bbcode.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_functions_bbcode.php 12 Jul 2008 20:24:11 -0000 1.10 --- mx_functions_bbcode.php 13 Jul 2008 19:30:28 -0000 1.11 *************** *** 27,1181 **** $bbcode_tpl = null; ! /** ! * Loads bbcode templates from the bbcode.tpl file of the current template set. ! * Creates an array, keys are bbcode names like "b_open" or "url", values ! * are the associated template. ! * Probably pukes all over the place if there's something really screwed ! * with the bbcode.tpl file. ! * ! * Nathan Codding, Sept 26 2001. [...1926 lines suppressed...] { ! global $mx_page, $board_config, $phpbb_root_path, $phpEx; ! ! if( !function_exists('generate_smilies') ) ! { ! mx_cache::load_file('functions_post', 'phpbb2'); ! } ! ! if( !function_exists('smilies_pass') ) ! { ! mx_cache::load_file('bbcode', 'phpbb2'); ! } ! ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! $message = smilies_pass($message); ! $board_config['smilies_path'] = $smilies_path; ! return $message; } } Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** mx_functions_tools.php 10 Jul 2008 23:02:06 -0000 1.37 --- mx_functions_tools.php 13 Jul 2008 19:30:28 -0000 1.38 *************** *** 122,125 **** --- 122,127 ---- function display($text, $bbcode_uid = '') { + global $mx_bbcode; + // // strip html if reqd *************** *** 138,147 **** if ($text != '' && $bbcode_uid != '') { ! $text = ($this->bbcode_on) ? mx_bbencode_second_pass($text, $bbcode_uid) : preg_replace("/\:$bbcode_uid/si", '', $text); } if ( $text != '' ) { ! $text = mx_make_clickable($text); } --- 140,149 ---- if ($text != '' && $bbcode_uid != '') { ! $text = ($this->bbcode_on) ? $mx_bbcode->bbencode_second_pass($text, $bbcode_uid) : preg_replace("/\:$bbcode_uid/si", '', $text); } if ( $text != '' ) { ! $text = $mx_bbcode->make_clickable($text); } *************** *** 153,157 **** if ( $text != '' ) { ! $text = mx_smilies_pass($text); } } --- 155,159 ---- if ( $text != '' ) { ! $text = $mx_bbcode->smilies_pass($text); } } *************** *** 278,282 **** function encode($text) { ! global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; $this->bbcode_uid = ''; --- 280,284 ---- function encode($text) { ! global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path, $mx_bbcode; $this->bbcode_uid = ''; *************** *** 287,291 **** if (!empty($text)) { ! $this->bbcode_uid = ($this->bbcode_on) ? mx_make_bbcode_uid() : ''; $text = $this->prepare_message(trim($text), $this->html_on, $this->bbcode_on, $this->smilies_on, $this->bbcode_uid); } --- 289,293 ---- if (!empty($text)) { ! $this->bbcode_uid = ($this->bbcode_on) ? $mx_bbcode->make_bbcode_uid() : ''; $text = $this->prepare_message(trim($text), $this->html_on, $this->bbcode_on, $this->smilies_on, $this->bbcode_uid); } *************** *** 362,366 **** function encode_preview($text) { ! global $html_entities_match, $html_entities_replace, $board_config; if ($this->allow_all_html_tags) --- 364,368 ---- function encode_preview($text) { ! global $html_entities_match, $html_entities_replace, $board_config, $mx_bbcode; if ($this->allow_all_html_tags) *************** *** 373,382 **** $text = ( !empty($text) ) ? htmlspecialchars(trim(stripslashes($text))) : ''; ! $bbcode_uid = ( $this->bbcode_on ) ? mx_make_bbcode_uid() : ''; $text = stripslashes($this->prepare_message(addslashes($this->unprepare_message($text)), $this->html_on, $this->bbcode_on, $this->smilies_on, $bbcode_uid)); if( $this->bbcode_on ) { ! $text = mx_bbencode_second_pass($text, $bbcode_uid); } --- 375,384 ---- $text = ( !empty($text) ) ? htmlspecialchars(trim(stripslashes($text))) : ''; ! $bbcode_uid = ( $this->bbcode_on ) ? $mx_bbcode->make_bbcode_uid() : ''; $text = stripslashes($this->prepare_message(addslashes($this->unprepare_message($text)), $this->html_on, $this->bbcode_on, $this->smilies_on, $bbcode_uid)); if( $this->bbcode_on ) { ! $text = $mx_bbcode->bbencode_second_pass($text, $bbcode_uid); } *************** *** 386,394 **** } ! $text = mx_make_clickable($text); if( $this->smilies_on ) { ! $text = mx_smilies_pass($text); } --- 388,396 ---- } ! $text = $mx_bbcode->make_clickable($text); if( $this->smilies_on ) { ! $text = $mx_bbcode->smilies_pass($text); } *************** *** 437,441 **** function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0) { ! global $board_config, $html_entities_match, $html_entities_replace; // --- 439,443 ---- function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0) { ! global $board_config, $html_entities_match, $html_entities_replace, $mx_bbcode; // *************** *** 477,481 **** if($bbcode_on && $bbcode_uid != '') { ! $message = mx_bbencode_first_pass($message, $bbcode_uid); } --- 479,483 ---- if($bbcode_on && $bbcode_uid != '') { ! $message = $mx_bbcode->bbencode_first_pass($message, $bbcode_uid); } *************** *** 1790,1794 **** function _insert_pm() { ! global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; // --- 1792,1796 ---- function _insert_pm() { ! global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx, $mx_bbcode; // *************** *** 1827,1831 **** if ( $this->bbcode_on ) { ! $bbcode_uid = mx_make_bbcode_uid(); } --- 1829,1833 ---- if ( $this->bbcode_on ) { ! $bbcode_uid = $mx_bbcode->make_bbcode_uid(); } *************** *** 1972,1976 **** function _mailer() { ! global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; // --- 1974,1978 ---- function _mailer() { ! global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx, $mx_bbcode; // *************** *** 2010,2014 **** if ( $this->bbcode_on ) { ! $bbcode_uid = mx_make_bbcode_uid(); } --- 2012,2016 ---- if ( $this->bbcode_on ) { ! $bbcode_uid = $mx_bbcode->make_bbcode_uid(); } Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** template.php 11 Jul 2008 21:52:38 -0000 1.29 --- template.php 13 Jul 2008 19:30:28 -0000 1.30 *************** *** 921,928 **** { global $lang, $theme, $board_config; ! if ( !defined( 'IN_ADMIN' ) && (PORTAL_BACKEND == 'phpbb3') ) { - global $admin_script; $admin_script = ($admin_script) ? $admin_script : $filename; } --- 921,931 ---- { global $lang, $theme, $board_config; + global $admin_script; ! // ! // Note: This little snippet is needed to make the templating work with Olympus ! // ! if ( !defined( 'IN_ADMIN' ) ) { $admin_script = ($admin_script) ? $admin_script : $filename; } *************** *** 943,947 **** elseif ($admin_script) { ! ($include_once) ? include_once($admin_script) : include($admin_script); } else --- 946,950 ---- elseif ($admin_script) { ! ($include_once) ? include_once($admin_script) : include($admin_script); // See note above } else |