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

Michael Stucki michael at typo3.org
Sun Dec 28 08:39:38 CET 2008


There is no need to create a new condition key. Instead, do this:

[globalVar = extIsLoaded:static_info_tables_taxes = 1]
...
[end]

// Using t3lib_div::int_from_ver() syntax:
[globalVar = extVersion:static_info_tables_taxes < 4002003]
...
[end]

The rest of the patch looks like overkill for what it should do.

- michael

Franz Holzinger wrote:
> 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
> 


-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list