4 This allows to embed a dynamic page, like the PowerSearch plugin,
5 into an ordinary wiki page. So this is similar to the Insert mpi.
7 <?plugin embed PageIndex ?>
8 <?plugin embed page=PowerSearch real=1 ?>
10 The real=1 tells to use "PowerSearch" as the embeded pages title,
11 a page name can be given as first parameter or as id= or page=
15 $ewiki_plugins["mpi"]["embed"] = "ewiki_mpi_embed";
18 function ewiki_mpi_embed($action="html", $args, &$iii, &$s) {
20 global $ewiki_plugins, $ewiki_id, $ewiki_action;
22 if ($action == "html") {
26 ($get = $args["id"]) or ($get = $args["page"]);
28 $get = array_keys($args);
29 $get = array_shift($get);
39 $pf = ewiki_array($ewiki_plugins["page"], $get);
41 #-- exec dynamic page plugin
42 if ($get && function_exists($pf)) {
44 $o .= $pf($id, $uu, $ewiki_action);