[TYPO3-dev] Improving User > Setup

Tapio Markula tapio.markula at dnainternet.net
Mon Jul 10 13:07:25 CEST 2006


Martin Kutschker wrote:
> Tapio Markula schrieb:
> 
>> Hi
>>
>> User > Setup has one quite annoying feature.
>> If administastrator has been put some override options,
>> those options ase still visible for the user.
> 
> 
> You are right.
> 
> And as an admin I may want to hide options without overrideing them at all.

Using comma separated list of options to hide would be reasonable

setup.override.disableUserSetup =simulate_user,lang,titlelen,helptext

The list would be quite long. I have found in these lists that
values must be in lowercase and they are then little bit different
than data values (for example name="data[titleLen]").


> But I'd happy to set any override if it'll remove any unwanted options.

To do both of them setup.ov

$overrideProperties = 
t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'setup.override');
$overrideProperties=$overrideProperties['properties'];
$typesForDisableSetupOptions = 
t3lib_div::trimExplode(',',strtolower($confProperties['disableUserSetup']),1);
$disableUserSetup = array_flip($typesForDisableSetupOptions);
		
+
		
	if(!isset($overrideProperties['helpText']) && 
!$disableUserSetup['helptext']){
etc.

or should just hide option (style="display:none"), if the option has not 
overwritten?

if(!isset($overrideProperties['helpText']){

if ($disableUserSetup['helptext'])
$style=" display:none";
...

If some value not set at all, it might be necessary to add this for all 
saving situations

if(!isset($d['helpText']))
$d['helpText']=$BE_USER->uc['helpText'];
else
$BE_USER->uc['helpText'] = $d['helpText'];



> Please make a patch (diff -u) and put it in an feature request on 
> bugs.typo3.org.
> 
> Masi

I might do (or just put some code snippets) but look at the proposals 
before that.





More information about the TYPO3-dev mailing list