[TYPO3-german] dynamische PNGs in Extension erzeugen

JoH asenau info at cybercraft.de
Mon Mar 23 12:36:38 CET 2009


> === schnippschnapp==========
> class tx_MYEXT_pi1 extends tslib_pibase {
> var $prefixId = 'tx_MYEXT_pi1'; // Same as class name
> var $scriptRelPath = 'pi1/class.tx_MYEXT_pi1.php';
> var $extKey = 'MYEXT';
> var $pi_checkCHash = true;
> function main($content, $conf) {
> $im = @ImageCreate (50, 100) or die;
> $background_color = ImageColorAllocate ($im, 255, 255, 255);
> $text_color = ImageColorAllocate ($im, 233, 14, 91);
> ImageString ($im, 1, 5, 5, "Ein Test-String", $text_color);
> ob_start();
> imagepng($im);
> $img = ob_get_contents();
> ob_end_clean();
> return $img
> }
> }

Wieso machst Du sowas nicht einfach ganz ohne Plugin per TypoScript mit dem
GIFBUILDER?

Und wenn schon per plugin und PHP:
Wie wird das Plugin eingebunden?
Ist das ein USER_INT-, USER- oder aber ein COA_INT-, COA-Element?
Hast Du einfach zwischendurch mal den Cache gelöscht und die Ergebnisse
verglichen?

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
TYPO3 workshops: http://workshops.eqony.com




More information about the TYPO3-german mailing list