[TYPO3-ect] general config options in extension
Steffen Kamper
steffen at sk-typo3.de
Thu Aug 23 13:29:02 CEST 2007
"Franz Koch" <typo.removeformessage at fx-graefix.de> schrieb im Newsbeitrag
news:mailman.1.1187867145.10378.typo3-team-extension-coordination at lists.netfielders.de...
> 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
Hi Franz,
indeed you're right that there are different types of images used and should
be referenced too.
I found a simular concept with WEC, they provide a "General Site Settings"
page in Constants, where the user fills in the general params like
Site Name
Site Url
admin email
general usergroup
etc...
maybe special:
Thumb
normal Image
presentation image
...
Would this be an option for lib/div? If only one ext depends on lib/div (and
like static_table_info nearly all have one) all these settings are available
for all extensions, using lib/div or not.
vg Steffen
More information about the TYPO3-team-extension-coordination
mailing list