Hallo,
ich möchte in einem Plugin PNG generieren.
Hintergrund: „Webseite“ ist FlashSlideshow mit XML-Steuerung:
Ich habe also eine Nichtmenüseite mit folgendem TS angelegt angelegt :
img = PAGE
img {
typeNum = 21
10 < plugin.MYEXT_pi1
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:image/png
disableCharsetHeader = 1
disableAllHeaderCode = 1
admPanel = 0
}
}
in der Extension:
=== 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
}
}
Welche Optionen muss ich einstellen?
Aufruf der Seite im FE /index.php?id=7&type=21 bringt keine Ausgabe.
Und im Preview des BE: The page is not configured! [type= 0][]
Wo kann ich mich da eilesen oder gibt es eine kurze Antwort?