[TYPO3-dev] eID with cObj

Franz Holzinger franz at fholzinger.com
Thu Jun 14 08:16:14 CEST 2007


Steffen Kamper a écrit :
> "Wolfgang Klinger" <wolfgang at stufenlos.net> schrieb im Newsbeitrag 
> news:mailman.322326.1181728395.21067.typo3-dev at lists.netfielders.de...
>> *hiya!*
>>
>> Georg Ringer wrote:
>>> THe current code is a little bit messy but should be understandable: 
>>> http://phpfi.com/241369
>>> Error-msg: Fatal error: Call to a member function on a non-object  in the 
>>> following line:
>>> $img = $GLOBALS['TSFE']->cObj->IMAGE($imgTSConfig);
>> you will have to create a valid tslib_cObj (that's the name of the class 
>> defined in tslib/class.tslib_content.php) object.
>> Should work with
>> $GLOBALS['TSFE']->newCObj();
>> if not take a look at tslib/class.tslib_fe.php how it's done there...
>>
> 
> hi wolfgang,
> 
> this is included, but dosn't work.

I can confirm that Wolfgang's proposal works.
Use these 5 lines:

require_once (PATH_t3lib.'class.t3lib_stdgraphic.php');
require_once (PATH_tslib.'class.tslib_content.php');
require_once (PATH_tslib.'class.tslib_gifbuilder.php');

class ... {

$localCObj = t3lib_div::makeInstance('tslib_cObj');	// Local cObj.
$localCObj->start(array());


- Franz




More information about the TYPO3-dev mailing list