3 Inserts an <iframe> for a given URL (as url=, src=, href= or simply
4 the first unnamed parameter, width= and height= must be given in
5 conjunction and an alternative text may be included).
7 <?plugin InlineFrame http://example.org/
8 examplary inlines a non-existent page
12 $ewiki_plugins["mpi"]["inlineframe"] = "ewiki_mpi_inlineframe";
14 function ewiki_mpi_inlineframe($action, &$args, &$iii, &$s) {
17 ($url = $args["url"]) or ($url = $args["href"])
18 or ($url = $args["src"]) or ($url = $args[0]);
19 $width = htmlentities($args["width"]);
20 $height = htmlentities($args["height"]);
21 if ($l = strpos($args["_"], "\n")) {
22 $alt = htmlentities(substr($args["_"], $l));
25 #-- return <iframe> tag / bare link
26 $inj = ($height&&$width) ? " width=\"$width\" height=\"$height\"" : "";
27 $url = htmlentities($url);
29 "<iframe src=\"$url\" $inj>"
30 ."<a href=\"$url\">$url</a>$alt"