Documentation TYPO3 par Ameos

alt_topmenu_dummy.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 1999-2004 Kasper Skaarhoj (kasperYYYY@typo3.com)
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *  A copy is found in the textfile GPL.txt and important notices to the license
00017 *  from the author is found in LICENSE.txt distributed with these scripts.
00018 *
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00056 require ('init.php');
00057 require ('template.php');
00058 require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
00059 require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
00060 require_once ('class.alt_menu_functions.inc');
00061 
00062 
00063 
00064 
00065 
00074 class SC_alt_topmenu_dummy {
00075         var $content;
00076 
00082         function main() {
00083                 global $BE_USER,$LANG,$BACK_PATH,$TBE_MODULES,$TBE_TEMPLATE;
00084 
00085                         // IF noMenuMode is set to 'icons', then display menu instead of nothingness
00086                 if (!strcmp($BE_USER->uc['noMenuMode'],'icons'))        {
00087 
00088                                 // Loading the modules for this backend user:
00089                         $loadModules = t3lib_div::makeInstance('t3lib_loadModules');
00090                         $loadModules->load($TBE_MODULES);
00091 
00092                                 // Creating menu object:
00093                         $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
00094 
00095                                 // Start page
00096                         $TBE_TEMPLATE->docType = 'xhtml_trans';
00097                         $TBE_TEMPLATE->bodyTagId.= '-iconmenu';
00098                         $this->content.=$TBE_TEMPLATE->startPage('Top frame icon menu');
00099 
00100                                 // Make menu and add it:
00101                         $this->content.='
00102 
00103                                 <!--
00104                                   Alternative module menu made of icons, displayed in top frame:
00105                                 -->
00106                                 <table border="0" cellpadding="0" cellspacing="0" id="typo3-topMenu">
00107                                         <tr>
00108                                                 <td class="c-menu">'.$alt_menuObj->topMenu($loadModules->modules,0,'',3).'</td>
00109                                                 '.($BE_USER->isAdmin() ? '<td class="c-admin">'.$alt_menuObj->adminButtons().'</td>' : '').'
00110                                                 <td class="c-logout">'.$alt_menuObj->topButtons().'</td>
00111                                         </tr>
00112                                 </table>';
00113 
00114                                 // End page:
00115                         $this->content.=$TBE_TEMPLATE->endPage();
00116                 } else {
00117                                 // Make dummy content:
00118                         $this->dummyContent();
00119                 }
00120         }
00121 
00127         function dummyContent() {
00128                 global $TBE_TEMPLATE;
00129 
00130                         // Start page
00131                 $TBE_TEMPLATE->docType = 'xhtml_trans';
00132                 $this->content.=$TBE_TEMPLATE->startPage('Top frame dummy display');
00133 
00134                         // End page:
00135                 $this->content.=$TBE_TEMPLATE->endPage();
00136         }
00137 
00143         function printContent() {
00144                 echo $this->content;
00145         }
00146 }
00147 
00148 // Include extension?
00149 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_topmenu_dummy.php'])     {
00150         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_topmenu_dummy.php']);
00151 }
00152 
00153 
00154 
00155 
00156 
00157 
00158 
00159 
00160 
00161 
00162 
00163 
00164 // Make instance:
00165 $SOBE = t3lib_div::makeInstance('SC_alt_topmenu_dummy');
00166 $SOBE->main();
00167 $SOBE->printContent();
00168 ?>


Généré par L'expert TYPO3 avec  doxygen 1.4.6