[TYPO3] GIFBUILDER: Error at require_once class.tslib_gifbuilder.php from BE

Manuel Rego Casasnovas mrego at igalia.com
Wed Jul 16 12:29:39 CEST 2008


On Wed, 2008-07-16 at 11:05 +0300, Dmitry Dulepov [typo3] wrote:
> Hi!
> 
> Manuel Rego Casasnovas wrote:
> > I'm trying to use GIFBUILDER from a BE module to pre-generate some
> > images that are going to be used later on the website.
> > 
> > The problem is that when I try to create an object of
"tslib_gifbuilder"
> > I need to do a require_once, as usually, but it doesn't work:
>
> require_once(t3lib_extMgm::extPath('cms').'tslib/class.tslib_gifbuilder.php');
> > $gifCreator = t3lib_div::makeInstance('tslib_gifbuilder');
> > 
> > And I get the next error, just at require_once line:
> > Fatal error: Class 't3lib_stdGraphic' not found
> >
in /var/www/mywebsite/typo3_src-4.1/typo3/sysext/cms/tslib/class.tslib_gifbuilder.php on line 102
> 
> require_once(PATH_t3lib . 'class.t3lib_stdgraphic.php');

This fix only the first error. Then more errors appear.

> 
> > I don't see anything wrong in my code, but maybe it's not possible
to
> > create an instance of this class at backend.
> 
> GIFBUILDER is a frontend class. I do not think it will be easy to use
in BE. Take a look at directly t3lib_stdGraphic instead.
> 
> Generally you should avoid use anything from tslib in Backend.

You're right, I'm going to create a plugin to do it and call the URL
directly from BE when I need generate the images from BE.

Best regards,
   Rego

-- 
Manuel Rego Casasnovas
Computer Science Engineer
mailto:mrego at igalia.com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com


More information about the TYPO3-english mailing list