texttoimage with transparent background

Author Message

Reinhard Hutter

Thursday 15 January 2009 8:11:06 pm

I need to create texttoimage pictures with transparent backgrounds and have already found this extension that seems to allaw transparent backgrounds as well as background images:

http://issues.ez.no/IssueView.php?Id=12742

However, I failed to correctly install those two files. I tried to put them into the corresponding lib/ez<i>classname</i>/classes directories, but this didn't work. Can someone tell me the correct directories for each one of those files?

TIA
Reinhard

Reinhard Hutter

Wednesday 21 January 2009 5:32:39 am

After a bit trial & error and inspiration by other template extensions, I solved it this way:

1. Inside the extension directory create following directory structure

texttoimage_ext
texttoimage_ext/autoloads
texttoimage_ext/lib
texttoimage_ext/settings

2. Copy the 2 original files from the link in the posting above into the lib directory
3. In "autoloads", create a file "eztemplateautoload.php" with following content

<?php
// Operator autoloading

$eZTemplateOperatorArray = array();

$eZTemplateOperatorArray[] =
  array( 'script' => 'extension/texttoimage_ext/lib/eztemplateimageoperator_ext.php',
         'class' => 'ezTemplateImageOperatorExt',
         'operator_names' => array( 'texttoimageext' ) );

?>

4. In "settings", create a file "site.ini.append.php" with following content

#?ini charset="iso-8859-1"?
# eZ publish configuration file.

[TemplateSettings]
AutoloadPathList[]=extension/texttoimage_ext/autoloads

5. activate the extension and clear the cache

Now you can use the new operator "texttoimageext" in your templates. I don't really have enough experience to code ezPublish extensions, so there might be more elegant ways, but at least it works for me.

Daniele Nocentini

Friday 03 April 2009 2:31:59 am

Thanks for your tips!

Antica Bottega Digitale srl
http://www.abd.it

Andreas Kaiser

Thursday 16 April 2009 7:17:34 am

Also in case of using special fonts in headings or short text fragments you can use "sIFR" as an alternative (best reason of using sifr is the search engine optimization and accesibility):

http://en.wikipedia.org/wiki/Scalable_Inman_Flash_Replacement

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.