Skip to content

Instantly share code, notes, and snippets.

@pduersteler
Created March 5, 2012 13:32
Show Gist options
  • Save pduersteler/1978314 to your computer and use it in GitHub Desktop.
Save pduersteler/1978314 to your computer and use it in GitHub Desktop.
TYPO3 eID
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');
class tx_extname_eid extends tslib_pibase
{
var $prefixId = 'tx_extname_eid';
var $extKey = 'extname';
function __construct()
{
$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();
}
function main()
{
$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$template = $this->cObj->fileResource('path/to/template');
}
}
$output = t3lib_div::makeInstance('tx_extname_eid');
$output->main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment