[Typo3-dev] Typo3 only for nerds?

tapio tapio.markula at dnainternet.net
Sat Aug 20 10:07:56 CEST 2005


Troels Kjær Rasmussen wrote:
> A small tip on extending core files 

> Take a look at this part of the core API docs:
> http://typo3.org/documentation/document-library/doc_core_api/Which_classes/?encryptionKey=&cHash=5214ac2cd7
> This will help you to modify core without modifying the core files themselves. 

But does it really help in my case? I need extra classes, for example
in /t3lib/class.t3lib_tsfeuserauth.php

		if ($perms&8)	{
			$toolBar.='<a 
href="'.htmlspecialchars(TYPO3_mainDir.'db_new.php?id='.$id.'&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
					'<img class="tb-button tb-button-new-page" 
src="t3lib/gfx/fe-icons/new_page.gif" border="0" align="top" 
title="'.$this->extGetLL('edit_newPage').'" alt="" /></a>';
		}

I found 'allow=toolbar,...' in EDITPANEL definitions.

That definition presumably concerns the toolbar above. I didn't get the
'allow=toolbar,...' working at all. But even if I would have succeed in 
that, it has just a common setting for toolbar. I want as visible just 
few buttons in the toolbar, which would be visible as extra buttons in 
edit panel toolbars.

Extra classes are for hiding undesired buttons:
'tb-button-new-page' is for this CSS

.tb-button-new-page {display:none}

I know that '$perms&8' can hide button on the base of the button type 
(options.disableSomebutton = 1) but that doesn't fit in this case.
I would hide them also for admin users independently what permission 
options has been. The if-statement simply is not enough in order to 
satisfy my needs. I would need 'allow=toolbar.newPage, toolbar. ...
for frontend editing

if ($perms&8 || ($someAllowCondition && $FEediting))

could do the same task. Anyway the many functions should be rewritten in 
  order to get enough good control.

	function ext_makeToolBar() should be rewritten




More information about the TYPO3-dev mailing list