[TYPO3-dev] ext_typoscript_setup.txt [WAS: stable = documented ?]

Tapio Markula tapio.markula at dnainternet.net
Wed Jul 26 07:55:48 CEST 2006


Elmar Hinz wrote:
> Tapio Markula wrote:
> 
>>What about my suggestion - lets users choose!
>>if you put
>>1) into ext_conf_template.txt
>>
>>for example 'enable.preconfiguration'
>>
>>2) into ext_localconf.php
>>if ($_EXTCONF['enable.']['preconfiguration]) {
>>here some generic TS config, which
>>represents the tasks of
>>ext_typoscript_constants.txt
>>and
>>ext_typoscript_setup.txt

> Hi Tapio,
> 
> I guess you were on the right track a few hours before the others. It took
> me some time to understand the proposal - there is some other work during
> the day. I will do some testing with this.
> 
> I think 2) should be modified, so that pi1/static/ etc. would be read
> diretly. So you don't need to dublicate the code, wich would be a source of
> errors.

Yes I know that problem. But concerning setup that is easy to solve

In ext_localconf.php
if ($_EXTCONF['enable.']['addEditPanel']) {	// configuration, which 
represents the the same task as 'ext_typoscript_setup.txt'

	$setup= 
t3lib_div::getURL(t3lib_extMgm::extPath($_EXTKEY).'pi1/static/setup.txt');
	t3lib_extMgm::addTypoScriptSetup($setup);
// the setup code is the *exactly the same*, which can be set afterward 
using 'Include static templates (from extensions):'

concerning 'constants' referring to a file is not always the best 
practise. I have some related 'Feature enable' options to setup the
plugin. Those must be put as variables.

	
	$path = t3lib_extMgm::extPath($_EXTKEY);
	$constants='
editPanelSetText=Toolbar: 
logOutText=Log out from CMS
logoutId='.$_EXTCONF['enable.']['logoutId'].'
subFolder='.$_EXTCONF['enable.']['subFolder'].'
editPanel.object = page.1 < editPanel
CSSFileForFEtoobar='.$_EXTCONF['enable.']['subFolder'].strstr($path,'/typo3').'fe-buttonset.css
	';
	t3lib_extMgm::addTypoScriptConstants($constants);

If any dynamic defineable constants are needed,
it is possible to refer to a file.
$constants= 
t3lib_div::getURL(t3lib_extMgm::extPath($_EXTKEY).'pi1/static/constants.txt')

BTW. I have always problems with paths. I defined in
class.ux_t3lib_tsfebeuserauth.php new FE editing icons.
I tried to use extRelPath constant (maybe the name is a little bit 
different) but it didn't work if typo3 was
installed into a sub-folder, because it counted againsts the real root,
not from the folder, where Typo3 has been installed. Imust set an option 
to define the path. Another plugin related path problmes is that 
kickstarter creates always invalid path informations for icons, which 
relate with 'Clickmenu items'. Path is correct *only* for pages, which 
locate in /typo3/ folder. I hope that path problems could be solved.




More information about the TYPO3-dev mailing list