Smarty
[ class tree: Smarty ] [ index: Smarty ] [ all elements ]

Source for file modifier.iconify.php

Documentation is available at modifier.iconify.php

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8. /**
  9.  * Smarty plugin
  10.  * -------------------------------------------------------------
  11.  * Type:     modifier
  12.  * Name:     capitalize
  13.  * Purpose:  capitalize words in the string
  14.  * -------------------------------------------------------------
  15.  */
  16. function smarty_modifier_iconify($string)
  17. {
  18.   // XINGICON what are we going to do with this function? is this needed?
  19.   $string=substr($string,strlen($string)-3);
  20.   if(file_exists(IMG_PKG_PATH."icn/$string".".gif")) {
  21.     return "<img border='0' src='".IMG_PKG_URL."icn/${string}.gif' alt='icon' class='icon' />";
  22.   else {
  23.     return "<img border='0' src='".IMG_PKG_URL."icn/else.gif' alt='icon' class='icon' />";
  24.   }     
  25.     
  26. }
  27.  
  28. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:09 +0000 by phpDocumentor 1.5.0-lsces