/[cvs]/nfo/php/libs/net.php.smarty/plugins/function.popup_init.php
ViewVC logotype

Contents of /nfo/php/libs/net.php.smarty/plugins/function.popup_init.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Wed Jun 16 21:58:17 2004 UTC (20 years ago) by joko
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +23 -13 lines
updated to smarty-2.6.3

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 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed