[TYPO3-ect] general config options in extension

Franz Koch typo.removeformessage at fx-graefix.de
Thu Aug 23 13:05:44 CEST 2007


Hi Steffen, hi list,

> I would like to discuss how to use config options in extensions.
> 
> Mainly every extension has it's own configuration array. This is not an easy 
> task for the user to setup the extension, he has to go through all options 
> and configure it.
> But it could be more easy if general options are used.
> 
> Simple example: images
> I find many extensions using something like
> 
> plugin.ext {
>   singleView.image {
>      maxW = xxx
>      maxH = xxx
>      ...
>  }
> }
> and so on.
> 
> It would be more easy if all images take general config from 
> tt_content.image like
> 
> plugin.ext.singleView.image < tt_content.image
> 
> Then the user has his general settings in constants for the whole site and 
> the extension fits to it. If need special configuration could be added.
> This could be done with many options like email-addresses, usergroups etc.

a very big *+1*. Even better would be to use references - but that 
doesn't work :(
But I would suggest to not hardcode of which type the image is. Maybe 
someone needs GIFBUILDER or maybe only the filename, so I vote for:

- TS ---
globalConfiguration {
	teaserImage = IMAGE
	teaserImage {
		file.import.current = 1
		...
	}
	singleView = IMAGE
	singleView {
		file.import.current = 1
		...
	}
}
plugin.ext.listView.image < globalConfiguration.teaserImage
plugin.ext.singleView.image < globalConfiguration.singleImage
-------

- php ---
# provide somehow a localCObject - not sure if and how it is available
# in lib right now

...
controller::localCObject->data = $this->getDataArray();
controller::localCObject->setCurrentVal($this->get('imageField');
$image = 
controller::localCObject->cObjGetSingle(configurations::get('image'],configurations::get['image.']);
---------

Just a suggestion.

--
Kind regards,
Franz Koch


More information about the TYPO3-team-extension-coordination mailing list