node = $node; $this->xml = $xml ; } public static function dtd() { return <<xml->attributes($this->node, array("path", "text", "signature", "width", "height", "float", "style", "sigstyle", "resize", "href")); extract($parse["attributes_array"]); // Thumbnail erzeugen if ($resize != "" && $width != "" && $height != "") { if (!file_exists($path)) return "[image path doesn't exist.]"; $scale = ($resize == "scale"); $newpath = $this->xml->getDataItem("image_prefix").crc32($path).".jpg"; list($width, $height) = image::thumbnail($path, $newpath, $height, $width, $scale); $width .= "px"; $height .= "px"; $path = $newpath; } // Externen Pfad bestimmen $func = $this->xml->getDataItem("image_remote"); if ($func != "") { if (substr($func, 0, 9) == "callback:") $remote = call_user_func(substr($func, 9), $path); else { if (!substr_count($path, "://")) { $remote = str_replace("%s", $path, $func); $remote = str_replace("%u", urlencode($path), $remote); } else $remote = $path; } } else { $remote = $path; } // Bildgroesse bestimmen if ($float != "" && ($width == "" || $height == "")) { if (!file_exists($path)) return "[image path doesn't exist.]"; $imgdata = image::getimagesize($path); $width = $imgdata[0]; $height = $imgdata[1]; } $href = $this->xml->url($href); return call_user_func(array($this, $returntype), $remote, $width, $height, $signature, $float, $style, $sigstyle, $text, $parse["attributes_string"], $href); } private function xhtml($remote, $width, $height, $signature, $float, $style, $sigstyle, $text, $str, $href) { if ($href != "") { $al = ""; $ar = ""; } else { $al = ""; $ar = ""; } if ($float != "") { $float = "float:".$float.";"; } if ($signature == "signature") { return "
".$al."\"".xml::mask($text)."\"".$ar."

".$al.xml::mask($text).$ar."

"; } return $al."\"".xml::mask($text)."\"".$ar; } } ?>