Index: typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
===================================================================
--- typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php (revision 2530)
+++ typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php (working copy)
@@ -236,7 +236,14 @@
if (!$this->mode) {
$this->mode='rte';
}
-
+ //init hookObjectArray:
+ if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['browseLinksHook'])) {
+ foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['browseLinksHook'] as $_classData) {
+ $_procObj = & t3lib_div::getUserObj($_classData);
+ $_procObj->init($this);
+ $this->hookObjectsArr[]=$_procObj;
+ }
+ }
// Site URL
$this->siteURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL'); // Current site url
@@ -583,6 +590,10 @@
// Initializing the action value, possibly removing blinded values etc:
$allowedItems = explode(',','page,file,url,mail,spec');
+ //call hook for extra options
+ foreach ($this->hookObjectsArr as $_hookObj) {
+ $allowedItems=$_hookObj->addAllowedItems($allowedItems);
+ }
if (is_array($this->buttonConfig['options.']) && $this->buttonConfig['options.']['removeItems']) {
$allowedItems = array_diff($allowedItems,t3lib_div::trimExplode(',',$this->buttonConfig['options.']['removeItems'],1));
} else {
@@ -631,6 +642,10 @@
$menuDef['spec']['url'] = '#';
$menuDef['spec']['addParams'] = 'onclick="jumpToUrl(\'?act=spec&editorNo='.$this->editorNo.'&contentTypo3Language='.$this->contentTypo3Language.'&contentTypo3Charset='.$this->contentTypo3Charset.'\');return false;"';
}
+ //call hook for extra options
+ foreach ($this->hookObjectsArr as $_hookObj) {
+ $menuDef=$_hookObj->modifyMenuDef($menuDef);
+ }
$content .= $this->doc->getTabMenuRaw($menuDef);
// Adding the menu and header to the top of page:
@@ -780,8 +795,7 @@
';
}
break;
- case 'page':
- default:
+ case 'page':
$content.=$this->addAttributesForm();
$pagetree = t3lib_div::makeInstance('tx_rtehtmlarea_pageTree');
@@ -801,6 +815,13 @@
';
break;
+ //call hook
+ default:
+ foreach ($this->hookObjectsArr as $_hookObj) {
+ $content.=$_hookObj->getTab($this->act);
+ }
+
+ break;
}
// End page, return content: