summaryrefslogtreecommitdiff
path: root/inc/parser/xhtml.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-01-16 18:41:40 +0100
committerAndreas Gohr <andi@splitbrain.org>2009-01-16 18:41:40 +0100
commit07bf32b240a999581627aadcc58c044a577dc62a (patch)
tree3ded7a0950d9b69c4afdec21acaa7c54c094b798 /inc/parser/xhtml.php
parent883179a4d109b59b43041f979e362f8800a9052f (diff)
downloadrpg-07bf32b240a999581627aadcc58c044a577dc62a.tar.gz
rpg-07bf32b240a999581627aadcc58c044a577dc62a.tar.bz2
new html_flashobject() function for simple and XHTML valid flash embeds
darcs-hash:20090116174140-7ad00-4eb1fe3269d10cb21819a5b220484b7114cbb4de.gz
Diffstat (limited to 'inc/parser/xhtml.php')
-rw-r--r--inc/parser/xhtml.php28
1 files changed, 11 insertions, 17 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 565459220..bad1a21de 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -966,26 +966,20 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// return the title of the flash
if (!$title) {
// just show the sourcename
- $title = $this->_xmlEntities(basename(noNS($src)));
+ $title = basename(noNS($src));
}
- return $title;
+ return $this->_xmlEntities($title);
}
- $ret .= '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'.
- ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"';
- if ( !is_null($width) ) $ret .= ' width="'.$this->_xmlEntities($width).'"';
- if ( !is_null($height) ) $ret .= ' height="'.$this->_xmlEntities($height).'"';
- $ret .= '>'.DOKU_LF;
- $ret .= '<param name="movie" value="'.ml($src).'" />'.DOKU_LF;
- $ret .= '<param name="quality" value="high" />'.DOKU_LF;
- $ret .= '<embed src="'.ml($src).'"'.
- ' quality="high"';
- if ( !is_null($width) ) $ret .= ' width="'.$this->_xmlEntities($width).'"';
- if ( !is_null($height) ) $ret .= ' height="'.$this->_xmlEntities($height).'"';
- $ret .= ' type="application/x-shockwave-flash"'.
- ' pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'.DOKU_LF;
- $ret .= '</object>'.DOKU_LF;
-
+ $att = array();
+ $att['class'] = "media$align";
+ if($align == 'right') $att['align'] = 'right';
+ if($align == 'left') $att['align'] = 'left';
+ $ret .= html_flashobject($src,$width,$height,
+ array('quality' => 'high'),
+ null,
+ $att,
+ $this->_xmlEntities($title));
}elseif($title){
// well at least we have a title to display
$ret .= $this->_xmlEntities($title);