[TYPO3-dev] Detecting the version of Typo3 for my extensio
Tapio Markula
tapio.markula at dnainternet.net
Fri May 19 16:58:34 CEST 2006
Ingo Renner wrote:
> Am Fri, 19 May 2006 14:24:49 +0300 schrieb Tapio Markula:
>
>
>>Hi
>>
>>I would need condition if($TypoVer >= 4.0)
>>
>>how I could get the version of Typo3?
>
>
> $version =
> $GLOBALS['TYPO3_VERSION']?$GLOBALS['TYPO3_VERSION']:$GLOBALS['TYPO_VERSION'];
>
> always use $GLOBALS['TYPO3_VERSION']
>
> but as this variable is not available in older versions
alternatively isset($GLOBALS['TYPO3_VERSION']) ...
ok. Basically I just need to know if the version is bigger than 3.
What ver. 4.0+ use?
if(intval(substr($GLOBALS['TYPO_VERSION'],0,1)>3))
$Typo4=1;
if Typo 4.x use $GLOBALS['TYPO_VERSION']
and some older version $GLOBALS['TYPO3_VERSION']
usage of $GLOBALS['TYPO3_VERSION' should return false because the
variable doesn't exist
More information about the TYPO3-dev
mailing list