Source for file function.popup.php
Documentation is available at function.popup.php
* Smarty {popup} function plugin
* Purpose: make text pop up in windows via overlib
* @link http://smarty.php.net/manual/en/language.function.popup.php {popup}
require_once(LIBERTY_PKG_PATH. "LibertyContent.php");
foreach ($params as $_key=> $_value) {
$ $_key = (string) $_value;
$append .= ',' . strtoupper($_key) . ",'$_value'";
if ($_value) $target_append = $_key. '=1';
$gBitSmarty->trigger_error("[popup] unknown parameter $_key", E_USER_WARNING);
if (empty($target) && empty($text) && empty($content_id) && !isset ($inarray) && empty($function)) {
$gBitSmarty->trigger_error("overlib: attribute 'target' or 'text' or 'inarray' or 'function' required");
if ((!empty($target) && !empty($text)) || (!empty($target) && !empty($content_id)) || (!empty($text) && !empty($content_id)) ) {
$gBitSmarty->trigger_error("overlib: You may only specify one of 'target', 'text' and 'content_id'..");
if (empty($trigger)) { $trigger = "onmouseover"; }
if (!empty($content_id)) {
if (!empty($target) && !empty($target_append)) {
$target .= "&". $target_append;
$target .= "?". $target_append;
$retval = $trigger . '="return overlib(\''. preg_replace(array("!'!","![\r\n]!"),array("\'",'\r'),$text). '\'';
$retval .= $append . ');" onmouseout="nd();"';
$retval = $trigger . '="of=function(t){overlib(t'. $append. ');};BitAjax.getAndCall(this,of,\''. $target. '\');" onmouseout="nd();"';
|