[ Index ] |
|
Code source de XOOPS 2.0.17.1 |
1 <?php 2 // $Id: header.php 978 2007-08-11 08:02:19Z phppp $ 3 // ------------------------------------------------------------------------ // 4 // XOOPS - PHP Content Management System // 5 // Copyright (c) 2000 XOOPS.org // 6 // <http://www.xoops.org/> // 7 // ------------------------------------------------------------------------ // 8 // This program is free software; you can redistribute it and/or modify // 9 // it under the terms of the GNU General Public License as published by // 10 // the Free Software Foundation; either version 2 of the License, or // 11 // (at your option) any later version. // 12 // // 13 // You may not change or alter any portion of this comment or credits // 14 // of supporting developers from this source code or any supporting // 15 // source code which is considered copyrighted (c) material of the // 16 // original comment or credit authors. // 17 // // 18 // This program is distributed in the hope that it will be useful, // 19 // but WITHOUT ANY WARRANTY; without even the implied warranty of // 20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 21 // GNU General Public License for more details. // 22 // // 23 // You should have received a copy of the GNU General Public License // 24 // along with this program; if not, write to the Free Software // 25 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // 26 // ------------------------------------------------------------------------ // 27 defined("XOOPS_ROOT_PATH") or die( 'XOOPS root path not defined' ); 28 29 include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; 30 31 //global $xoopsLogger; 32 33 if ( !isset( $xoopsLogger ) ) { $xoopsLogger =& $GLOBALS['xoopsLogger']; } 34 35 $xoopsLogger->stopTime( 'Module init' ); 36 $xoopsLogger->startTime( 'XOOPS output init' ); 37 38 39 if ($xoopsConfig['theme_set'] != 'default' && file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/theme.php')) { 40 require_once XOOPS_ROOT_PATH . '/include/xoops13_header.php'; 41 } else { 42 global $xoopsOption, $xoopsConfig, $xoopsModule; 43 44 $xoopsOption['theme_use_smarty'] = 1; 45 46 // include Smarty template engine and initialize it 47 require_once XOOPS_ROOT_PATH . '/class/template.php'; 48 require_once XOOPS_ROOT_PATH . '/class/theme.php'; 49 require_once XOOPS_ROOT_PATH . '/class/theme_blocks.php'; 50 51 if ( @$xoopsOption['template_main'] ) { 52 if ( false === strpos( $xoopsOption['template_main'], ':' ) ) { 53 $xoopsOption['template_main'] = 'db:' . $xoopsOption['template_main']; 54 } 55 } 56 $xoopsThemeFactory =& new xos_opal_ThemeFactory(); 57 $xoopsThemeFactory->allowedThemes = $xoopsConfig['theme_set_allowed']; 58 $xoopsThemeFactory->defaultTheme = $xoopsConfig['theme_set']; 59 60 /** 61 * @var xos_opal_Theme 62 */ 63 $xoTheme =& $xoopsThemeFactory->createInstance( array( 64 'contentTemplate' => @$xoopsOption['template_main'], 65 ) ); 66 $xoopsTpl =& $xoTheme->template; 67 68 $xoTheme->addScript( '/include/xoops.js', array( 'type' => 'text/javascript' ) ); 69 70 // Weird, but need extra <script> tags for 2.0.x themes 71 //$xoopsTpl->assign('xoops_js', '//--></script><script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script><script type="text/javascript"><!--'); 72 73 if ( @is_object( $xoTheme->plugins['xos_logos_PageBuilder'] ) ) { 74 $aggreg =& $xoTheme->plugins['xos_logos_PageBuilder']; 75 76 $xoopsTpl->assign_by_ref( 'xoBlocks', $aggreg->blocks ); 77 78 // Backward compatibility code for pre 2.0.14 themes 79 $xoopsTpl->assign_by_ref( 'xoops_lblocks', $aggreg->blocks['canvas_left'] ); 80 $xoopsTpl->assign_by_ref( 'xoops_rblocks', $aggreg->blocks['canvas_right'] ); 81 $xoopsTpl->assign_by_ref( 'xoops_ccblocks', $aggreg->blocks['page_topcenter'] ); 82 $xoopsTpl->assign_by_ref( 'xoops_clblocks', $aggreg->blocks['page_topleft'] ); 83 $xoopsTpl->assign_by_ref( 'xoops_crblocks', $aggreg->blocks['page_topright'] ); 84 85 $xoopsTpl->assign( 'xoops_showlblock', !empty($aggreg->blocks['canvas_left']) ); 86 $xoopsTpl->assign( 'xoops_showrblock', !empty($aggreg->blocks['canvas_right']) ); 87 $xoopsTpl->assign( 'xoops_showcblock', !empty($aggreg->blocks['page_topcenter']) || !empty($aggreg->blocks['page_topleft']) || !empty($aggreg->blocks['page_topright']) ); 88 } 89 90 if ( $xoopsModule ) { 91 $xoTheme->contentCacheLifetime = @$xoopsConfig['module_cache'][ $xoopsModule->getVar('mid', 'n') ]; 92 } 93 if ( $xoTheme->checkCache() ) { 94 exit(); 95 } 96 97 if ( !isset($xoopsOption['template_main']) && $xoopsModule ) { 98 // new themes using Smarty does not have old functions that are required in old modules, so include them now 99 include XOOPS_ROOT_PATH.'/include/old_theme_functions.php'; 100 // need this also 101 $xoopsTheme['thename'] = $xoopsConfig['theme_set']; 102 ob_start(); 103 } 104 105 $xoopsLogger->stopTime( 'XOOPS output init' ); 106 $xoopsLogger->startTime( 'Module display' ); 107 108 109 } 110 111 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Nov 25 11:44:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |