[TYPO3-core] RFC #10011: New feature: TypoScript Condition to check for installed extensions

Franz Holzinger franz at ttproducts.de
Sat Dec 27 15:25:29 CET 2008


Franz Koch a écrit :
>> both ext and extension doesn't reflect what's the condition is about. 
>> I would prefer
>> extIsLoaded or extensionIsLoaded
> 
> how about:
> [extension = extMgmMethod:param1:paramN = comparisonValue]
[extension = extName:extMgmMethod:param1:...:paramN = paramValue]

> examples:
> [extension = isLoaded:realurl = 1] && [extension = version:realurl > 
> 1.3.00]
[extension = realurl:version >  1.3.00]

No duplicate query is needed. You cannot check for an extension which is 
not present or not installed. You must never call a PHP code of a not 
installed extension.

> That way we could provide any feature in the conditions that extMgm is 
> providing. You might say, that "isLoaded:realurl = true" should better 
> be "isLoaded = realurl" - but what if you want the condition to match if 
> it's not loaded? Using "!=" doesn't really "fit" in that case and 
> providing a negated method for every purpose is to much overhead in my 
> opinion.
[extension = realurl] is shorter than "isLoaded:realurl = true"

[extension = realurl:isInstalled]
can be used now. Extensions are installed and not loaded.

There is no option for a not installed extension.
This could be added later if needed:
[extension = realurl:isInstalled=0]

I add a new patch here with code stolen from 
t3lib/class.t3lib_matchcondition.php, 
typo3/mod/tools/em/class.em_index.php and
tx_div2007/class.tx_div2007_alpha.php in order to reuse it.
This code could be removed, if wanted, from its origins.

- Franz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10011.diff
Type: text/x-patch
Size: 6956 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081227/702661d7/attachment-0001.bin 


More information about the TYPO3-team-core mailing list