diff options
author | ctrlaltca@gmail.com <> | 2011-11-19 11:33:31 +0000 |
---|---|---|
committer | ctrlaltca@gmail.com <> | 2011-11-19 11:33:31 +0000 |
commit | 98dbe6f0d2edfff3a1f5785504504b4a6e5dd4eb (patch) | |
tree | 89f19120abb170cb37bb512c8c9535eb2b451da8 /buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.popup_init.php | |
parent | 1f09b786730956d01c48a82272617a0f8b2597f0 (diff) |
updating phpDocumentor, part 2: add new version
Diffstat (limited to 'buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.popup_init.php')
-rw-r--r-- | buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.popup_init.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.popup_init.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.popup_init.php new file mode 100644 index 00000000..d9b42bd0 --- /dev/null +++ b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.popup_init.php @@ -0,0 +1,39 @@ +<?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + + +/** + * Smarty {popup_init} function plugin + * + * Type: function<br> + * Name: popup_init<br> + * Purpose: initialize overlib + * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init} + * (Smarty online manual) + * @param array + * @param Smarty + * @return string + */ +function smarty_function_popup_init($params, &$smarty) +{ + $zindex = 1000; + + if (!empty($params['zindex'])) { + $zindex = $params['zindex']; + } + + if (!empty($params['src'])) { + return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n" + . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n"; + } else { + $smarty->trigger_error("popup_init: missing src parameter"); + } +} + +/* vim: set expandtab: */ + +?> |