[TYPO3-dev] Multiline typoscript and end parenthesis
Jerome Schneider
j.schneider at ameos.com
Thu Aug 16 10:31:56 CEST 2007
Hi,
I submitted the patch to M. Stucki in his quality of chief developer /
core team leader.
For the moment i'm surviving with an xclass on t3lib_tsparser :D
I'm waiting for his answer anytime soon
By the way, the TS parser is a really nice piece of code, it was
lame-easy to extend it, whereas I first thought it would be a nightmare.
So Bravo to the core team for good work :)
Best regards,
Jerome
Bernd Wilke a écrit :
> On Wed, 15 Aug 2007 12:00:19 +0300, Jerome Schneider wrote
> with subject "[TYPO3-dev] Multiline typoscript and end parenthesis":
>
>> Hi guys,
>>
>> I have a problem using multiline typoscript syntax describe at [1]
>>
>> I have a FORMIDABLE_INT cObj that can handle events thrown by the client
>> browser via ajax. The tasks to execute when event is trigered are
>> defined by php inside my so-called userobj.
>>
>> My php lines are confined in a TS multiline notation ( )
>> The problem is that closing a function call with ");" inside such a
>> multiline block fools the parser, as it detects it as the end of the
>> multiline block.
>>
>> In my TS code (complete below), here are the problematic lines:
>>
>> $rSql = $GLOBALS["TYPO3_DB"]->exec_SELECTquery(
>> "title",
>> "pages",
>> "uid=" . $iPageUid
>> ); // this line fools the parser
>>
>>
>> Does anybody knows a workaround to this ? I could surely avoid to place
>> the ");" on a single line, but this would be really unhandy on the long
>> term.
>
> I would have tried PHP-comments, but that could fool the parser if it
> decides to open an typoscript-comment, which can't be closed the same line!
>
> something like:
> $rSql = $GLOBALS["TYPO3_DB"]->exec_SELECTquery(
> "title",
> "pages",
> "uid=" . $iPageUid
> /* */ );
> )
>
> or some other characters which are neutral to the php:
> (this time in my preferred formatting)
> $rSql = $GLOBALS["TYPO3_DB"]->exec_SELECTquery("title"
> ,"pages"
> ,"uid=" . $iPageUid
> .'');
> )
>
> Propably your way of expanding syntax is best.
> But so you have to patch every version until your fix is implemented in
> core.
>
> Bernd
More information about the TYPO3-dev
mailing list