[TYPO3-dev] Hook in Web>List for extra buttons in controlpanel

Tapio Markula tapio.markula at xetpoint.fi
Tue Oct 23 21:08:09 CEST 2007


Steffen Kamper kirjoitti:
> "Mads Brunn" <mads at typoconsult.dk> schrieb im Newsbeitrag 
> news:mailman.1.1192999160.17122.typo3-dev at lists.netfielders.de...
>> Hi dev-list
>>
>> I don't know if this has been discussed before in here or on other 
>> newslists. If so, please give me a link to the thread.
>>
>> I'd like to add a hook to Web>List that enables developers to add extra 
>> buttons to the control-panel in extended view. Could I get some comments 
>> or +1's on that?
>>
>> Thanks in advance
>>
>> Mads Brunn
> 
> +1
> 
> vg  Steffen 
> 
> 

where to put new icons?
In fact the entire generation of links needs to change - otherwise you 
can't properly control where to put items.

$cells[] -this must change using named keys and using foreach loop 
before rendering items instead of using implode function.


$items['up]='<a href="#" onclick="'.h...

		
if 
(isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['addItems']) 
&& is_array 
($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['addItems'])) 
{
	foreach 
($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['addItems'] 
as $classRef) {
		$hookObj= &t3lib_div::getUserObj($classRef);
			if (method_exists($hookObj, 'addItems'))
				$hookObj->addItems($items);
			}
		}					
		
	if (isset($items) && is_array($items)) {
			foreach($allowedItemList as $item => $itemValue) {
				if(array_key_exists($item,$items))
					$itemlist .= $items[$item];
				}
			}
		return $itemlist;

Needs always define $allowedItemList to get new items exactly to the 
desired place! If nothing set, this could have default value.
Allowed item list could work also a way to disable items
and disallow list would not necessary needed.

$hookObj->addItems($items); - function call works as reference &$items
and new item
function(&$items)

$item['newItem']=




More information about the TYPO3-dev mailing list