[TYPO3-dev] ext_typoscript_setup.txt

Tapio Markula tapio.markula at dnainternet.net
Tue Jul 25 20:20:23 CEST 2006


Ernesto Baschny [cron IT] wrote:
> Tapio Markula schrieb am 25.07.2006 19:00:
> 
> 
>>>Maybe you could try to explain it?
>>
>>it is possible to define for any plugin basic configuration,
>>when you install a plugin.
> 
> 
> Who defines the basic configuration?

the person, who installs the plugin

>Who defines which configuration options are available? 

The developer of the plugin
Possible options have been defined in
ext_conf_template.txt

 >Where?

immediately after the person, who installs the plugin,
he gets all possibilities to setup basic configurations
- technically everything, which has been defined in
ext_conf_template.txt


>>You can give possibities for enable options.
> 
> 
> Who? The extension developer?
yes

>The admin? The user?

Who can set them in the installation depends on who
has right to install/uninstall plugins.
IMO only for admin users should give the possibility to 
install/uninstall plugins.


>>Typo3 use the term 'Enable features'.
> 
> 
> Never heard of "Enable features".

If plugin has  "Enable features" when you click the name
of the plugin in the plugin list, you get this
text.

Configuration:(Notice: You may need to clear the cache after 
configuration of the extension. This is required if the extension adds 
TypoScript depending on these settings.)


Enable features

...
list of enable feature as checkboxes (true/false) or input field (for 
string values).

>>With (feature) enable options you can put a swicth for example define
>>required TS inside ext_localconf.php *or* use an external TS File and
>>install required TS file later for only some branch using 'Include
>>static templates (from extensions):' (in this case the switch must be
>>both in ext_localconf.php and ext_tables.php).

> Isn't this just what ext_conf_template.txt already provides? 

yes, but ext_conf_template.txt are not normally used for setting some TS.

if you put an ext_conf_template.txt related switch for TypoScript to 
ext_localconf.php it is possible skip predefined TS.
If you skip predefined TypoScript information, you can enable possiblity 
to use 'Include static templates (from extensions):' instead.

By setting feature enable options you can set *optional* features - and
you can create simple swiches.


>>I put those alternatives for 'tm_contentaccess'.

> You put which alternatives where?

1) into ext_conf_template.txt some feature enable options to enable a 
swicht for TS templates + some extra field basic configuration

2) into ext_localconf.php a swicth to use TS, which is normally setup in
ext_typoscript_contants.txt and ext_typoscript_setup.txt


>>In principle by 'Enable features' you can always define such
>>options, that it is not necessary to read any documentation and users
>>can get the plugin working just installing it and resetting some
>>values, which can be found from the basic configuration of the plugin.
>>It would be nice, if default values would work always, when installing
>>the plugin works plug-and-play.

> Ok, this sounds great, but I can't understand why you need your
> extension to do that? Isn't that possible with "pure" TYPO3 already?

it is simpler for beginners

>>But that is not always possible. What often are problematic, are uid for
>>page(s) and path informations. An example of path could be desirable.

> So this problem is solved by your extension? How?

The id problem remains. It can't be solved with an easy way.
If some path information is needed, I give always an example of a path.

> What does the extension author has to do to use these features?

define ext_localconf.php, ext_tables.php and ext_conf_template.txt
- nothing especially difficult

> Wouldn't that be
> better implemented in the CORE if you want to get extension developers
> to use the new functionality?

not needed because everything can be defined with existing possibilities 
for ext_localconf.php, ext_tables.php and ext_conf_template.txt

>>BTW. I tried to use
>>$constants= t3lib_extMgm::extPath($_EXTKEY) .'pi1/static/constants.txt';
>>$constants= " ".include($constants)." ";
> You cannot use include() concatenated with strings. Use proper API calls
> to get the contents of a file, like t3lib_div::getURL().

Ok. I try to figure what API calls to use but I simple didn't know, what 
function(s) I could use for that purpose.
$setup= 
t3lib_div::getURL(t3lib_extMgm::extPath($_EXTKEY).'pi1/static/setup.txt');
seems to work (I must define 'constants' partially dynamic and I don't
use that for constants).




More information about the TYPO3-dev mailing list