[TYPO3] typolink with cli / backend plugin
Elijah Alcantara
elijah.alcantara at gmail.com
Tue Feb 20 06:36:18 CET 2007
Hello,
We share the same problem, after looking around the list I was able to
produce only the id=## of the url, realurl works through this one too.
For the extension (in my case I'm editing a hook file):
I had to include:
tslib_fe
t3lib_userauth
tslib_feuserauth
t3lib_cs
tslib_content
t3lib_tstemplate
t3lib_page
t3lib_timetrack
..
..
Way down the code we have:
//making an instance of frontend classes, tsfe
$cObj = t3lib_div::makeInstance('tslib_cObj');
global $GLOBALS, $TSFE, $TYPO3_CONF_VARS;
$TSFEclassName = t3lib_div::makeInstanceClassName('tslib_fe');
$TSFE = new $TSFEclassName(
$TYPO3_CONF_VARS,
t3lib_div::_GP('id'),
t3lib_div::_GP('type'),
t3lib_div::_GP('no_cache'),
t3lib_div::_GP('cHash'),
t3lib_div::_GP('jumpurl'),
t3lib_div::_GP('MP'),
t3lib_div::_GP('RDCT')
);
$temp_TTclassName =
t3lib_div::makeInstanceClassName('t3lib_timeTrack');
$GLOBALS['TT'] = new $temp_TTclassName();
$GLOBALS['TT']->start();
$confArray =
unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['tdwg_track']);
$TSFE->id = $confArray['pidToDisplayStandardDraft'];
$TSFE->connectToMySQL();
$TSFE->initLLVars();
$TSFE->initFEuser();
$TSFE->fetch_the_id();
$TSFE->getPageAndRootline();
$TSFE->initTemplate();
$TSFE->forceTemplateParsing = 1;
$TSFE->getConfigArray();
$TSFE->initUserGroups();
$TSFE->initTemplate();
$TSFE->connectToDB();
$TSFE->determineId();
$GLOBALS['TSFE'] = $TSFE;
$cObj->start(array(),'');
echo "Our really difficult url: ".
$cObj->getTypoLink_URL($pid,$urlParameters=array(),$target='') . "<br>";
Now all I need is the actual baseURL of the site.. I was wondering what else
is missing to get that...?
Regards,
--
http://elijah.pinoguin.com
Elijah O. Alcantara
More information about the TYPO3-english
mailing list