$append=true;
$showItem = t3lib_div::trimExplode(',',$TCA[$table]['types'][$k]['showitem'],1);
foreach($showItem as $key => $fieldInfo) {
-
+
$parts = explode(';',$fieldInfo);
$theField = trim($parts[0]);
$palette = trim($parts[0]).';;'.trim($parts[2]);
-
+
// insert before: find exact field name or palette with number
if (in_array($theField, $positionArr) || in_array($palette, $positionArr) || in_array('before:'.$theField, $positionArr) || in_array('before:'.$palette, $positionArr)) {
$showItem[$key]=$str.', '.$fieldInfo;
break;
}
}
-
+
// Not found? Then append.
if($append) {
$showItem[]=$str;
}
-
+
$TCA[$table]['types'][$k]['showitem']=implode(', ', $showItem);
}
else {
$TBE_MODULES['_PATHS'][$name] = $path;
}
- /**
- * Adding an application for the top menu. These are regular modules but is required to respond with Ajax content in case of certain parameters sent to them.
- *
- * @param string $name is the name of the module, refer to conf.php of the module.
- * @param string $path is the absolute path to the module directory inside of which "index.php" and "conf.php" is found.
- * @param boolean If set, the application is placed in the shortcut bar below the menu bar.
- * @param array Options
- * @return void
- */
- function addTopApp($name,$path,$iconPane=FALSE,$options=array()) {
- global $TBE_MODULES,$TYPO3_CONF_VARS;
-
- $TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['topApps'][$iconPane?'icons':'menu'][$name] = $options;
-
- // Set path for TBE-modules:
- $TBE_MODULES['_PATHS'][$name] = $path;
- }
-
/**
* Adds a "Function menu module" ('third level module') to an existing function menu for some other backend module
* The arguments values are generally determined by which function menu this is supposed to interact with
}
}
}
-
+
$cFiles['ext_localconf'] = "<?php\n" . preg_replace('/<\?php|\?>/is', '', $cFiles['ext_localconf']) . "?>\n";
$cFiles['ext_tables'] = "<?php\n" . preg_replace('/<\?php|\?>/is', '', $cFiles['ext_tables']) . "?>\n";
-
+
t3lib_div::writeFile(PATH_typo3conf.$cacheFilePrefix.'_ext_localconf.php',$cFiles['ext_localconf']);
t3lib_div::writeFile(PATH_typo3conf.$cacheFilePrefix.'_ext_tables.php',$cFiles['ext_tables']);
+++ /dev/null
-<?php
-/***************************************************************
-* Copyright notice
-*
-* (c) 2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * Base class for scripts delivering content to the top menu bar/icon panel.
- *
- * $Id$
- *
- * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
- */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- */
-
-
-
-
-/**
- * Base class for scripts delivering content to the top menu bar/icon panel.
- *
- * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @package TYPO3
- * @subpackage core
- */
-class t3lib_topmenubase {
-
- function menuItems($menuItems) {
- $output = '';
-
- // Traverse items:
- foreach($menuItems as $item) {
-
- // Divider has no other options:
- if ($item['title']=='--div--') {
- $output.= '<div class="menuLayerItem_divider" onmouseover="menuOpenSub(this);"></div>';
- } else {
-
- $itemCode = '';
- $onClick = '';
-
- // Render subitems if any:
- if (is_array($item['subitems'])) {
- $itemCode.= $this->menuLayer($item['subitems'],$item['id']);
- }
-
- // Render state icon if any:
- switch ($item['state']) {
- case 'checked';
- $itemCode.= '<img src="gfx/x_state_checked.png" width="16" class="menulayerItemIcon">';
- break;
- default:
- $itemCode.= '<img src="gfx/clear.gif" width="16" class="menulayerItemIcon">';
- break;
- }
-
- // Render icon if any:
- if ($item['icon']) {
- if (is_array($item['icon'])) {
- $itemCode.= '<img '.t3lib_iconWorks::skinImg('',$item['icon'][0],$item['icon'][1]).' class="menulayerItemIcon" alt="" />';
- } else {
- $itemCode.= $item['icon'];
- }
- }
-
- // Title:
- $itemCode.= htmlspecialchars($item['title']).' ';
-
- // if subitems, show arrow pointing right:
- $itemCode.= is_array($item['subitems']) ? '<img src="gfx/x_thereismore.png" class="menulayerItemIcon" style="padding-left:40px;">' : '';
-
- // Set onclick handlers:
- $onClick.= $item['xurl'] ? "if (Event.element(event)==this){openUrlInWindow('".$item['xurl']."','aWindow');}" : '';
- $onClick.= $item['url'] ? "if (Event.element(event)==this){content.document.location='".$item['url']."';}" : '';
- $onClick.= $item['onclick'] ? $item['onclick'] : $item['onclick'];
-
- // Wrap it all up:
- $output.= '<div '.($item['id'] ? 'id="'.htmlspecialchars($item['id']).'"' : '').'class="menuLayerItem" onmouseover="menuOpenSub(this);"'.($onClick ? ' onclick="'.htmlspecialchars($onClick).'"' : '').'>'.$itemCode.'</div>';
- $output.= $item['html'];
- }
- }
-
- return $output;
- }
- /**
- *
- */
- function menuLayer($menuItems,$baseid='') {
- $output = $this->menuItems($menuItems);
-
- // Encapsulate in menu layer:
- return $this->simpleLayer($output,$baseid?$baseid.'-layer':'');
- }
-
- function simpleLayer($output,$id='',$class='menulayer') {
- return '<div class="'.$class.'" style="display: none;"'.($id?' id="'.htmlspecialchars($id).'"':'').'>'.$output.'</div>';
- }
-
- function menuItemLayer($id,$content,$onclick='') {
- return '<div id="'.$id.'" class="menuItems menu-normal" style="float: left;" onclick="menuToggleState(\''.$id.'\');'.$onclick.'" onmouseover="menuMouseOver(\''.$id.'\');" onmouseout="menuMouseOut(\''.$id.'\');">'.$content.'</div>';
- }
- function menuItemObject($id,$functionContent) {
- return '
- <script>
- menuItemObjects[\''.$id.'\'] = {
- '.$functionContent.'
- }
- </script>
- ';
- }
-}
-
-?>
\ No newline at end of file