[TYPO3-english] Updating old extention 2
Jan Bednarik
info at bednarik.org
Sat Oct 11 09:59:24 CEST 2014
Hi,
have a look at CoolUri, it's running under 4.5 and 6.2 as well. It's
done like this:
if (!class_exists('t3lib_SCbase')) {
class t3lib_SCbase extends \TYPO3\CMS\Backend\Module\BaseScriptClass {}
}
and then you can use
class tx_cooluri_module1 extends t3lib_SCbase {
Regards
Jan
Dne 10. 10. 2014 20:17, Christian Tauscher napsal(a):
> If the Extention should run with Pre 6.2 and with 6.2+ I tryed the
> following:
>
> if($typo3Version < 6002000) {
> // DEFAULT initialization of a module [BEGIN]
> unset($MCONF);
> require_once('conf.php');
> require_once($BACK_PATH.'init.php');
> require_once($BACK_PATH.'template.php');
>
> $LANG->includeLLFile('EXT:tmd_movie/mod1/locallang.xml');
> require_once(PATH_t3lib.'class.t3lib_scbase.php');
> $BE_USER->modAccess($MCONF,1);
> // DEFAULT initialization of a module [END]
> } else {
> if (!isset($MCONF)) {
> require('conf.php');
> }
> $GLOBALS['LANG']->includeLLFile('EXT:tmd_movie/mod1/locallang.xml');
> $GLOBALS['BE_USER']->modAccess($MCONF,1);D]
> }
>
>
> What must $typo3Version be?
>
> I found methods usable width 6.2 not fails for 6.1
> I found methods usable width 6.1 not fails for 6.2
>
> ???
>
> Thank you for your help.
>
> Christian.
>
More information about the TYPO3-english
mailing list