[TYPO3-dev] COA_INT in extension ?
Steffen Kamper
steffen at dislabs.de
Tue Sep 26 18:55:27 CEST 2006
ok, i tried to do this on-the-fly.
What is wrong, because it doesn't work ?
$TS['conf']='COA_INT';
$TS['conf.']['10']='TEXT';
$TS['conf.']['10.']['value']=strftime('%D - %H:%M:%S',time());
return $this->cObj->cObjGetSingle($TS['conf'],$TS['conf.']);
vg Steffen
"Steffen Kamper" <steffen at dislabs.de> schrieb im Newsbeitrag
news:mailman.1.1158338553.24646.typo3-dev at lists.netfielders.de...
>
> additional Question - JoH, can I use your example for a german tutorial ?
> I think this may interest much more t3-coders!
>
> vg Steffen
>
> "JoH" <info at cybercraft.de> schrieb im Newsbeitrag
> news:mailman.1.1158323435.5385.typo3-dev at lists.netfielders.de...
>>>>>> Nothing similar - since you will do exactly the same thing in your
>>>>>> extensions:
>>>>> Not really. Even if one executes cObjGetSingle for COA_INT inside
>>>>> plugin, rest of the system have no idea for it and still will cache
>>>>> final output.
>>>>
>>>> No - I have tested this approach thoroughly and it works perfectly
>>>> fine. As you can see the whole TS-Array is just transferred inside
>>>> the userFunc. So it doesn't make any difference if it is created
>>>> this way or directly inside the PHP code.
>>>
>>> Now I see from your code. This is different from what I though. I
>>> thought you propose typical plugin:
>>>
>>> 10 = USER
>>> 10.userFunc = whatever
>>>
>>> and doing everything else inside "whatever". But your given example
>>> will work, of course. In fact, this example is very good, you may
>>> want to put it to TER as tutorial extension :)
>>
>> Even inside a "typical plugin" it will work the same way.
>> You can create the TS array inside the setup of userFunc and hand it over
>> to
>> the function or create it directly inside the main function itself as
>>
>> $conf = array(
>> blah
>> )
>>
>> the result will still be the same.
>> The magic lies in the way a COA_INT is handled in
>> class.tslib_content.php.
>> $content will always be <!--SOME_MARKER--> and gets replaced after
>> fetching
>> the content from cache.
>>
>> Joey
>>
>> --
>> Wenn man keine Ahnung hat: Einfach mal Fresse halten!
>> (If you have no clues: simply shut your knob sometimes!)
>> Dieter Nuhr, German comedian
>> openBC: http://www.cybercraft.de
>> T3 cookbook: http://www.typo3experts.com
>>
>>
>
>
More information about the TYPO3-dev
mailing list