[TYPO3-dev] cObj->IMAGE in BE doesn't work
Georg Ringer
spam at ringerge.org
Thu Oct 12 08:43:53 CEST 2006
Hello,
I want to use a cObj in a BE-module and I only get the following error if I
use instance: Fatal error: Call to a member function on a non-object in
/typo3_src-4.0.2/typo3/sysext/cms/tslib/class.tslib_content.php on line 4603
I only get the error with an cObj->IMAGE, with cObj->TEXT everything is
fine.
Some looks at the core:
tslib_content.php #4603: $theImage =
$GLOBALS['TSFE']->tmpl->getFileName($file);
=> Problem because $GLOBALS['TSFE']->tmpl->getFileName() doesn't work
my code:
// -----------------------
require_once(PATH_site.'tslib/class.tslib_content.php');
$cObjLocal = t3lib_div::makeInstance("tslib_cObj");
$file = 'uploads/tx_rgtemplatemaker/layout011.gif';
$imgTSConfig = Array();
$imgTSConfig['file'] = $file;
$imgTSConfig['file.']['maxW'] = 10;
$imgTSConfig['file.']['maxH'] = 20;
echo $cObjLocal->IMAGE($imgTSConfig);
//-----------------
For the whole mod1/index.php please visit http://phpfi.com/162764 386-394
So 2 questions:
- Where is my problem or
- How do I get cObj->IMAGE in a BE-module?
many thanks for reading, more thanks for answering ;)
Georg
More information about the TYPO3-dev
mailing list