2 /***************************************************************
5 * (c) 1999-2004 Kasper Skaarhoj (kasperYYYY@typo3.com)
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
28 * Alternative top menu
29 * Displays a horizontal menu with the same items as the default left vertical menu
30 * in the backend frameset. Only the icons are displayed and linked.
31 * Will appear as the default document in the top frame if configured to appear.
32 * This is the default menu used during "condensed mode"
35 * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
36 * XHTML compliant content
38 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
41 * [CLASS/FUNCTION INDEX of SCRIPT]
45 * 74: class SC_alt_topmenu_dummy
47 * 127: function dummyContent()
48 * 143: function printContent()
51 * (This index is automatically created/updated by the extension "extdeveval")
57 require ('template.php');
58 require_once (PATH_t3lib
.'class.t3lib_loadmodules.php');
59 require_once (PATH_t3lib
.'class.t3lib_basicfilefunc.php');
60 require_once ('class.alt_menu_functions.inc');
67 * Script Class for rendering the topframe dummy view.
68 * In the case where TYPO3 backend is configured to show the menu in the top frame this class will render the horizontal line of module icons in the top frame.
70 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
74 class SC_alt_topmenu_dummy
{
78 * Main function - making the menu happen.
83 global $BE_USER,$LANG,$BACK_PATH,$TBE_MODULES,$TBE_TEMPLATE;
85 // IF noMenuMode is set to 'icons', then display menu instead of nothingness
86 if (!strcmp($BE_USER->uc
['noMenuMode'],'icons')) {
88 // Loading the modules for this backend user:
89 $loadModules = t3lib_div
::makeInstance('t3lib_loadModules');
90 $loadModules->load($TBE_MODULES);
92 // Creating menu object:
93 $alt_menuObj = t3lib_div
::makeInstance('alt_menu_functions');
96 $TBE_TEMPLATE->docType
= 'xhtml_trans';
97 $TBE_TEMPLATE->bodyTagId
.= '-iconmenu';
98 $this->content
.=$TBE_TEMPLATE->startPage('Top frame icon menu');
100 // Make menu and add it:
104 Alternative module menu made of icons, displayed in top frame:
106 <table border="0" cellpadding="0" cellspacing="0" id="typo3-topMenu">
108 <td class="c-menu">'.$alt_menuObj->topMenu($loadModules->modules
,0,'',3).'</td>
109 '.($BE_USER->isAdmin() ?
'<td class="c-admin">'.$alt_menuObj->adminButtons().'</td>' : '').'
110 <td class="c-logout">'.$alt_menuObj->topButtons().'</td>
115 $this->content
.=$TBE_TEMPLATE->endPage();
117 // Make dummy content:
118 $this->dummyContent();
123 * Creates the dummy content of the top frame if no menu - which is a blank page.
127 function dummyContent() {
128 global $TBE_TEMPLATE;
131 $TBE_TEMPLATE->docType
= 'xhtml_trans';
132 $this->content
.=$TBE_TEMPLATE->startPage('Top frame dummy display');
135 $this->content
.=$TBE_TEMPLATE->endPage();
139 * Outputting the accumulated content to screen
143 function printContent() {
148 // Include extension?
149 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/alt_topmenu_dummy.php']) {
150 include_once($TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/alt_topmenu_dummy.php']);
165 $SOBE = t3lib_div
::makeInstance('SC_alt_topmenu_dummy');
167 $SOBE->printContent();