DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:flash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:flash [2010-01-25 22:19] andiplugin:flash [2022-01-18 19:41] (current) Klap-in
Line 6: Line 6:
 email      : andi@splitbrain.org email      : andi@splitbrain.org
 type       : syntax type       : syntax
-lastupdate : 2009-12-11+lastupdate : 2016-02-03
 compatible : 2009-02-14+ compatible : 2009-02-14+
 depends    :  depends    : 
 conflicts  conflicts 
 similar    : swfobject similar    : swfobject
-tags       : media, flash, embed+tags       : !obsolete, media, flash, embed
  
-downloadurl: http://github.com/splitbrain/dokuwiki-plugin-flash/zipball/master +downloadurl: https://github.com/splitbrain/dokuwiki-plugin-flash/zipball/master 
-sourcerepo : http://github.com/splitbrain/dokuwiki-plugin-flash +sourcerepo : https://github.com/splitbrain/dokuwiki-plugin-flash 
-bugtracker : http://github.com/splitbrain/dokuwiki-plugin-flash/issues+bugtracker : https://github.com/splitbrain/dokuwiki-plugin-flash/issues
 donationurl: http://donate.dokuwiki.org/flash donationurl: http://donate.dokuwiki.org/flash
 ---- ----
 +
 +Flash is not available anymore in browsers. Video functionality is included in DokuWiki, see the [[wiki:syntax#media_files|media syntax description]] and [[:video]] options included adding subtitles.
 +
 +Embedding videos from the many video sites like YouTube can be done with [[vshare]] plugin.
 +
  
 This plugin allows you to embed Flash files. Unlike DokuWiki's built-in syntax, this plugin adds an easy way to add arbitrary parameter or FlashVars. Unlike the similar [[plugin:swfobject]] plugin it does not require any JavaScript but relies on DokuWiki's own function to embed Flash files in a cross-browser compatible way instead. This plugin allows you to embed Flash files. Unlike DokuWiki's built-in syntax, this plugin adds an easy way to add arbitrary parameter or FlashVars. Unlike the similar [[plugin:swfobject]] plugin it does not require any JavaScript but relies on DokuWiki's own function to embed Flash files in a cross-browser compatible way instead.
Line 23: Line 28:
 ===== Download and Installation ===== ===== Download and Installation =====
  
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the download link given above. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ==== Changes ==== ==== Changes ====
  
-{{rss>http://github.com/feeds/splitbrain/commits/dokuwiki-plugin-flash/master}}+{{rss>https://github.com/splitbrain/dokuwiki-plugin-flash/commits/master.atom date}}
  
 ===== Syntax and Usage ===== ===== Syntax and Usage =====
Line 64: Line 69:
 </code> </code>
  
 +===== [PATCH] Alternative Image =====
 +
 +Hi, I have been bouncing back and forth between [[plugin:swfobject|swfobject]] that does not seem to work anymore and this flash plugin that does not have the ability to display an alternate image in case the browser does not support flash. The following patch will add an ''alt'' parameter letting you specify the path to an image in dokuwiki format.
 +
 +For example, if you want to embed a flash movie called ''presentation.swf'' and display the image ''sorry.png'' in case the browser does not support flash, you would use the following code:
 +
 +<code>
 +<flash center 425x344 presentation.swf>
 +title A Generic Presentation
 +alt sorry.png
 +</flash>
 +</code>
 +
 +To apply the patch, download the file ''alt.patch'' in the ''/lib/tpl/flash'' directory and issue:
 +<code bash>
 +cat alt.patch | patch -p1
 +</code>
 +
 +I am sure that the author could revise the code and add a better way of handling this, but this has worked for us so far. :-)
 +
 +<file diff alt.patch>
 +--- syntax.php.orig 2014-06-04 21:33:22.683345771 +0100
 ++++ syntax.php 2014-06-04 21:35:22.059345869 +0100
 +@@ -85,6 +85,9 @@
 +             if($key{0} == '!') {
 +                 $return['data'][substr($key,1)] = ml($val,'',true,'&');
 +                 unset($return['data'][$key]);
 ++            } else if($key == 'alt') {
 ++                return['alt'] = '<img src="'.ml($val,'',true,'&').'" alt="'.$val.'"/>';
 ++                unset($return['data'][$key]);
 +             }
 +         }
 + 
 +@@ -102,7 +105,7 @@
 +         if($data['align'] == 'right') $att['align'] = 'right';
 +         if($data['align'] == 'left' $att['align'] = 'left';
 + 
 +-        $R->doc .= html_flashobject($data['swf'],$data['width'],$data['height'],$data['data'],$data['data'],$att);
 ++        $R->doc .= html_flashobject($data['swf'],$data['width'],$data['height'],$data['data'],$data['data'],$att,$data['alt']);
 + 
 +         return true;
 +     }
 +</file>
  
plugin/flash.1264454382.txt.gz · Last modified: 2010-01-25 22:19 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki