In eID mode, only a small portion of the TYPO3 regular interface is loaded. Sorry, TypoScript is not loaded. To access TypoScript configuration, you need to manually download the components necessary for this. Unfortunately, this can be a bit of a pain in the butt. Therefore, in some cases it would be easier to just load a page containing one plugin that does not contain anything (without headers, etc.).
If you want to download TypoScript templates yourself, you can try something like the following:
require_once(PATH_tslib.'class.tslib_fe.php'); require_once(PATH_t3lib.'class.t3lib_userauth.php' ); require_once(PATH_tslib.'class.tslib_feuserauth.php'); require_once(PATH_t3lib.'class.t3lib_cs.php'); require_once(PATH_tslib.'class.tslib_content.php') ; require_once(PATH_t3lib.'class.t3lib_tstemplate.php'); require_once(PATH_t3lib.'class.t3lib_page.php'); $TSFEclassName = t3lib_div::makeInstanceClassName('tslib_fe'); $id = isset($HTTP_GET_VARS['id'])?$HTTP_GET_VARS['id']:0; $GLOBALS['TSFE'] = new $TSFEclassName($TYPO3_CONF_VARS, $id, '0', 1, '','','',''); $GLOBALS['TSFE']->connectToMySQL(); $GLOBALS['TSFE']->initFEuser(); $GLOBALS['TSFE']->fetch_the_id(); $GLOBALS['TSFE']->getPageAndRootline(); $GLOBALS['TSFE']->initTemplate(); $GLOBALS['TSFE']->tmpl->getFileName_backPath = PATH_site; $GLOBALS['TSFE']->forceTemplateParsing = 1; $GLOBALS['TSFE']->getConfigArray(); $cObj = t3lib_div::makeInstance('tslib_cObj');
This initializes TSFE and cObj, but is also used to load and parse TypoScript templates. You may need to make some changes (maybe delete some things)
The code came from one of the comments on the next blog post: http://sebastiaandejonge.com/blog/articles/2010/september/21/bringing-ajax-to-your-frontend-plugins/
Good luck
source share