4 this mpi allows to embed multimedia files using following syntax:
5 <?plugin MultiMedia http://www.example.com/movie.swf ?>
7 <?plugin MultiMedia href="http://..." ?>
11 $ewiki_plugins["mpi"]["multimedia"] = "ewiki_mpi_multimedia";
14 function ewiki_mpi_multimedia($action="html", $args, &$iii, &$s) {
17 case "doc": return("The <b>multimedia</b> plugin allows to reference multimedia objects which are no plain images (like videos, flash, applets).");
18 case "desc": return("reference multimedia files");
21 $a_url = array("href", 0, "url", "src");
22 $a_std = array("width", "height", "type");
23 $a_forb = array_merge(array("_"), $a_url, $a_std);
26 foreach ($a_url as $i) {
27 if ($href = $args[$i]) {
31 #-- <object> tag, std args
32 $o .= '<object data="' . $href . '"';
33 foreach ($a_std as $i) {
35 $o .= " $i=\"" . htmlentitites($v) . '"';
41 foreach ($args as $i=>$v) {
42 if (!in_array($i, $a_forb)) {
43 $o .= '<param name="'.htmlentities($i).'" value="'.htmlentities($v).'">';
46 $o .= "Your browser cannot view this multimedia object.";
47 #<off># $o .= '<embed src="' . $href . '"></embed>';