|
From: Markus P. <mar...@us...> - 2005-04-19 23:36:47
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17958/includes Modified Files: page_header.php page_tail.php Log Message: Revised page header/footer templates. Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** page_header.php 17 Mar 2005 11:30:37 -0000 1.17 --- page_header.php 19 Apr 2005 23:36:24 -0000 1.18 *************** *** 22,60 **** */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( "Hacking attempt" ); } ! define( 'HEADER_INC', true ); // gzip_compression [...970 lines suppressed...] ! include($mx_root_path . 'mx_meta.inc'); ! $meta_str = '<meta name="title" content="' . $title .'" />' . "\n"; ! $meta_str .= '<meta name="author" content="' . $author .'" />' . "\n"; ! $meta_str .= '<meta name="copyright" content="' . $copyright .'" />' . "\n"; ! $meta_str .= '<meta name="keywords" content="' . $keywords .'" />' . "\n"; ! $meta_str .= '<meta name="description" lang="' . $langcode .'" content="'. $description .'" />' . "\n"; ! $meta_str .= '<meta name="category" content="' . $rating .'" />' . "\n"; ! $meta_str .= '<meta name="robots" content="' . $index . ',' . $follow .'" />' . "\n"; ! $meta_str .= $header . "\n"; ! $template->assign_vars(array( ! 'META' => $meta_str) ! ); ! $template->pparse('overall_header'); ?> \ No newline at end of file Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** page_tail.php 16 Apr 2005 01:55:04 -0000 1.12 --- page_tail.php 19 Apr 2005 23:36:24 -0000 1.13 *************** *** 22,43 **** */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( 'Hacking attempt' ); } // Show the overall footer. ! ! // $admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="' . append_sid( PORTAL_URL . "admin/index.$phpEx") . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; ! $admin_link = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? '<a href="' . PORTAL_URL . 'admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; $template->set_filenames(array( 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl' ) ); ! if ( $show_edit_blocks_icon ) { - - // Generate the fold/unfold categories switches if ( ( $HTTP_COOKIE_VARS['phpbbEdit_Blocks'] ) != '' ) { --- 22,44 ---- */ ! if ( !defined('IN_PORTAL') ) { ! die('Hacking attempt'); } + // // Show the overall footer. ! // ! $admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="' . PORTAL_URL . 'admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; $template->set_filenames(array( 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl' ) ); ! ! // ! // Generate the fold/unfold categories switches ! // if ( $show_edit_blocks_icon ) { if ( ( $HTTP_COOKIE_VARS['phpbbEdit_Blocks'] ) != '' ) { *************** *** 52,66 **** $edit_on = false; } ! if ( $edit_on ) ! { ! $template->assign_block_vars('switch_edit_on', array()); ! } ! else ! { ! $template->assign_block_vars('switch_edit_off', array()); ! } } ! ! // Compose additinal copy footer for( $i = 0; $i < count($mxbb_footer_addup); $i++ ) { --- 53,62 ---- $edit_on = false; } ! $template->assign_block_vars('switch_edit_' . ( $edit_on ? 'on' : 'off' ), array()); } ! ! // ! // Compose additinal copy footer ! // for( $i = 0; $i < count($mxbb_footer_addup); $i++ ) { *************** *** 84,106 **** $template->assign_vars(array( - // MX Addon 'U_PORTAL_ROOT_PATH' => PORTAL_URL, 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, - 'MX_VERSION' => PORTAL_VERSION, 'MXBB_EXTRA' => $mxbb_footer_text, 'POWERED_BY' => $lang['Powered_by'], - // END - 'PHPBB_VERSION' => '2' . $board_config['version'], - // 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', 'U_EDIT_NAV' => $edit_nav_icon_url, 'ADMIN_OPTIONS' => $lang['Show_admin_options'], ! 'ADMIN_LINK' => $admin_link ! )); // Generate stats $endtime = explode(' ', microtime()); $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! $execution_stats = '<center><span class="copyright">' . sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)) . '</span></center>'; // Comment out next 3 lines and stats will be turned off $template->assign_vars(array( --- 80,104 ---- $template->assign_vars(array( 'U_PORTAL_ROOT_PATH' => PORTAL_URL, 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, 'MXBB_EXTRA' => $mxbb_footer_text, 'POWERED_BY' => $lang['Powered_by'], 'U_EDIT_NAV' => $edit_nav_icon_url, 'ADMIN_OPTIONS' => $lang['Show_admin_options'], ! 'MX_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . PORTAL_VERSION : '', ! 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '', ! 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', ! 'ADMIN_LINK' => $admin_link) ! ); ! ! // // Generate stats + // $endtime = explode(' ', microtime()); $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! $execution_stats = '<div align="center"><span class="copyright">' . sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)) . '</span></div>'; ! // Comment out next 3 lines and stats will be turned off $template->assign_vars(array( *************** *** 110,141 **** $template->pparse('overall_footer'); // Close our DB connection. ! $db->sql_close(); // Compress buffered output if required and send to browser ! if ( $do_gzip_compress ) { ! // Borrowed from php.net! ! $gzip_contents = ob_get_contents(); ob_end_clean(); ! $gzip_size = strlen( $gzip_contents ); ! $gzip_crc = crc32( $gzip_contents ); ! $gzip_contents = gzcompress( $gzip_contents, 9 ); ! $gzip_contents = substr( $gzip_contents, 0, strlen( $gzip_contents ) - 4 ); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $gzip_contents; ! echo pack( 'V', $gzip_crc ); ! echo pack( 'V', $gzip_size ); } ! //echo( '<br><br>'.var_export($_SESSION['mx_config']) ); ! //echo( '<br><br>'.var_export($_SESSION['mx_pages']) ); ! //echo( '<br><br>'.var_export($_SESSION) ); exit; --- 108,141 ---- $template->pparse('overall_footer'); + // // Close our DB connection. ! // $db->sql_close(); + // // Compress buffered output if required and send to browser ! // if ( $do_gzip_compress ) { ! // // Borrowed from php.net! ! // $gzip_contents = ob_get_contents(); ob_end_clean(); ! $gzip_size = strlen($gzip_contents); ! $gzip_crc = crc32($gzip_contents); ! $gzip_contents = gzcompress($gzip_contents, 9); ! $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $gzip_contents; ! echo pack('V', $gzip_crc); ! echo pack('V', $gzip_size); } ! //echo( '<br><br>'.var_export($_SESSION['mx_config']) ); ! //echo( '<br><br>'.var_export($_SESSION['mx_pages']) ); ! //echo( '<br><br>'.var_export($_SESSION) ); exit; |