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

Source for file function.popup_init.php

Documentation is available at function.popup_init.php

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8.  
  9. /**
  10.  * Smarty {popup_init} function plugin
  11.  *
  12.  * Type:     function<br>
  13.  * Name:     popup_init<br>
  14.  * Purpose:  initialize overlib
  15.  * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
  16.  *           (Smarty online manual)
  17.  * @param array 
  18.  * @param Smarty 
  19.  * @return string 
  20.  */
  21. function smarty_function_popup_init($params&$smarty)
  22. {
  23.     $zindex 1000;
  24.     
  25.     if (!empty($params['zindex'])) {
  26.         $zindex $params['zindex'];
  27.     }
  28.     
  29.     if (!empty($params['src'])) {
  30.         return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' "\n"
  31.          . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' "\n";
  32.     else {
  33.         $smarty->trigger_error("popup_init: missing src parameter");
  34.     }
  35. }
  36.  
  37. /* vim: set expandtab: */
  38.  
  39. ?>

Documentation generated on Tue, 24 Oct 2006 09:22:43 -0500 by phpDocumentor 1.3.1