Files
smarty/plugins/function.popup_init.php

30 lines
856 B
PHP
Raw Normal View History

2002-01-31 20:49:40 +00:00
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* Type: function
* Name: popup_init
* Purpose: initialize overlib
* -------------------------------------------------------------
*/
function smarty_function_popup_init($args, &$smarty_obj)
{
// be sure to place overlib.js where Smarty can locate it.
// overlib.js came with the distribution of Smarty.
2002-02-18 15:22:28 +00:00
extract($args);
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'."\n";
if (empty($src)) {
echo '<script language="JavaScript">'."\n".'<!--'."\n";
readfile(SMARTY_DIR."overlib.js",1);
echo '// -->'."\n".'</script>'."\n";
} else {
echo '<script language="JavaScript" src="'.$src.'"></script>'."\n";
}
2002-01-31 20:49:40 +00:00
return;
}
/* vim: set expandtab: */
?>