Initial revision
[Packages/TYPO3.CMS.git] / typo3 / alt_topmenu_dummy.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
6 * All rights reserved
7 *
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.
13 *
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.
18 *
19 *
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.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Alternative top menu
29 *
30 * Displays a horizontal menu with the same items as the default left vertical menu
31 * in the backend frameset. Only the icons are displayed and linked.
32 * Will appear as the default document in the top frame if configured to appear.
33 * This is the default menu used during "condensed mode"
34 *
35 * @author Kasper Skårhøj <kasper@typo3.com>
36 * @package TYPO3
37 * @subpackage core
38 *
39 * Revised for TYPO3 3.6 2/2003 by Kasper Skårhøj
40 * XHTML compliant content
41 */
42
43
44 require ('init.php');
45 require ('template.php');
46 require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
47 require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
48 require_once ('class.alt_menu_functions.inc');
49
50
51 // ***************************
52 // Script Class
53 // ***************************
54 class SC_alt_topmenu_dummy {
55 var $content;
56
57 /**
58 * Main function - making the menu happen.
59 */
60 function main() {
61 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
62 global $TBE_MODULES,$TBE_TEMPLATE;
63
64 // IF noMenuMode is set to 'icons', then display menu instead of nothingness
65 if (!strcmp($BE_USER->uc['noMenuMode'],'icons')) {
66 // Loading the modules for this backend user:
67 $loadModules = t3lib_div::makeInstance('t3lib_loadModules');
68 $loadModules->load($TBE_MODULES);
69
70 // Creating menu object:
71 $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
72
73 // Start page
74 $TBE_TEMPLATE->docType = 'xhtml_trans';
75 $TBE_TEMPLATE->inDocStyles = 'BODY {background-color: '.$TBE_TEMPLATE->bgColor2.'; background-image: url(gfx/alt_topmenu_back_full.gif)}';
76 $this->content.=$TBE_TEMPLATE->startPage('Top frame icon menu');
77
78 // Make menu and add it:
79 $this->content.='<table border="0" cellpadding="0" cellspacing="0">
80 <tr>
81 <td><img src="clear.gif" width="6" height="10" alt="" /></td>
82 <td></td>
83 <td></td>
84 <td></td>
85 </tr>
86 <tr>
87 <td></td>
88 <td>'.$alt_menuObj->topMenu($loadModules->modules,0,'',3).'</td>
89 <td><img src="clear.gif" width="20" height="1" alt="" /></td>
90 <td>'.$alt_menuObj->topButtons().'</td>
91 </tr>
92 </table>';
93
94 // End page:
95 $this->content.=$TBE_TEMPLATE->endPage();
96 } else {
97
98 // Start page
99 $TBE_TEMPLATE->docType = 'xhtml_trans';
100 $TBE_TEMPLATE->inDocStyles = 'BODY {background-color: '.$TBE_TEMPLATE->bgColor2.'; background-image: url(gfx/alt_topmenu_back_dummy.gif)}';
101 $this->content.=$TBE_TEMPLATE->startPage('Top frame icon menu');
102
103 // End page:
104 $this->content.=$TBE_TEMPLATE->endPage();
105 }
106 }
107
108 /**
109 * Print output
110 */
111 function printContent() {
112 echo $this->content;
113 }
114 }
115
116 // Include extension?
117 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_topmenu_dummy.php']) {
118 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_topmenu_dummy.php']);
119 }
120
121
122
123
124
125
126
127
128
129
130
131
132 // Make instance:
133 $SOBE = t3lib_div::makeInstance('SC_alt_topmenu_dummy');
134 $SOBE->main();
135 $SOBE->printContent();
136 ?>