function doApplet ($pagename, $attrstr) { $attribs = new Attributes($attrstr); $attr = $attribs->getAttribs('fo'); if (isset($attr['file'])) { $embed = new Embed($pagename, $attrstr); return Keep($embed->getWikiXML()); } return ''; }
function addApplet ($appattr, $param) { $appattr = str_replace('\"', '"', $appattr); $param = str_replace('\"', '"', $param); $attr = new Attributes($appattr); $this->attribs = $attr->getAttribs(); preg_replace('#\s*<param\s+(.*?)\s*/?>#sie', "\$this->addParam('$1')", $param); }
function doYouTube ($pagename, $attrstr) { $attribs = new Attributes($attrstr); $attr = $attribs->getAttribs('html'); if (isset($attr['id'])) { $attr['id'] = preg_replace('/\W/', '', $attr['id']); $w = isset($attr['width']) ? $attr['width'] : 425; $h = isset($attr['height']) ? $attr['height'] : 350; $ret = "<object width='$w' height='$h'>\n"; $ret.= "<param name='movie' value='http://www.youtube.com/v/$attr[id]'/>\n"; $ret.= "<param name='wmode' value='transparent'/>\n"; $ret.= "<embed src='http://www.youtube.com/v/$attr[id]' type='application/x-shockwave-flash' wmode='transparent' width='$w' height='$h'/>\n"; $ret.= "</object>"; return Keep($ret); } return ''; }