[TYPO3-dev] Fetching userspecific FE-output with a script from outside typo3
Kasper Skårhøj
kasper2006 at typo3.com
Thu Mar 30 13:02:19 CEST 2006
Please DONT!
Use the eID feature now!
it's a complete mess to duplicate the header of the index.php file
for the frontend, its not supposed to be done.
- kasper
On Mar 30, 2006, at 11:44 , Martin Kutschker wrote:
> Franz Koch schrieb:
>>
>> Any ideas how to achieve that? I tried to setup a minimal typo3
>> environment (had a look at index.php), but failed so far.
>
> This worked for me for a mininal requirement I had (access to
> session data):
>
> define('TYPO3_OS', ...);
> define('TYPO3_MODE','FE');
> define('PATH_thisScript', ...);
> define('PATH_site', ...);
> define('PATH_t3lib', PATH_site.'t3lib/');
> define('PATH_tslib', PATH_site.'tslib/');
> define('PATH_typo3conf', PATH_site.'typo3conf/');
> define('TYPO3_mainDir', 'typo3/');
>
> require_once(PATH_t3lib.'class.t3lib_div.php');
> require_once(PATH_t3lib.'class.t3lib_extmgm.php');
> require_once(PATH_t3lib.'config_default.php');
> require_once(PATH_t3lib.'class.t3lib_db.php');
> require_once(PATH_t3lib.'class.t3lib_userauth.php');
> require_once(PATH_t3lib.'class.t3lib_cs.php');
> require_once(PATH_tslib.'class.tslib_fe.php');
> require_once(PATH_tslib.'class.tslib_feuserauth.php');
>
> $TYPO3_DB = t3lib_div::makeInstance('t3lib_DB');
>
> $className = t3lib_div::makeInstanceClassName('tslib_fe');
> $TSFE = new $className($TYPO3_CONF_VARS, t3lib_div::_GP('id'), 0);
> $TSFE->connectToDB();
> $TSFE->initFEuser();
>
> Of course you have to change the defines.
>
> Masi
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
- kasper
"A contribution a day keeps the fork away"
-------------------------------
kasper2006 at typo3.com | +45 20 999 115 | skype: kasperskaarhoej |
gizmo: kasper_typo3
More information about the TYPO3-dev
mailing list