|
From: Jon O. <jon...@us...> - 2005-12-09 23:22:11
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9047 Modified Files: common.php index.php login.php Log Message: - phpbb_stats per page - updated schemas - site search optimization (in progress) - code cleanup in index.php, common.php and page_header.php - gzip fixes in progress Index: login.php =================================================================== RCS file: /cvsroot/mxbb/core/login.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** login.php 8 Dec 2005 14:41:48 -0000 1.14 --- login.php 9 Dec 2005 23:22:03 -0000 1.15 *************** *** 166,170 **** if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN)) { ! $page_title = $lang['Login']; include($mx_root_path . 'includes/page_header.'.$phpEx); --- 166,170 ---- if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN)) { ! $mx_page->page_title = $lang['Login']; include($mx_root_path . 'includes/page_header.'.$phpEx); Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** common.php 8 Dec 2005 21:41:27 -0000 1.44 --- common.php 9 Dec 2005 23:22:03 -0000 1.45 *************** *** 23,27 **** die("Hacking attempt"); } - define('IN_PHPBB', 1); --- 23,26 ---- *************** *** 197,202 **** include_once($phpbb_root_path . 'includes/functions.' . $phpEx); include_once($phpbb_root_path . 'includes/db.' . $phpEx); ! // We do not need this any longer, unset for safety purposes ! unset($dbpasswd); include_once($phpbb_root_path . 'includes/functions_selects.' . $phpEx); include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); --- 196,200 ---- include_once($phpbb_root_path . 'includes/functions.' . $phpEx); include_once($phpbb_root_path . 'includes/db.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_selects.' . $phpEx); include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); *************** *** 293,302 **** } - // - // Initialize GZIP handler (if necessary) and PHP sessions - // - $do_gzip_compress = FALSE; - mx_session_start(); // Note: this needs $board_config populated! - if( file_exists($phpbb_root_path . 'attach_mod') ) { --- 291,294 ---- *************** *** 316,318 **** --- 308,318 ---- mx_message_die(GENERAL_MESSAGE, 'Board_disable', 'Information'); } + + // + // Initialize GZIP handler (if necessary) and PHP sessions + // Note! This is a tweak, modding the standard page_header.php file + // + $do_gzip_compress = FALSE; + mx_session_start(); // Note: this needs $board_config populated! + ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** index.php 12 Oct 2005 15:37:32 -0000 1.45 --- index.php 9 Dec 2005 23:22:03 -0000 1.46 *************** *** 19,37 **** */ - //define('MX_DEBUG', 1); define( 'IN_PORTAL', 1 ); - $mx_root_path = "./"; - include($mx_root_path . 'extension.inc'); include($mx_root_path . 'common.' . $phpEx); - $view_page = false; - - // - // Page selector - // - $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); - // // Start session management --- 19,27 ---- *************** *** 39,46 **** $userdata = session_pagestart($user_ip, - ( 1000 + $page_id )); mx_init_userprefs($userdata); - // // End session management // if ( $mx_request_vars->is_request('mx_copy') ) { --- 29,44 ---- $userdata = session_pagestart($user_ip, - ( 1000 + $page_id )); mx_init_userprefs($userdata); // // End session management // + + // + // Page selector + // + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); + + // + // Show copyrights + // if ( $mx_request_vars->is_request('mx_copy') ) { *************** *** 49,53 **** // ! // Load page and block classes // $mx_page = new mx_page(); --- 47,51 ---- // ! // Load and instatiate page and block classes // $mx_page = new mx_page(); *************** *** 56,67 **** // ! // ...and define some basic vars ! // ! $mx_page_title .= $mx_page->info['page_name']; ! $page_icon = $mx_page->info['page_icon']; ! $page_ov_header = $mx_page->info['page_header']; ! ! // ! // Page auth // if ( !$mx_page->auth_view && $userdata['session_logged_in'] ) --- 54,58 ---- // ! // Page Auth and IP filter // if ( !$mx_page->auth_view && $userdata['session_logged_in'] ) *************** *** 80,86 **** } - // ! // Initialize template // $layouttemplate = new mx_Template( $mx_root_path . 'templates/'. $theme['template_name'], $board_config, $db ); --- 71,76 ---- } // ! // Initialize page layout template // $layouttemplate = new mx_Template( $mx_root_path . 'templates/'. $theme['template_name'], $board_config, $db ); *************** *** 91,111 **** // ! // Generate the fold/unfold menu navigation switches (cookie based) ! // ! if ( !empty($HTTP_COOKIE_VARS['phpbbEdit_Blocks']) ) ! { ! $edit_on = $HTTP_COOKIE_VARS['phpbbEdit_Blocks']; ! } ! elseif ( $userdata['user_level'] == ADMIN ) ! { ! $edit_on = true; ! } ! else ! { ! $edit_on = false; ! } ! ! // ! // Start output of page --------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------ // --- 81,85 ---- // ! // Start output of page blocks --------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------ // *************** *** 174,178 **** // ! // View Auth ------------------------------------------------------------------------------- START // if ( ( $mx_block->auth_view && $mx_block->show_block ) || $mx_block->auth_mod ) --- 148,152 ---- // ! // View Auth ------------------------------------------------------------------------------- // if ( ( $mx_block->auth_view && $mx_block->show_block ) || $mx_block->auth_mod ) *************** *** 220,228 **** // ! // View Auth --------------------------------------------------------------------------------- END ! // ! ! // ! // Edit Auth --------------------------------------------------------------------------------- START // if ( ( ( $mx_block->auth_view && $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ) ) --- 194,198 ---- // ! // Edit Auth --------------------------------------------------------------------------------- // if ( ( ( $mx_block->auth_view && $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ) ) *************** *** 238,250 **** if ( $mx_dynamic_block->dynamic_block_id > 0 && $subblock == $total_subs - 1 && $mx_dynamic_block->auth_edit ) { ! $mx_dynamic_block->output_cp_button( $edit_on ); } if ( is_object($mx_parent_block) && $subblock == $total_subs - 1 && $mx_parent_block->auth_edit ) { ! $mx_parent_block->output_cp_button( $edit_on ); } ! $mx_block->output_cp_button( $edit_on ); // --- 208,220 ---- if ( $mx_dynamic_block->dynamic_block_id > 0 && $subblock == $total_subs - 1 && $mx_dynamic_block->auth_edit ) { ! $mx_dynamic_block->output_cp_button(); } if ( is_object($mx_parent_block) && $subblock == $total_subs - 1 && $mx_parent_block->auth_edit ) { ! $mx_parent_block->output_cp_button(); } ! $mx_block->output_cp_button(); // *************** *** 258,268 **** // ! // Edit Auth ----------------------------------------------------------------------------------- END ! // ! ! // ! // Block header -------------------------------------------------------------------------------- START // ! if ( $mx_block->auth_view && $mx_block->show_block && ( $mx_page->editcp_switch || $mx_block->show_title ) || $mx_block->auth_mod ) { $layouttemplate->assign_block_vars('layout_column.blocks.block_header', array()); --- 228,234 ---- // ! // Block header -------------------------------------------------------------------------------- // ! if ( $mx_block->auth_view && $mx_block->show_block && ( $mx_page->editcp_switch_on || $mx_block->show_title ) || $mx_block->auth_mod ) { $layouttemplate->assign_block_vars('layout_column.blocks.block_header', array()); *************** *** 278,285 **** // - // Block header ---------------------------------------------------------------------------------- END - // - - // // Output some subblock wrappers // --- 244,247 ---- |