0c77d4edb22424ceb1ac3c1356fa6a0e4467def6
2 /***************************************************************
5 * (c) 1999-2003 Kasper Skaarhoj (kasper@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 ***************************************************************/
30 * The script is called in the top frame of the backend typically by a click on an icon for which a context menu should appear.
31 * Either this script displays the context menu horizontally in the top frame or alternatively (default in MSIE, Mozilla) it writes the output to a <div>-layer in the calling document (which then appears as a layer/context sensitive menu)
32 * Writing content back into a <div>-layer is necessary if we want individualized context menus with any specific content for any specific element.
33 * Context menus can appear for either database elements or files
34 * The input to this script is basically the "&init" var which is divided by "|" - each part is a reference to table|uid|listframe-flag.
36 * If you want to integrate a context menu in your scripts, please see template::getContextMenuCode()
39 * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
42 * @author Kasper Skaarhoj <kasper@typo3.com>
45 * [CLASS/FUNCTION INDEX of SCRIPT]
49 * 123: class clickMenu
50 * 154: function init($item)
51 * 194: function doDisplayTopFrameCM()
54 * 222: function printDBClickMenu($table,$uid)
55 * 309: function printNewDBLevel($table,$uid)
56 * 346: function externalProcessingOfDBMenuItems($menuItems)
57 * 358: function processingByExtClassArray($menuItems,$table,$uid)
58 * 377: function urlRefForCM($url,$retUrl='',$hideCM=1)
59 * 394: function DB_copycut($table,$uid,$type)
60 * 417: function DB_paste($table,$uid,$type,$elInfo)
61 * 438: function DB_info($table,$uid)
62 * 454: function DB_history($table,$uid)
63 * 473: function DB_perms($table,$uid,$rec)
64 * 492: function DB_db_list($table,$uid,$rec)
65 * 511: function DB_moveWizard($table,$uid,$rec)
66 * 532: function DB_newWizard($table,$uid,$rec)
67 * 550: function DB_editAccess($table,$uid)
68 * 568: function DB_editPageHeader($uid)
69 * 586: function DB_edit($table,$uid)
70 * 625: function DB_new($table,$uid)
71 * 650: function DB_hideUnhide($table,$rec,$hideField)
72 * 674: function DB_delete($table,$uid,$elInfo)
73 * 695: function DB_view($id,$anchor='')
76 * 724: function printFileClickMenu($path)
77 * 788: function externalProcessingOfFileMenuItems($menuItems)
78 * 802: function FILE_launch($path,$script,$type,$image)
79 * 821: function FILE_copycut($path,$type)
80 * 841: function FILE_delete($path)
81 * 863: function FILE_paste($path,$target,$elInfo)
84 * 903: function printItems($menuItems,$item)
85 * 945: function printLayerJScode($menuItems)
86 * 980: function wrapColorTableCM($str)
87 * 995: function menuItemsForTopFrame($menuItems)
88 * 1012: function menuItemsForClickMenu($menuItems)
89 * 1047: function linkItem($str,$icon,$onClick,$onlyCM=0,$dontHide=0)
90 * 1071: function excludeIcon($iconCode)
91 * 1081: function label($label)
92 * 1090: function isCMlayers()
93 * 1100: function frameLocation($str)
96 * 1125: class SC_alt_clickmenu
97 * 1143: function init()
98 * 1226: function main()
99 * 1266: function printContent()
101 * TOTAL FUNCTIONS: 41
102 * (This index is automatically created/updated by the extension "extdeveval")
107 require ('init.php');
108 require ('template.php');
109 require_once (PATH_t3lib
.'class.t3lib_clipboard.php');
110 $LANG->includeLLFile('EXT:lang/locallang_misc.php');
116 * Class for generating the click menu
118 * @author Kasper Skaarhoj <kasper@typo3.com>
125 // Internal, static: GPvar:
126 var $cmLevel=0; // Defines if the click menu is first level or second. Second means the click menu is triggered from another menu.
127 var $CB; // Clipboard array (submitted by eg. pressing the paste button)
130 var $backPath=''; // Backpath for scripts/images.
131 var $listFrame=0; // If set, the calling document should be in the listframe of a frameset.
132 var $isDBmenu=0; // If set, the menu is about database records, not files. (set if part 2 [1] of the item-var is NOT blank)
133 var $alwaysContentFrame=0; // If true, the "content" frame is always used for reference (when condensed mode is enabled)
134 var $iParts=array(); // Stores the parts of the input $item string, splitted by "|"
135 var $disabledItems=array(); // Contains list of keywords of items to disable in the menu
136 var $dontDisplayTopFrameCM=0; // If true, the context sensitive menu will not appear in the top frame, only as a layer.
137 var $leftIcons=0; // If true, Show icons on the left.
138 var $extClassArray=array(); // Array of classes to be used for user processing of the menu content. This is for the API of adding items to the menu from outside.
140 // Internal, dynamic:
141 var $elCount=0; // Counter for elements in the menu. Used to number the name / id of the mouse-over icon.
142 var $editPageIconSet=0; // Set, when edit icon is drawn.
143 var $editOK=0; // Set to true, if editing of the element is OK.
149 * Initialize click menu
151 * @param string Input "item" GET var.
152 * @return string The clickmenu HTML content
154 function init($item) {
157 $this->cmLevel
= intval(t3lib_div
::GPvar('cmLevel'));
158 $this->CB
= t3lib_div
::GPvar('CB');
161 // Explode the incoming command:
162 $this->iParts
= explode('|',$item);
165 if ($this->iParts
[2]) $this->listFrame
=1;
166 if ($GLOBALS['BE_USER']->uc
['condensedMode']) $this->alwaysContentFrame
=1;
167 if (strcmp($this->iParts
[1],'')) $this->isDBmenu
=1;
169 $TSkey =($this->isDBmenu?
'page':'folder').($this->listFrame?
'List':'Tree');
170 $this->disabledItems
= t3lib_div
::trimExplode(',',$GLOBALS['BE_USER']->getTSConfigVal('options.contextMenu.'.$TSkey.'.disableItems'),1);
171 $this->leftIcons
= $GLOBALS['BE_USER']->getTSConfigVal('options.contextMenu.options.leftIcons');
173 // &cmLevel flag detected (2nd level menu)
174 if (!$this->cmLevel
) {
175 // Make 1st level clickmenu:
176 if ($this->isDBmenu
) {
177 return $this->printDBClickMenu($this->iParts
[0],$this->iParts
[1]);
179 return $this->printFileClickMenu($this->iParts
[0]);
182 // Make 2nd level clickmenu (only for DBmenus)
183 if ($this->isDBmenu
) {
184 return $this->printNewDBLevel($this->iParts
[0],$this->iParts
[1]);
190 * Returns true if the menu should (also?) be displayed in topframe, not just <div>-layers
194 function doDisplayTopFrameCM() {
195 return !$GLOBALS['SOBE']->doc
->isCMlayers() ||
!$this->dontDisplayTopFrameCM
;
209 /***************************************
213 ***************************************/
216 * Make 1st level clickmenu:
218 * @param string Table name
219 * @param integer UID for the current record.
220 * @return string HTML content
222 function printDBClickMenu($table,$uid) {
223 global $TCA, $BE_USER;
226 $this->rec
= t3lib_BEfunc
::getRecord($table,$uid);
229 if ($table=='pages' && !strcmp($uid,'0')) { // Rootlevel
233 // If record found (or root), go ahead and fill the $menuItems array which will contain data for the elements to render.
234 if (is_array($this->rec
) ||
$root) {
236 $lCP = $BE_USER->calcPerms(t3lib_BEfunc
::getRecord('pages',($table=='pages'?
$this->rec
['uid']:$this->rec
['pid'])));
239 if (!in_array('view',$this->disabledItems
)) {
240 if ($table=='pages') $menuItems['view']=$this->DB_view($uid);
241 if ($table==$GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']) $menuItems['view']=$this->DB_view($this->rec
['pid'],'#'.$uid);
245 if(!$root && ($BE_USER->isPSet($lCP,$table,'edit')||
$BE_USER->isPSet($lCP,$table,'editcontent'))) {
246 if (!in_array('edit',$this->disabledItems
)) $menuItems['edit']=$this->DB_edit($table,$uid);
251 if (!in_array('new',$this->disabledItems
) && $BE_USER->isPSet($lCP,$table,'new')) $menuItems['new']=$this->DB_new($table,$uid);
254 if(!in_array('info',$this->disabledItems
) && !$root) $menuItems['info']=$this->DB_info($table,$uid);
256 $menuItems[]='spacer';
259 if(!in_array('copy',$this->disabledItems
) && !$root) $menuItems['copy']=$this->DB_copycut($table,$uid,'copy');
261 if(!in_array('cut',$this->disabledItems
) && !$root) $menuItems['cut']=$this->DB_copycut($table,$uid,'cut');
264 $elFromAllTables = count($this->clipObj
->elFromTable(''));
265 if (!in_array('paste',$this->disabledItems
) && $elFromAllTables) {
266 $selItem = $this->clipObj
->getSelectedRecord();
268 $selItem['_RECORD_TITLE'],
269 ($root?
$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']:t3lib_div
::fixed_lgd(t3lib_BEfunc
::getRecordTitle($table,$this->rec
),$GLOBALS['BE_USER']->uc
['titleLen'])),
270 $this->clipObj
->currentMode()
272 if ($table=='pages' && ($lCP & 8)) {
273 if ($elFromAllTables) $menuItems['pasteinto']=$this->DB_paste('',$uid,'into',$elInfo);
276 $elFromTable = count($this->clipObj
->elFromTable($table));
277 if (!$root && $elFromTable && $TCA[$table]['ctrl']['sortby']) $menuItems['pasteafter']=$this->DB_paste($table,-$uid,'after',$elInfo);
281 $elInfo=array(t3lib_div
::fixed_lgd(t3lib_BEfunc
::getRecordTitle($table,$this->rec
),$GLOBALS['BE_USER']->uc
['titleLen']));
282 if(!in_array('delete',$this->disabledItems
) && !$root && $BE_USER->isPSet($lCP,$table,'delete')) {
283 $menuItems[]='spacer';
284 $menuItems['delete']=$this->DB_delete($table,$uid,$elInfo);
288 // Adding external elements to the menuItems array
289 $menuItems = $this->processingByExtClassArray($menuItems,$table,$uid);
291 // Processing by external functions?
292 $menuItems = $this->externalProcessingOfDBMenuItems($menuItems);
294 // Return the printed elements:
295 return $this->printItems($menuItems,
297 '<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/i/_icon_website.gif','width="18" height="16"').' class="absmiddle" alt="" />'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']):
298 t3lib_iconWorks
::getIconImage($table,$this->rec
,$this->backPath
,' class="absmiddle" title="'.htmlspecialchars(t3lib_BEfunc
::getRecordIconAltText($this->rec
,$table)).'"').t3lib_BEfunc
::getRecordTitle($table,$this->rec
,1)
303 * Make 2nd level clickmenu (only for DBmenus)
305 * @param string Table name
306 * @param integer UID for the current record.
307 * @return string HTML content
309 function printNewDBLevel($table,$uid) {
310 global $TCA, $BE_USER;
312 // Setting internal record to the table/uid :
313 $this->rec
= t3lib_BEfunc
::getRecord($table,$uid);
316 if ($table=='pages' && !strcmp($uid,'0')) { // Rootlevel
320 // If record was found, check permissions and get menu items.
321 if (is_array($this->rec
) ||
$root) {
322 $lCP = $BE_USER->calcPerms(t3lib_BEfunc
::getRecord('pages',($table=='pages'?
$this->rec
['uid']:$this->rec
['pid'])));
324 if(!$root && ($BE_USER->isPSet($lCP,$table,'edit')||
$BE_USER->isPSet($lCP,$table,'editcontent'))) {
328 $menuItems = $this->processingByExtClassArray($menuItems,$table,$uid);
331 // Return the printed elements:
332 if (!is_array($menuItems)) $menuItems=array();
333 return $this->printItems($menuItems,
335 '<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/i/_icon_website.gif','width="18" height="16"').' class="absmiddle" alt="" />'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']):
336 t3lib_iconWorks
::getIconImage($table,$this->rec
,$this->backPath
,' class="absmiddle" title="'.htmlspecialchars(t3lib_BEfunc
::getRecordIconAltText($this->rec
,$table)).'"').t3lib_BEfunc
::getRecordTitle($table,$this->rec
,1)
341 * Processing the $menuItems array (for extension classes) (DATABASE RECORDS)
343 * @param array $menuItems array for manipulation.
344 * @return array Processed $menuItems array
346 function externalProcessingOfDBMenuItems($menuItems) {
351 * Processing the $menuItems array by external classes (typ. adding items)
353 * @param array $menuItems array for manipulation.
354 * @param string Table name
355 * @param integer UID for the current record.
356 * @return array Processed $menuItems array
358 function processingByExtClassArray($menuItems,$table,$uid) {
359 if (is_array($this->extClassArray
)) {
360 reset($this->extClassArray
);
361 while(list(,$conf)=each($this->extClassArray
)) {
362 $obj=t3lib_div
::makeInstance($conf['name']);
363 $menuItems = $obj->main($this,$menuItems,$table,$uid);
370 * Returning JavaScript for the onClick event linking to the input URL.
372 * @param string The URL relative to TYPO3_mainDir
373 * @param string The return_url-parameter
374 * @param boolean If set, the "hideCM()" will be called
375 * @return string JavaScript for an onClick event.
377 function urlRefForCM($url,$retUrl='',$hideCM=1) {
378 $loc='top.content'.($this->listFrame
&& !$this->alwaysContentFrame ?
'.list_frame':'');
379 $editOnClick='var docRef=(top.content.list_frame)?top.content.list_frame:'.$loc.'; docRef.document.location=top.TS.PATH_typo3+\''.$url.'\''.
380 ($retUrl?
"+'&".$retUrl."='+top.rawurlencode(".$this->frameLocation('docRef.document').')':'').';'.
381 ($hideCM?
'return hideCM();':'');
386 * Adding CM element for Clipboard "copy" and "cut"
388 * @param string Table name
389 * @param integer UID for the current record.
390 * @param string Type: "copy" or "cut"
391 * @return array Item array, element in $menuItems
394 function DB_copycut($table,$uid,$type) {
395 if ($this->clipObj
->current
=='normal') {
396 $isSel = $this->clipObj
->isSelected($table,$uid);
398 return $this->linkItem(
400 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/clip_'.$type.($isSel==$type?
'_h':'').'.gif','width="12" height="12"').' alt="" />'),
401 "top.loadTopMenu('".$this->clipObj
->selUrlDB($table,$uid,($type=='copy'?
1:0),($isSel==$type))."');return false;"
406 * Adding CM element for Clipboard "paste into"/"paste after"
407 * NOTICE: $table and $uid should follow the special syntax for paste, see clipboard-class :: pasteUrl();
409 * @param string Table name
410 * @param integer UID for the current record. NOTICE: Special syntax!
411 * @param string Type: "into" or "after"
412 * @param array Contains instructions about whether to copy or cut an element.
413 * @return array Item array, element in $menuItems
414 * @see t3lib_clipboard::pasteUrl()
417 function DB_paste($table,$uid,$type,$elInfo) {
419 $loc='top.content'.($this->listFrame
&& !$this->alwaysContentFrame ?
'.list_frame':'');
420 $conf=$loc.' && confirm('.$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.'.($elInfo[2]=='copy'?
'copy':'move').'_'.$type),$elInfo[0],$elInfo[1])).')';
421 $editOnClick='if('.$conf.'){'.$loc.'.document.location=top.TS.PATH_typo3+\''.$this->clipObj
->pasteUrl($table,$uid,0).'&redirect=\'+top.rawurlencode('.$this->frameLocation($loc.'.document').'); hideCM();}';
423 return $this->linkItem(
424 $this->label('paste'.$type),
425 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/clip_paste'.$type.'.gif','width="12" height="12"').' alt="" />'),
426 $editOnClick.'return false;'
431 * Adding CM element for Info
433 * @param string Table name
434 * @param integer UID for the current record.
435 * @return array Item array, element in $menuItems
438 function DB_info($table,$uid) {
439 return $this->linkItem(
440 $this->label('info'),
441 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/zoom2.gif','width="12" height="12"').' alt="" />'),
442 "top.launchView('".$table."', '".$uid."'); return hideCM();"
447 * Adding CM element for History
449 * @param string Table name
450 * @param integer UID for the current record.
451 * @return array Item array, element in $menuItems
454 function DB_history($table,$uid) {
455 $url = 'show_rechis.php?element='.rawurlencode($table.':'.$uid);
456 return $this->linkItem(
457 $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_history')),
458 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/history2.gif','width="13" height="12"').' alt="" />'),
459 $this->urlRefForCM($url,'returnUrl'),
465 * Adding CM element for Permission setting
467 * @param string Table name
468 * @param integer UID for the current record.
469 * @param array The "pages" record with "perms_*" fields inside.
470 * @return array Item array, element in $menuItems
473 function DB_perms($table,$uid,$rec) {
474 $url = 'mod/web/perm/index.php?id='.$uid.($rec['perms_userid']==$GLOBALS['BE_USER']->user
['uid']||
$GLOBALS['BE_USER']->isAdmin()?
'&return_id='.$uid.'&edit=1':'');
475 return $this->linkItem(
476 $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_perms')),
477 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/perm.gif','width="7" height="12"').' alt="" />'),
478 $this->urlRefForCM($url),
484 * Adding CM element for DBlist
486 * @param string Table name
487 * @param integer UID for the current record.
488 * @param array Record of the element (needs "pid" field if not pages-record)
489 * @return array Item array, element in $menuItems
492 function DB_db_list($table,$uid,$rec) {
493 $url = t3lib_div
::getIndpEnv('TYPO3_REQUEST_DIR').'db_list.php?table='.($table=='pages'?
'':$table).'&id='.($table=='pages'?
$uid:$rec['pid']);
494 return $this->linkItem(
495 $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_db_list')),
496 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/list.gif','width="11" height="11"').' alt="" />'),
497 "top.nextLoadModuleUrl='".$url."';top.goToModule('web_list',1);",
503 * Adding CM element for Moving wizard
505 * @param string Table name
506 * @param integer UID for the current record.
507 * @param array Record. Needed for tt-content elements which will have the sys_language_uid sent
508 * @return array Item array, element in $menuItems
511 function DB_moveWizard($table,$uid,$rec) {
512 $url = 'move_el.php?table='.$table.'&uid='.$uid.
513 ($table=='tt_content'?
'&sys_language_uid='.intval($rec['sys_language_uid']):''); // Hardcoded field for tt_content elements.
515 return $this->linkItem(
516 $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_moveWizard'.($table=='pages'?
'_page':''))),
517 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/move_'.($table=='pages'?
'page':'record').'.gif','width="11" height="12"').' alt="" />'),
518 $this->urlRefForCM($url,'returnUrl'),
524 * Adding CM element for Create new wizard (either db_new.php or sysext/cms/layout/db_new_content_el.php)
526 * @param string Table name
527 * @param integer UID for the current record.
528 * @param array Record.
529 * @return array Item array, element in $menuItems
532 function DB_newWizard($table,$uid,$rec) {
533 $url = ($table=='pages' ||
!t3lib_extMgm
::isLoaded('cms')) ?
'db_new.php?id='.$uid.'&pagesOnly=1' : 'sysext/cms/layout/db_new_content_el.php?id='.$rec['pid'].'&sys_language_uid='.intval($rec['sys_language_uid']);
534 return $this->linkItem(
535 $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_newWizard')),
536 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/new_'.($table=='pages'?
'page':'record').'.gif','width="'.($table=='pages'?
'13':'16').'" height="12"').' alt="" />'),
537 $this->urlRefForCM($url,'returnUrl'),
543 * Adding CM element for Editing of the access related fields of a table (disable, starttime, endtime, fe_groups)
545 * @param string Table name
546 * @param integer UID for the current record.
547 * @return array Item array, element in $menuItems
550 function DB_editAccess($table,$uid) {
551 $addParam='&columnsOnly='.implode(',',$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']);
552 $url = 'alt_doc.php?edit['.$table.']['.$uid.']=edit'.$addParam;
553 return $this->linkItem(
554 $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_editAccess')),
555 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/editaccess.gif','width="12" height="12"').' alt="" />'),
556 $this->urlRefForCM($url,'returnUrl'),
557 1 // no top frame CM!
562 * Adding CM element for edit page header
564 * @param integer page uid to edit (PID)
565 * @return array Item array, element in $menuItems
568 function DB_editPageHeader($uid) {
569 $url = 'alt_doc.php?edit[pages]['.$uid.']=edit';
570 return $this->linkItem(
571 $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_editPageHeader')),
572 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/edit2.gif','width="11" height="12"').' alt="" />'),
573 $this->urlRefForCM($url,'returnUrl'),
574 1 // no top frame CM!
579 * Adding CM element for regular editing of the element!
581 * @param string Table name
582 * @param integer UID for the current record.
583 * @return array Item array, element in $menuItems
586 function DB_edit($table,$uid) {
590 $loc='top.content'.($this->listFrame
&& !$this->alwaysContentFrame ?
'.list_frame':'');
592 $theIcon = t3lib_iconWorks
::skinImg($this->backPath
,'gfx/edit2.gif','width="11" height="12"');
594 $this->iParts
[0]=='pages' &&
596 $GLOBALS['BE_USER']->check('modules','web_layout')
598 $theIcon = t3lib_iconWorks
::skinImg($this->backPath
,'gfx/edit_page.gif','width="12" height="12"');
599 $this->editPageIconSet
=1;
600 if ($BE_USER->uc
['classicPageEditMode'] ||
!t3lib_extMgm
::isLoaded('cms')) {
601 $addParam='&editRegularContentFromId='.intval($this->iParts
[1]);
603 $editOnClick="top.fsMod.recentIds['web']=".intval($this->iParts
[1]).";top.goToModule('web_layout',1);";
607 $editOnClick="if(".$loc."){".$loc.".document.location=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'&edit[".$table."][".$uid."]=edit".$addParam."';}";
610 return $this->linkItem(
611 $this->label('edit'),
612 $this->excludeIcon('<img'.$theIcon.' alt="" />'),
613 $editOnClick.'return hideCM();'
618 * Adding CM element for regular Create new element
620 * @param string Table name
621 * @param integer UID for the current record.
622 * @return array Item array, element in $menuItems
625 function DB_new($table,$uid) {
627 $loc='top.content'.(!$this->alwaysContentFrame?
'.list_frame':'');
628 $editOnClick='if('.$loc.'){'.$loc.".document.location=top.TS.PATH_typo3+'".
630 $this->backPath
."alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'&edit[".$table."][-".$uid."]=new'":
631 $this->backPath
.'db_new.php?id='.intval($uid)."'").
634 return $this->linkItem(
636 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/new_'.($table=='pages'&&$this->listFrame?
'page':'el').'.gif','width="'.($table=='pages'?
'13':'11').'" height="12"').' alt="" />'),
637 $editOnClick.'return hideCM();'
642 * Adding CM element for hide/unhide of the input record
644 * @param string Table name
645 * @param array Record array
646 * @param string Name of the hide field
647 * @return array Item array, element in $menuItems
650 function DB_hideUnhide($table,$rec,$hideField) {
653 $loc='top.content'.($this->listFrame
&& !$this->alwaysContentFrame ?
'.list_frame':'');
654 $editOnClick='if('.$loc.'){'.$loc.".document.location=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'".
655 "&data[".$table.']['.$uid.']['.$hideField.']='.($rec[$hideField]?
0:1).'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
657 return $this->linkItem(
658 $this->label(($rec[$hideField]?
'un':'').'hide'),
659 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/button_'.($rec[$hideField]?
'un':'').'hide.gif','width="11" height="10"').' alt="" />'),
660 $editOnClick.'return false;',
666 * Adding CM element for Delete
668 * @param string Table name
669 * @param integer UID for the current record.
670 * @param array Label for including in the confirmation message, EXT:lang/locallang_core.php:mess.delete
671 * @return array Item array, element in $menuItems
674 function DB_delete($table,$uid,$elInfo) {
676 $loc='top.content'.($this->listFrame
&& !$this->alwaysContentFrame ?
'.list_frame':'');
677 $editOnClick='if('.$loc." && confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.delete'),$elInfo[0])).")){".$loc.".document.location=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'".
678 "&cmd[".$table.']['.$uid.'][delete]=1&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
680 return $this->linkItem(
681 $this->label('delete'),
682 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/garbage.gif','width="11" height="12"').' alt="" />'),
683 $editOnClick.'return false;'
688 * Adding CM element for View Page
690 * @param integer Page uid (PID)
691 * @param string Anchor, if any
692 * @return array Item array, element in $menuItems
695 function DB_view($id,$anchor='') {
696 return $this->linkItem(
697 $this->label('view'),
698 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/zoom.gif','width="12" height="12"').' alt="" />'),
699 t3lib_BEfunc
::viewOnClick($id,$this->backPath
,t3lib_BEfunc
::BEgetRootLine($id),$anchor).'return hideCM();'
712 /***************************************
716 ***************************************/
719 * Make 1st level clickmenu:
721 * @param string The absolute path
722 * @return string HTML content
724 function printFileClickMenu($path) {
727 if (@file_exists
($path) && t3lib_div
::isAllowedAbsPath($path)) {
728 $fI = pathinfo($path);
729 $icon = is_dir($path) ?
'folder.gif' : t3lib_BEfunc
::getFileIcon(strtolower($fI['extension']));
730 $size=' ('.t3lib_div
::formatSize(filesize($path)).'bytes)';
731 $icon = '<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/fileicons/'.$icon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
734 if (!in_array('edit',$this->disabledItems
) && is_file($path) && t3lib_div
::inList($GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'],$fI['extension'])) $menuItems['edit']=$this->FILE_launch($path,'file_edit.php','edit','edit_file.gif');
736 if (!in_array('rename',$this->disabledItems
)) $menuItems['rename']=$this->FILE_launch($path,'file_rename.php','rename','rename.gif');
738 if (!in_array('upload',$this->disabledItems
) && is_dir($path)) $menuItems['upload']=$this->FILE_launch($path,'file_upload.php','upload','upload.gif');
740 if (!in_array('new',$this->disabledItems
) && is_dir($path)) $menuItems['new']=$this->FILE_launch($path,'file_newfolder.php','new','new_file.gif');
742 if (!in_array('info',$this->disabledItems
)) $menuItems['info']=$this->DB_info($path,'');
744 $menuItems[]='spacer';
747 if (!in_array('copy',$this->disabledItems
)) $menuItems['copy']=$this->FILE_copycut($path,'copy');
749 if (!in_array('cut',$this->disabledItems
)) $menuItems['cut']=$this->FILE_copycut($path,'cut');
752 $elFromAllTables = count($this->clipObj
->elFromTable('_FILE'));
753 if (!in_array('paste',$this->disabledItems
) && $elFromAllTables && is_dir($path)) {
754 $elArr = $this->clipObj
->elFromTable('_FILE');
756 $selItem = current($elArr);
760 $this->clipObj
->currentMode()
762 $menuItems['pasteinto']=$this->FILE_paste($path,$selItem,$elInfo);
765 $menuItems[]='spacer';
768 if (!in_array('delete',$this->disabledItems
)) $menuItems['delete']=$this->FILE_delete($path);
771 // Adding external elements to the menuItems array
772 $menuItems = $this->processingByExtClassArray($menuItems,$path,0);
774 // Processing by external functions?
775 $menuItems = $this->externalProcessingOfFileMenuItems($menuItems);
777 // Return the printed elements:
778 return $this->printItems($menuItems,$icon.basename($path));
783 * Processing the $menuItems array (for extension classes) (FILES)
785 * @param array $menuItems array for manipulation.
786 * @return array Processed $menuItems array
788 function externalProcessingOfFileMenuItems($menuItems) {
793 * Multi-function for adding an entry to the $menuItems array
795 * @param string Path to the file/directory (target)
796 * @param string Script (eg. file_edit.php) to pass &target= to
797 * @param string "type" is the code which fetches the correct label for the element from "cm."
798 * @param string icon image-filename from "gfx/" (12x12 icon)
799 * @return array Item array, element in $menuItems
802 function FILE_launch($path,$script,$type,$image) {
803 $loc='top.content'.(!$this->alwaysContentFrame?
'.list_frame':'');
804 $editOnClick='if('.$loc.'){'.$loc.".document.location=top.TS.PATH_typo3+'".$script.'?target='.rawurlencode($path)."';}";
806 return $this->linkItem(
808 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/'.$image,'width="12" height="12"').' alt="" />'),
809 $editOnClick.'return hideCM();'
814 * Returns element for copy or cut of files.
816 * @param string Path to the file/directory (target)
817 * @param string Type: "copy" or "cut"
818 * @return array Item array, element in $menuItems
821 function FILE_copycut($path,$type) {
822 $table='_FILE'; // Pseudo table name for use in the clipboard.
823 $uid = t3lib_div
::shortmd5($path);
824 if ($this->clipObj
->current
=='normal') {
825 $isSel = $this->clipObj
->isSelected($table,$uid);
827 return $this->linkItem(
829 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/clip_'.$type.($isSel==$type?
'_h':'').'.gif','width="12" height="12"').' alt="" />'),
830 "top.loadTopMenu('".$this->clipObj
->selUrlFile($path,($type=='copy'?
1:0),($isSel==$type))."');return false;"
835 * Creates element for deleting of target
837 * @param string Path to the file/directory (target)
838 * @return array Item array, element in $menuItems
841 function FILE_delete($path) {
843 $loc='top.content'.($this->listFrame
&& !$this->alwaysContentFrame ?
'.list_frame':'');
844 $editOnClick='if('.$loc." && confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.delete'),basename($path))).")){".$loc.".document.location=top.TS.PATH_typo3+'tce_file.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'".
845 "&file[delete][0][data]=".rawurlencode($path).'&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
847 return $this->linkItem(
848 $this->label('delete'),
849 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/garbage.gif','width="11" height="12"').' alt="" />'),
850 $editOnClick.'return false;'
855 * Creates element for pasting files.
857 * @param string Path to the file/directory (target)
858 * @param string target - NOT USED.
859 * @param array Various values for the labels.
860 * @return array Item array, element in $menuItems
863 function FILE_paste($path,$target,$elInfo) {
865 $loc='top.content'.($this->listFrame
&& !$this->alwaysContentFrame ?
'.list_frame':'');
866 $conf=$loc." && confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess'.($elInfo[2]=='copy'?
'copy':'move').'_into'),$elInfo[0],$elInfo[1])).")";
867 $editOnClick='if('.$conf.'){'.$loc.".document.location=top.TS.PATH_typo3+'".$this->clipObj
->pasteUrl('_FILE',$path,0).
868 "&redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').'); hideCM();}';
870 return $this->linkItem(
871 $this->label('pasteinto'),
872 $this->excludeIcon('<img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/clip_pasteinto.gif','width="12" height="12"').' alt="" />'),
873 $editOnClick.'return false;'
889 /***************************************
893 **************************************/
896 * Prints the items from input $menuItems array - both as topframe menu AND the JS section for writing to the div-layers.
897 * Of course the topframe menu will appear only if $this->doDisplayTopFrameCM() returns true
899 * @param array $menuItems array
900 * @param string HTML code for the element which was clicked - shown in the end of the horizontal menu in topframe after the close-button.
901 * @return string HTML code
903 function printItems($menuItems,$item) {
906 // Adding topframe part (horizontal clickmenu)
907 if ($this->doDisplayTopFrameCM()) {
911 Table, which contains the click menu when shown in the top frame of the backend:
913 <table border="0" cellpadding="0" cellspacing="0" id="typo3-CSM-top">
917 <td class="c-item">'.
919 <td><img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/acm_spacer2.gif','width="8" height="12"').' alt="" /></td>
920 <td class="c-item">',$this->menuItemsForTopFrame($menuItems)).
923 <!-- Close button: -->
924 <td class="c-closebutton"><a href="#" onclick="hideCM();return false;"><img'.t3lib_iconWorks
::skinImg($this->backPath
,'gfx/close_12h.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.close',1).'" alt="" /></a></td>
926 <!-- The item of the clickmenu: -->
927 <td class="c-itemicon">'.$item.'</td>
933 $out.=$this->printLayerJScode($menuItems);
935 // Return the content
940 * Create the JavaScript section
942 * @param array The $menuItems array to print
943 * @return string The JavaScript section which will print the content of the CM to the div-layer in the target frame.
945 function printLayerJScode($menuItems) {
947 if ($this->isCMlayers()) { // Clipboard must not be submitted - then it's probably a copy/cut situation.
948 $frameName = '.'.($this->listFrame ?
'list_frame' : 'nav_frame');
949 if ($this->alwaysContentFrame
) $frameName='';
951 // Create the table displayed in the clickmenu layer:
953 <table border="0" cellpadding="0" cellspacing="0" class="typo3-CSM bgColor4">
954 '.implode('',$this->menuItemsForClickMenu($menuItems)).'
957 // Wrap the inner table in another table to create outer border:
958 $CMtable = $this->wrapColorTableCM($CMtable);
960 // Create JavaScript section:
961 $script=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
963 if (top.content && top.content'.$frameName.' && top.content'.$frameName.'.setLayerObj) {
964 top.content'.$frameName.'.setLayerObj(unescape("'.t3lib_div
::rawurlencodeJS($CMtable).'"),'.$this->cmLevel
.');
966 '.(!$this->doDisplayTopFrameCM()?
'hideCM();':'')
974 * Wrapping the input string in a table with background color 4 and a black border style.
975 * For the pop-up menu
977 * @param string HTML content to wrap in table.
980 function wrapColorTableCM($str) {
981 $str = '<table border="0" cellspacing="0" class="typo3-CSM-wrapperCM">
982 <tr><td class="c-aa">'.$str.'</td><td class="c-ab"></td></tr>
983 <tr><td class="c-ba"></td><td class="c-bb"></td></tr>
989 * Traverses the menuItems and generates an output array for implosion in the topframe horizontal menu
991 * @param array $menuItem array
992 * @param array Array with HTML content to be imploded between <td>-tags
993 * @return array Array of menu items for top frame.
995 function menuItemsForTopFrame($menuItems) {
998 while(list(,$i)=each($menuItems)) {
999 if ($i[4]==1 && !$GLOBALS['SOBE']->doc
->isCMlayers()) $i[4]=0; // IF the topbar is the ONLY means of the click menu, then items normally disabled from the top menu will appear anyways IF they are disabled with a "1" (2+ will still disallow them in the topbar)
1000 if (is_array($i) && !$i[4]) $out[]=$i[0];
1006 * Traverses the menuItems and generates an output array for implosion in the CM div-layers table.
1008 * @param array $menuItem array
1009 * @param array Array with HTML content to be imploded between <td>-tags
1010 * @return array array for implosion in the CM div-layers table.
1012 function menuItemsForClickMenu($menuItems) {
1015 while(list($cc,$i)=each($menuItems)) {
1016 if (is_string($i) && $i=='spacer') { // MAKE horizontal spacer
1018 <tr class="bgColor2">
1019 <td colspan="2"><img src="clear.gif" width="1" height="1" alt="" /></td>
1021 } else { // Just make normal element:
1023 $onClick=eregi_replace('return[[:space:]]+hideCM\(\)[[:space:]]*;','',$onClick);
1024 $onClick=eregi_replace('return[[:space:]]+false[[:space:]]*;','',$onClick);
1025 $onClick=eregi_replace('hideCM\(\);','',$onClick);
1026 if (!$i[5]) $onClick.='hideEmpty();';
1029 <tr class="typo3-CSM-itemRow" onclick="'.htmlspecialchars($onClick).'" onmouseover="this.bgColor=\''.$GLOBALS['TBE_TEMPLATE']->bgColor5
.'\';" onmouseout="this.bgColor=\'\';">
1030 '.(!$this->leftIcons?
'<td class="typo3-CSM-item">'.$i[1].'</td><td align="center">'.$i[2].'</td>' : '<td align="center">'.$i[2].'</td><td class="typo3-CSM-item">'.$i[1].'</td>').'
1038 * Creating an array with various elements for the clickmenu entry
1040 * @param string The label, htmlspecialchar'ed already
1041 * @param string <img>-tag for the icon
1042 * @param string JavaScript onclick event for label/icon
1043 * @param boolean ==1 and the element will NOT appear in clickmenus in the topframe (unless clickmenu is totally unavailable)! ==2 and the item will NEVER appear in top frame. (This is mostly for "less important" options since the top frame is not capable of holding so many elements horizontally)
1044 * @param boolean If set, the clickmenu layer will not hide itself onclick - used for secondary menus to appear...
1045 * @return array $menuItem entry with 6 numerical entries: [0] is the HTML for display of the element with link and icon an mouseover etc., [1]-[5] is simply the input params passed through!
1047 function linkItem($str,$icon,$onClick,$onlyCM=0,$dontHide=0) {
1050 $WHattribs = t3lib_iconWorks
::skinImg($BACK_PATH,'gfx/content_client.gif','width="7" height="10"',2);
1053 '<img src="clear.gif" '.$WHattribs.' class="c-roimg" name="roimg_'.$this->elCount
.'" alt="" />'.
1054 '<a href="#" onclick="'.htmlspecialchars($onClick).'" onmouseover="mo('.$this->elCount
.');" onmouseout="mout('.$this->elCount
.');">'.
1066 * Returns the input string IF not a user setting has disabled display of icons.
1068 * @param string The icon-image tag
1069 * @return string The icon-image tag prefixed with space char IF the icon should be printed at all due to user settings
1071 function excludeIcon($iconCode) {
1072 return ($GLOBALS['BE_USER']->uc
['noMenuMode'] && strcmp($GLOBALS['BE_USER']->uc
['noMenuMode'],'icons')) ?
'' : ' '.$iconCode;
1076 * Get label from locallang_core.php:cm.*
1078 * @param string The "cm."-suffix to get.
1081 function label($label) {
1082 return $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.'.$label,1));
1086 * Returns true if there should be writing to the div-layers (commands sent to clipboard MUST NOT write to div-layers)
1090 function isCMlayers() {
1091 return $GLOBALS['SOBE']->doc
->isCMlayers() && !$this->CB
;
1095 * Appends ".location" to input string
1097 * @param string Input string, probably a JavaScript document reference
1100 function frameLocation($str) {
1101 return $str.'.location';
1118 * Script Class for the Context Sensitive Menu in TYPO3 (rendered in top frame, normally writing content dynamically to list frames).
1120 * @author Kasper Skaarhoj <kasper@typo3.com>
1123 * @see template::getContextMenuCode()
1125 class SC_alt_clickmenu
{
1127 // Internal, static: GPvar:
1128 var $backPath; // Back path.
1129 var $item; // Definition of which item the click menu should be made for.
1132 var $content=''; // Content accumulation
1133 var $doc; // Template object
1134 var $include_once=array(); // Files to include_once() - set in init() function
1135 var $extClassArray=array(); // Internal array of classes for extending the clickmenu
1136 var $dontDisplayTopFrameCM=0; // If set, then the clickmenu will NOT display in the top frame.
1139 * Constructor function for script class.
1144 global $BE_USER,$BACK_PATH;
1147 $this->backPath
= t3lib_div
::GPvar('backPath');
1148 $this->item
= t3lib_div
::GPvar('item');
1150 // Setting pseudo module name
1151 $this->MCONF
['name']='xMOD_alt_clickmenu.php';
1153 // Takes the backPath as a parameter BUT since we are worried about someone forging a backPath (XSS security hole) we will check with sent md5 hash:
1154 $inputBP = explode('|',$this->backPath
);
1155 if (count($inputBP)==2 && $inputBP[1]==t3lib_div
::shortMD5($inputBP[0].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
1156 $this->backPath
= $inputBP[0];
1158 $this->backPath
= $BACK_PATH;
1161 // Setting internal array of classes for extending the clickmenu:
1162 $this->extClassArray
= $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'];
1164 // Traversing that array and setting files for inclusion:
1165 if (is_array($this->extClassArray
)) {
1166 foreach($this->extClassArray
as $extClassConf) {
1167 if ($extClassConf['path']) $this->include_once[]=$extClassConf['path'];
1171 // Initialize template object
1172 $this->doc
= t3lib_div
::makeInstance('template');
1173 $this->doc
->docType
='xhtml_trans';
1174 $this->doc
->backPath
= $BACK_PATH;
1176 // Setting mode for display and background image in the top frame
1177 $this->dontDisplayTopFrameCM
= $this->doc
->isCMlayers() && !$GLOBALS['BE_USER']->getTSConfigVal('options.contextMenu.options.alwaysShowClickMenuInTopFrame');
1178 if ($this->dontDisplayTopFrameCM
) {
1179 $this->doc
->bodyTagId
.= '-notop';
1182 // Setting clickmenu timeout
1183 $secs = t3lib_div
::intInRange($BE_USER->getTSConfigVal('options.contextMenu.options.clickMenuTimeOut'),1,100,5); // default is 5
1185 // Setting the JavaScript controlling the timer on the page
1186 $this->doc
->JScode
.=$this->doc
->wrapScriptTags('
1187 var date = new Date();
1188 var mo_timeout = Math.floor(date.getTime()/1000);
1191 roImg.src = "'.t3lib_iconWorks
::skinImg($BACK_PATH,'gfx/content_client.gif','width="7" height="10"',1).'";
1193 routImg =new Image();
1194 routImg.src = "clear.gif";
1197 var name="roimg_"+c;
1198 document[name].src = roImg.src;
1201 function mout(c) { //
1202 var name="roimg_"+c;
1203 document[name].src = routImg.src;
1206 function updateTime() { //
1208 mo_timeout = Math.floor(date.getTime()/1000);
1210 function timeout_func() { //
1212 if (Math.floor(date.getTime()/1000)-mo_timeout > '.$secs.') {
1216 window.setTimeout("timeout_func();",1*1000);
1219 function hideCM() { //
1220 document.location="alt_topmenu_dummy.php";
1230 * Main function - generating the click menu in whatever form it has.
1235 global $HTTP_GET_VARS;
1237 // Initialize Clipboard object:
1238 $clipObj = t3lib_div
::makeInstance('t3lib_clipboard');
1239 $clipObj->initializeClipboard();
1240 $clipObj->lockToNormal(); // This locks the clipboard to the Normal for this request.
1242 // Update clipboard if some actions are sent.
1243 $CB = $HTTP_GET_VARS['CB'];
1244 $clipObj->setCmd($CB);
1245 $clipObj->cleanCurrent();
1246 $clipObj->endClipboard(); // Saves
1248 // Create clickmenu object
1249 $clickMenu = t3lib_div
::makeInstance('clickMenu');
1251 // Set internal vars in clickmenu object:
1252 $clickMenu->clipObj
= $clipObj;
1253 $clickMenu->extClassArray
= $this->extClassArray
;
1254 $clickMenu->dontDisplayTopFrameCM
= $this->dontDisplayTopFrameCM
;
1255 $clickMenu->backPath
= $this->backPath
;
1257 // Takes the backPath as a parameter BUT since we are worried about someone forging a backPath (XSS security hole) we will check with sent md5 hash:
1258 $inputBP = explode('|',$this->backPath
);
1259 if (count($inputBP)==2 && $inputBP[1]==md5($inputBP[0].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
1260 $clickMenu->backPath
= $inputBP[0];
1264 $this->content
.=$this->doc
->startPage('Context Sensitive Menu');
1266 // Set content of the clickmenu with the incoming var, "item"
1267 $this->content
.= $clickMenu->init($this->item
);
1271 * End page and output content.
1275 function printContent() {
1276 $this->content
.= $this->doc
->endPage();
1277 echo $this->content
;
1281 // Include extension?
1282 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/alt_clickmenu.php']) {
1283 include_once($TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/alt_clickmenu.php']);
1296 $SOBE = t3lib_div
::makeInstance('SC_alt_clickmenu');
1300 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
1303 $SOBE->printContent();