[TYPO3-dev] Dynamic fontColor in GIFBUILDER

Michael Feinbier michael at feinbier.net
Tue Sep 12 15:37:10 CEST 2006


Hi out there!

I've got a very strange (and maybe simple) problem which I cannot solve 
myself. I want to change the fontColor of a GIFBUILDER-Object by an own 
Extension.

The Gifbuilder looks like (snippet):
	10 = TEXT
	10.text.field = header
	10.text.listNum.splitChar = |
	10.text.listNum = 0
	10.fontFile = fileadmin/myfont.otf
	10.fontSize = 32
	10.offset = 0,32
	10.fontColor < plugin.tx_mftest_pi1
	10.fontColor.select = green

The dummy extension does not more than (snippet)
	
	function main($content,$conf)	{
		$this->conf = $conf;

		if($conf['select'] == 'green')
			return '#00FF00';
		else
			return '#FF0000';
	}

But neither the color #0F0 nor the #F00 are given to the GIFBUILDER - 
its simply black :(

If I output the Plugin ie to a template Marker
	marks.PI_TEST < plugin.tx_mftest_pi1
	marks.PI_TEST.select = green

I get the correct output (#00FF00). Why doesn't this work for the 
Gifbuilder as well?

I know, that there is a Hook in the Gifbuilder to change the fontColor 
but there must be a more easy way....

Thanks for any hint :)

Michael




More information about the TYPO3-dev mailing list