Did you already got the probleme to create a menu with image because the font was not a standard web font and you has to make again and again the menu because you clients ask you to do many change? This helper is the solution.
What is Phenix_View_Helper_Text2image?
This is a simple View Helper for Zend Framework that allow you to transform on the fly a string texte to an image with the good font, size, background and position. When the image are generated, they are stored in an image folder and they are never regenereted else if you change a params of an image. This is a big avantage for the designer that doesnt have to care about the font or disposition to use.
Configuration :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?php $param = array( /* For image menu with special font */ 'imgdir' => "home/user/public_html/images", 'imgurl' => "/images", 'font' => "/home/user/App/Fonts/ITCKrist.TTF", 'fsize' => 11, 'flag' => "menu", 'width' => 170, 'height' => 26, 'tcolor' => "#4e6549", 'bgcolor' => "#FFFFFF", 'tposition_x' => 3, 'tposition_y' => 20 )?> |
Create all menu image :
1 2 3 4 5 | <ul class="navmenu"> <li><a href="<?=$this->url()?>"><?php echo $this->Text2image("Acceuil", $param)?></a></li> <li><a href="<?=$this->url()?>"><?php echo $this->Text2image("Produits", $param)?></a></li> <li><a href="<?=$this->url()?>"><?php echo $this->Text2image("Contactez-nous", $param)?></a></li> </ul> |
Note that if image already exist, only the image tag will be generated.
Where I can download this helper?
You can download this helper on the repository of PhenixApp project. View_Helper repository
Tags: helper, Image generator, PhenixApp, Phenix_View, Phenix_View_Helper, Phenix_View_Helper_Text2image, Text to image, Zend Framework, Zend_View, Zend_View_Helper
Related posts:
Tags: helper, Image generator, PhenixApp, Phenix_View, Phenix_View_Helper, Phenix_View_Helper_Text2image, Text to image, Zend Framework, Zend_View, Zend_View_Helper