|
From: Jon O. <jon...@us...> - 2007-06-19 18:31:06
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13221 Modified Files: mx_functions_core.php page_header.php page_tail.php Log Message: The navigation menu is updated, to support also IE New core methods for adding header and footer text/files Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** page_header.php 5 May 2007 20:12:58 -0000 1.42 --- page_header.php 19 Jun 2007 18:30:43 -0000 1.43 *************** *** 211,222 **** // ! // Dump out additional css styles (defined by modules) // ! $mx_addional_css = ''; if ( count($mx_page->mxbb_css_addup) > 0 ) { foreach($mx_page->mxbb_css_addup as $key => $mx_css_path) { ! $mx_addional_css .= '<link rel="stylesheet" href="'. PORTAL_URL . $mx_css_path . TEMPLATE_ROOT_PATH . $theme['head_stylesheet'] . '" type="text/css" >'; } } --- 211,246 ---- // ! // Generate list of additional css files to include (defined by modules) // ! $mx_addional_css_files = ''; if ( count($mx_page->mxbb_css_addup) > 0 ) { foreach($mx_page->mxbb_css_addup as $key => $mx_css_path) { ! $mx_addional_css_files .= "\n".'<link rel="stylesheet" href="'. PORTAL_URL . $mx_css_path . '" type="text/css" >'; ! } ! } ! ! // ! // Generate list of additional js files to include (defined by modules) ! // ! $mx_addional_js_files = ''; ! if ( count($mx_page->mxbb_js_addup) > 0 ) ! { ! foreach($mx_page->mxbb_js_addup as $key => $mx_js_path) ! { ! $mx_addional_js_files .= "\n".'<script language="javascript" type="text/javascript" src="'. PORTAL_URL . $mx_js_path . '"></script>'; ! } ! } ! ! // ! // Generate additional header code (defined by modules) ! // ! $mx_addional_header_text = ''; ! if ( count($mx_page->mxbb_header_addup) > 0 ) ! { ! foreach($mx_page->mxbb_header_addup as $key => $mx_header_text) ! { ! $mx_addional_header_text .= "\n"."\n".$mx_header_text; } } *************** *** 359,363 **** 'T_GECKO_STYLESHEET' => 'gecko.css', ! 'MX_ADDITIONAL_CSS' => $mx_addional_css, 'MX_ICON_CSS' => $images['mx_graphics']['icon_style'], //- mxBB --- 383,389 ---- 'T_GECKO_STYLESHEET' => 'gecko.css', ! 'MX_ADDITIONAL_CSS_FILES' => $mx_addional_css_files, ! 'MX_ADDITIONAL_JS_FILES' => $mx_addional_js_files, ! 'MX_ADDITIONAL_HEADER_TEXT' => $mx_addional_header_text, 'MX_ICON_CSS' => $images['mx_graphics']['icon_style'], //- mxBB Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** page_tail.php 13 May 2007 20:33:04 -0000 1.29 --- page_tail.php 19 Jun 2007 18:30:44 -0000 1.30 *************** *** 79,82 **** --- 79,94 ---- } + // + // Generate additional footer code (defined by modules) + // + $mx_addional_footer_text = ''; + if ( count($mx_page->mxbb_footer_addup) > 0 ) + { + foreach($mx_page->mxbb_footer_addup as $key => $mx_footer_text) + { + $mx_addional_footer_text .= "\n"."\n".$mx_footer_text; + } + } + $template->assign_vars(array( 'U_PORTAL_ROOT_PATH' => PORTAL_URL, *************** *** 88,91 **** --- 100,104 ---- 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '', 'ADMIN_LINK' => $admin_link, + 'MX_ADDITIONAL_FOOTER_TEXT' => $mx_addional_footer_text, 'EXECUTION_STATS' => (defined('DEBUG')) ? $debug_output : '' )); Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** mx_functions_core.php 10 Jun 2007 21:23:35 -0000 1.45 --- mx_functions_core.php 19 Jun 2007 18:30:42 -0000 1.46 *************** *** 2659,2663 **** /** ! * Add css. * * Build up what css files to include in overall_header. --- 2659,2663 ---- /** ! * Add css file. * * Build up what css files to include in overall_header. *************** *** 2666,2672 **** * @param string $path */ ! function add_css($path = '') { ! $this->mxbb_css_addup[] = $path; } --- 2666,2776 ---- * @param string $path */ ! function add_css_file() { ! global $mx_block, $theme; ! ! $style_path = $theme['template_name'] . '/'; ! if ( file_exists($mx_block->module_root_path . 'templates/' . $style_path . $theme['head_stylesheet']) ) ! { ! $this->mxbb_css_addup[] = $mx_block->module_root_path . 'templates/' . $style_path . $theme['head_stylesheet']; ! } ! else ! { ! $this->mxbb_css_addup[] = $mx_block->module_root_path . 'templates/subSilver/' . $theme['head_stylesheet']; ! } ! } ! ! /** ! * Add js file. ! * ! * Build up what js files to include in overall_header. ! * ! * @access public ! * @param string $path ! */ ! function add_js_file($path = '') ! { ! $this->mxbb_js_addup[] = $mx_block->module_root_path . $path; ! } ! ! /** ! * Add header text. ! * ! * Build up additional header text. ! * ! * @access public ! * @param string $text ! * @param boolean $read_file ! */ ! function add_header_text($text = '', $read_file = false) ! { ! // Provide these variables to be evaluated in the file ! global $mx_block, $theme; ! ! if ($read_file) ! { ! if (file_exists($mx_block->module_root_path . $text)) ! { ! $data = file_get_contents($mx_block->module_root_path . $text); ! ! foreach ($theme as $key => $value) ! { ! $data = str_replace('$theme[\''.$key.'\']', $value, $data); ! } ! ! $this->mxbb_footer_addup[] = $data; ! } ! else ! { ! echo('Warning: Your module is trying to load a file ('.$mx_block->module_root_path . $text .') that doesn\'t exist)'); ! } ! } ! else ! { ! $this->mxbb_header_addup[] = $text; ! } ! } ! ! /** ! * Add footer text. ! * ! * Build up additional footer text. ! * ! * @access public ! * @param string $text ! * @param boolean $read_file ! */ ! function add_footer_text($text = '', $read_file = false) ! { ! // Provide these variables to be evaluated in the file ! global $mx_block, $theme; ! ! if ($read_file) ! { ! if (file_exists($mx_block->module_root_path . $text)) ! { ! $data = file_get_contents($mx_block->module_root_path . $text); ! ! foreach ($theme as $key => $value) ! { ! $data = str_replace('$theme[\''.$key.'\']', $value, $data); ! } ! ! foreach ($mx_block->block_info as $key => $value) ! { ! $data = str_replace('{$'.$key . '}', $value, $data); ! } ! ! $this->mxbb_footer_addup[] = $data; ! } ! else ! { ! echo('Warning: Your module is trying to load a file ('.$mx_block->module_root_path . $text .') that doesn\'t exist)'); ! } ! } ! else ! { ! $this->mxbb_footer_addup[] = $text; ! } } |