[TYPO3-dev] How to get the extension typoscript configuration inside an eID script?

Ries van Twisk typo3 at rvt.dds.nl
Sun Nov 15 21:13:25 CET 2009


On Nov 15, 2009, at 2:46 PM, Patrick Broens wrote:

> Ries van Twisk wrote:
>>
>> On Nov 14, 2009, at 5:03 PM, Thomas Thasmo Deinhamer wrote:
>>
>>> Good evening!
>>>
>>> Does there exist a nifty way to get the final extension
>>> typoscript configuration inside an eID script?
>>>
>>> I wanna use eID for performance reasons,
>>> but can't use it without typoscript configuration.
>>>
>>> How's this done?
>>>
>>> Thanks a lot! =o)
>>
>> it's not...
> It is ;-)

Patrick,
he did clearly mention he needed speed and wanted to use eID AND he
needs typoscript available. In reality this combination is not possible.

The rest below is true of-course,
however I wonder if initializing all the stuff initialized is really a  
lot faster then using a page type whish
is a lot easer to use. I never did any testing on it but my wild guess  
is that it's not very suitable for Ajax style suggestions,
given that he wanted that (usually people want ajax suggestions with  
eID, but the guy never mentioned what he really needed)

Ries

>
> But you need to initialize tslib_fe, which is a huge overhead for Ajax
> functionality.
>
> First you make an instance of the tslib_fe class like:
> $GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe',
> 	$GLOBALS['TYPO3_CONF_VARS'],
> 	t3lib_div::_GP('id'),
> 	t3lib_div::_GP('type'),
> 	and more variables if you want
> );
> (please check your incoming values ;-)
>
> Do some other stuff (check if you need this)
> $GLOBALS['TSFE']->connectToMySQL();
> $GLOBALS['TSFE']->initFEuser();
> $GLOBALS['TSFE']->determineId();
> $GLOBALS['TSFE']->getCompressedTCarray();
> $GLOBALS['TSFE']->initTemplate();
> $GLOBALS['TSFE']->getConfigArray();
>
> And you can get the configuration at:
> $configuration =
> $GLOBALS['TSFE']->tmpl->setup['plugin.'] 
> ['tx_yourextension_controller.'];
>
> It's not really recommended, but it is doable.
>
> Patrick
>>
>> let me explain,
>>
>> if you need typoscript AND you need eID,
>> then you are out of luck.
>>
>> Usually if you need typoscript using some sort of Ajax call,
>> then use a proper type number, it's not a lot slower
>> then using typoscript within your eID (never made in serious
>> measurements though...
>>
>> Depending on what you are doing, there are several solutions.
>>
>> What I did here http://www.cocktailsoftheworld.com/find-a-cocktail.html
>> with
>> my Ajax(eID calls it to prepare the complete list of ingredients and
>> Cocktail
>> names ands store them as a file. Then use that file within my eID.
>>
>> If that method can work for you, highly depends on what you are  
>> doing...
>>
>> Ries
>>
>>
>>
>>
>>
>>
>>
>>
>>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev


			regards, Ries van Twisk

-------------------------------------------------------------------------------------------------
tags: Freelance TYPO3 Glassfish JasperReports JasperETL Flex Blaze-DS  
WebORB PostgreSQL DB-Architect
email: ries at vantwisk.nl        web:   http://www.rvantwisk.nl/     
skype: callto://r.vantwisk
Phone: +1-810-476-4196    Cell: +593 9901 7694                   SIP:  
+1-747-690-5133











More information about the TYPO3-dev mailing list