|
From: Jon O. <jon...@us...> - 2005-09-20 15:31:07
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15865/includes Modified Files: mx_functions_admincp.php mx_functions_core.php mx_functions_phpbb.php page_header.php Log Message: adding fixes for mxBB 2.8 RC 6 Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** page_header.php 26 Apr 2005 00:08:06 -0000 1.20 --- page_header.php 20 Sep 2005 15:30:58 -0000 1.21 *************** *** 71,77 **** // // Parse and show the overall header. // ! $template->set_filenames(array( 'overall_header' => ( $page_ov_header == '' ? ( empty($gen_simple_header) ? 'overall_header.tpl' : 'simple_header.tpl' ) : ( file_exists($mx_root_path . TEMPLATE_ROOT_PATH . $page_ov_header) ? $page_ov_header : 'overall_header.tpl' ) ) ) ); --- 71,88 ---- // + // If mxBB frane template is not set, instantiate it + // + if (!is_object($layouttemplate)) + { + // + // Initialize template + // + $layouttemplate = new mx_Template( $template->root, $board_config, $db ); + } + + // // Parse and show the overall header. // ! $layouttemplate->set_filenames(array( 'overall_header' => ( $page_ov_header == '' ? ( empty($gen_simple_header) ? 'overall_header.tpl' : 'simple_header.tpl' ) : ( file_exists($mx_root_path . TEMPLATE_ROOT_PATH . $page_ov_header) ? $page_ov_header : 'overall_header.tpl' ) ) ) ); *************** *** 97,100 **** --- 108,114 ---- // situation // + // This code is moved to the mx_online coreblock + // + /* $logged_visible_online = 0; $logged_hidden_online = 0; *************** *** 263,266 **** --- 277,281 ---- $l_online_users .= sprintf($l_g_user_s, $guests_online); } + */ // *************** *** 365,369 **** // in a template. // ! $template->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'SITE_DESCRIPTION' => $board_config['site_desc'], --- 380,384 ---- // in a template. // ! $layouttemplate->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'SITE_DESCRIPTION' => $board_config['site_desc'], *************** *** 491,495 **** if ( $page_id != 1 || $portal_config['top_phpbb_links'] == 0 ) { ! $template->assign_block_vars('portal_top_links_off', array()); } --- 506,510 ---- if ( $page_id != 1 || $portal_config['top_phpbb_links'] == 0 ) { ! $layouttemplate->assign_block_vars('portal_top_links_off', array()); } *************** *** 499,520 **** if ( !$userdata['session_logged_in'] ) { ! $template->assign_block_vars('switch_user_logged_out', array()); } else { ! $template->assign_block_vars('switch_user_logged_in', array()); if ( !empty($userdata['user_popup_pm']) ) { ! $template->assign_block_vars('switch_enable_pm_popup', array()); } } // ! // Do NOT set basedir when in EDIT mode // if ( !(isset($HTTP_POST_VARS['portalpage']) || isset($HTTP_GET_VARS['portalpage'])) ) { ! $template->assign_block_vars('switch_set_base', array()); } --- 514,535 ---- if ( !$userdata['session_logged_in'] ) { ! $layouttemplate->assign_block_vars('switch_user_logged_out', array()); } else { ! $layouttemplate->assign_block_vars('switch_user_logged_in', array()); if ( !empty($userdata['user_popup_pm']) ) { ! $layouttemplate->assign_block_vars('switch_enable_pm_popup', array()); } } // ! // Do NOT set basedir when in EDIT mode - NEEDED ANYMORE?????????????????????????????? // if ( !(isset($HTTP_POST_VARS['portalpage']) || isset($HTTP_GET_VARS['portalpage'])) ) { ! $layouttemplate->assign_block_vars('switch_set_base', array()); } *************** *** 526,530 **** if ( $is_gecko ) { ! $template->assign_block_vars('switch_gecko', array()); } --- 541,545 ---- if ( $is_gecko ) { ! $layouttemplate->assign_block_vars('switch_gecko', array()); } *************** *** 557,565 **** $meta_str .= $header . "\n"; ! $template->assign_vars(array( 'META' => $meta_str) ); ! $template->pparse('overall_header'); ?> \ No newline at end of file --- 572,580 ---- $meta_str .= $header . "\n"; ! $layouttemplate->assign_vars(array( 'META' => $meta_str) ); ! $layouttemplate->pparse('overall_header'); ?> \ No newline at end of file Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_functions_phpbb.php 20 Aug 2005 18:19:11 -0000 1.10 --- mx_functions_phpbb.php 20 Sep 2005 15:30:58 -0000 1.11 *************** *** 199,204 **** $template_name = $row['template_name'] ; ! // MX FIX for uninstalled themes ... use subSilver instead ! if ( !file_exists($mx_root_path . $template_path . $template_name . '/mx_login.tpl') ) { $template_path = 'templates/'; --- 199,206 ---- $template_name = $row['template_name'] ; ! // ! // mxBB FIX for uninstalled themes ... use subSilver instead ! // ! if ( !file_exists($mx_root_path . $template_path . $template_name . '/mx_main_layout.tpl') ) { $template_path = 'templates/'; *************** *** 445,448 **** --- 447,464 ---- } + // + // Fix for correcting possible "bad" links to phpBB + // + if (!(strpos($msg_text, 'href') === false)) + { + $msg_text = str_replace('<a href="index', '<a href="'.$phpbb_root_path.'index', $msg_text); + $msg_text = str_replace('<a href="viewforum', '<a href="'.$phpbb_root_path.'viewforum', $msg_text); + $msg_text = str_replace('<a href="viewtopic', '<a href="'.$phpbb_root_path.'viewtopic', $msg_text); + $msg_text = str_replace('<a href="modcp', '<a href="'.$phpbb_root_path.'modcp', $msg_text); + $msg_text = str_replace('<a href="groupcp', '<a href="'.$phpbb_root_path.'groupcp', $msg_text); + $msg_text = str_replace('<a href="posting', '<a href="'.$phpbb_root_path.'posting', $msg_text); + + } + $template->assign_vars(array( 'MESSAGE_TITLE' => $msg_title, Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_functions_core.php 9 Sep 2005 14:15:35 -0000 1.7 --- mx_functions_core.php 20 Sep 2005 15:30:58 -0000 1.8 *************** *** 862,870 **** function output_title() { ! global $layouttemplate; $this_block_title = !$this->show_title && $this->auth_mod ? '(' . $this->block_title . ')' : $this->block_title; $layouttemplate->assign_block_vars('layout_column.blocks.show_title', array( ! 'L_TITLE' => $this_block_title )); } --- 862,871 ---- function output_title() { ! global $layouttemplate, $title_class; $this_block_title = !$this->show_title && $this->auth_mod ? '(' . $this->block_title . ')' : $this->block_title; $layouttemplate->assign_block_vars('layout_column.blocks.show_title', array( ! 'L_TITLE' => $this_block_title, ! 'TITLECLASS' => ( !empty( $title_class ) ? $title_class : 'mxthHead' ) )); } *************** *** 1700,1704 **** $this->total_block = count($this->blocks); ! $this->$block_border_graphics = ( !empty($this->info['page_graph_border']) && file_exists($mx_root_path . TEMPLATE_ROOT_PATH . 'images/' . $this->info['page_graph_border'] . '1-1.gif') ) ? true : false ; $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; --- 1701,1705 ---- $this->total_block = count($this->blocks); ! $this->block_border_graphics = ( !empty($this->info['page_graph_border']) && file_exists($mx_root_path . TEMPLATE_ROOT_PATH . 'images/' . $this->info['page_graph_border'] . '1-1.gif') ) ? true : false ; $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_functions_admincp.php 10 Sep 2005 22:08:24 -0000 1.7 --- mx_functions_admincp.php 20 Sep 2005 15:30:58 -0000 1.8 *************** *** 1645,1649 **** } - echo('block' . $column_id . ' ' . $page_id); $this->move('block', $column_id, $page_id); $show_index = true; --- 1645,1648 ---- *************** *** 2273,2277 **** { $module_data = explode($delimeter, trim($fcontents[$i])); ! echo($module_data[0].'<br>'); switch( $module_data[0] ) { --- 2272,2276 ---- { $module_data = explode($delimeter, trim($fcontents[$i])); ! switch( $module_data[0] ) { *************** *** 2827,2838 **** } - /* - echo "<br /><br />"; - echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; - echo "<tr><th class=\"thHead\" align=\"center\">Module Installation / Information - *.pak import</th></tr>"; - echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $output_message . "</span></td></tr>"; - echo "</table><br />"; - */ - if( file_exists(dirname($mx_root_path . $file_name) . "/db_install.php") && !$upgrade_module && !$pak_debug ) { --- 2826,2829 ---- |