Added more comments, $Id$ keywords etc for the whole core of TYPO3.
[Packages/TYPO3.CMS.git] / typo3 / alt_topmenu_dummy.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 Kasper Skaarhoj (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 * 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"
33 *
34 * $Id$
35 * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
36 * XHTML compliant content
37 *
38 * @author Kasper Skaarhoj <kasper@typo3.com>
39 */
40 /**
41 * [CLASS/FUNCTION INDEX of SCRIPT]
42 *
43 *
44 *
45 * 72: class SC_alt_topmenu_dummy
46 * 80: function main()
47 * 132: function printContent()
48 *
49 * TOTAL FUNCTIONS: 2
50 * (This index is automatically created/updated by the extension "extdeveval")
51 *
52 */
53
54
55 require ('init.php');
56 require ('template.php');
57 require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
58 require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
59 require_once ('class.alt_menu_functions.inc');
60
61
62
63
64
65 /**
66 * Script Class
67 *
68 * @author Kasper Skaarhoj <kasper@typo3.com>
69 * @package TYPO3
70 * @subpackage core
71 */
72 class SC_alt_topmenu_dummy {
73 var $content;
74
75 /**
76 * Main function - making the menu happen.
77 *
78 * @return void
79 */
80 function main() {
81 global $BE_USER,$LANG,$BACK_PATH,$TBE_MODULES,$TBE_TEMPLATE;
82
83 // IF noMenuMode is set to 'icons', then display menu instead of nothingness
84 if (!strcmp($BE_USER->uc['noMenuMode'],'icons')) {
85 // Loading the modules for this backend user:
86 $loadModules = t3lib_div::makeInstance('t3lib_loadModules');
87 $loadModules->load($TBE_MODULES);
88
89 // Creating menu object:
90 $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
91
92 // Start page
93 $TBE_TEMPLATE->docType = 'xhtml_trans';
94 $TBE_TEMPLATE->inDocStyles = 'BODY {background-color: '.$TBE_TEMPLATE->bgColor2.'; background-image: url(gfx/alt_topmenu_back_full.gif)}';
95 $this->content.=$TBE_TEMPLATE->startPage('Top frame icon menu');
96
97 // Make menu and add it:
98 $this->content.='<table border="0" cellpadding="0" cellspacing="0">
99 <tr>
100 <td><img src="clear.gif" width="6" height="10" alt="" /></td>
101 <td></td>
102 <td></td>
103 <td></td>
104 </tr>
105 <tr>
106 <td></td>
107 <td>'.$alt_menuObj->topMenu($loadModules->modules,0,'',3).'</td>
108 <td><img src="clear.gif" width="20" height="1" alt="" /></td>
109 <td>'.$alt_menuObj->topButtons().'</td>
110 </tr>
111 </table>';
112
113 // End page:
114 $this->content.=$TBE_TEMPLATE->endPage();
115 } else {
116
117 // Start page
118 $TBE_TEMPLATE->docType = 'xhtml_trans';
119 $TBE_TEMPLATE->inDocStyles = 'BODY {background-color: '.$TBE_TEMPLATE->bgColor2.'; background-image: url(gfx/alt_topmenu_back_dummy.gif)}';
120 $this->content.=$TBE_TEMPLATE->startPage('Top frame icon menu');
121
122 // End page:
123 $this->content.=$TBE_TEMPLATE->endPage();
124 }
125 }
126
127 /**
128 * Print output
129 *
130 * @return void
131 */
132 function printContent() {
133 echo $this->content;
134 }
135 }
136
137 // Include extension?
138 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_topmenu_dummy.php']) {
139 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_topmenu_dummy.php']);
140 }
141
142
143
144
145
146
147
148
149
150
151
152
153 // Make instance:
154 $SOBE = t3lib_div::makeInstance('SC_alt_topmenu_dummy');
155 $SOBE->main();
156 $SOBE->printContent();
157 ?>