[Typo3-UG CH] Gifbuilder: Dynamischer Text aus php-script rendern

Rolf Friederich friederich at begasoft.ch
Tue Sep 14 14:50:47 CEST 2004


Hallo, 

Ich möchte gerne den Rückgabewert aus meinem PHP-Script mit Hilfe des
Gifbuilder zu einem Bild renden. Was mache ich falsch....schaffe es einfach
nicht den Text aus dem PHP-Script zuzuweisen! 

Mein TS-Setup:
[quote]
temp.TESTRFR = PHP_SCRIPT 
temp.TESTRFR.file = fileadmin/templates/wmlt/php/test.php 

######################## 
# LOCATION PICTURE     # 
######################## 
temp.LOCATION_IMG = IMAGE 
temp.LOCATION_IMG { 
   file = GIFBUILDER 
   file { 
      XY = [20.w]+[30.w]+30,50 
      transparentBackground = true 

      20 = TEXT 
      20.text < temp.TESTRFR 
      20.offset = 0,25 
      20.fontSize= 24 
      20.fontColor = #000000 
      20.fontFile = t3lib/fonts/georgia.ttf 
   } 
} 

# Default PAGE object: 
page = PAGE 
page.typeNum = 0 
page.10 = TEXT 
page.10 < temp.TESTRFR 
page.20 = IMAGE 
page.20 < temp.LOCATION_IMG 
[/quote]


Mein PHP-Script:
[quote]
<?php 
require_once(PATH_t3lib.'class.t3lib_page.php'); 

//Instance of pageSelect class found in class.t3lib_page.php 
$page = t3lib_div::makeInstance('t3lib_pageSelect'); 
$page->init(false); //initialize 

$pageId = $GLOBALS["TSFE"]->id; //get current pageId 
$pageContent = $page->getPage($pageId); //get page record by pageId 

$title = $pageContent['title']; //get title 
$content = substr($title,0,1).','.substr($title,1); 
?>
[/quote]  

Das PHP-Script als solches funktioniert einwandfrei, nur scheitere ich am
Übergeben des Textes an den Gifbuilder. 
Vielen Dank für jegliche Tipps! 

Gruss ROlf





More information about the TYPO3-ch mailing list