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 [2009-11-20 18:48] 74.93.99.97plugin: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-11-15+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: https://github.com/splitbrain/dokuwiki-plugin-flash/zipball/master 
 +sourcerepo : https://github.com/splitbrain/dokuwiki-plugin-flash 
 +bugtracker : https://github.com/splitbrain/dokuwiki-plugin-flash/issues 
 +donationurl: http://donate.dokuwiki.org/flash
 ---- ----
  
-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 crosbrowser compatible way instead.+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.
  
 ===== Download and Installation ===== ===== Download and Installation =====
  
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the following URL. 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.
  
-  * {{http://dev.splitbrain.org/download/snapshots/flash-plugin-latest.tgz}}+==== Changes ==== 
 + 
 +{{rss>https://github.com/splitbrain/dokuwiki-plugin-flash/commits/master.atom date}}
  
 ===== Syntax and Usage ===== ===== Syntax and Usage =====
Line 26: Line 38:
 The flash is embedded using ''<flash></flash>'' tags. The file to embed, the dimension of the flash object and the alignment is has to be given space separated in the opening tag. Name-Value pairs for the parameters are then given in the body. The flash is embedded using ''<flash></flash>'' tags. The file to embed, the dimension of the flash object and the alignment is has to be given space separated in the opening tag. Name-Value pairs for the parameters are then given in the body.
  
-Here's an example for a YouTube video:+Here's an example for a **YouTube video**:
  
 <code> <code>
Line 34: Line 46:
 allowFullScreen   true allowFullScreen   true
 allowscriptaccess always allowscriptaccess always
 +</flash>
 +</code>
 +
 +And an example for a **freemind map**((Freemind is an open source mind mapping tool: http://freemind.sourceforge.net)), using the [[http://freemind.sourceforge.net/wiki/index.php/Flash_browser|freemind flash viewer]]:
 +
 +<code>
 +<flash left 800x400 http://your-server/freemind-viewer/visorFreemind.swf>
 +initLoadFile http://your-server/freemind-viewer/your-freemind-map.mm
 +quality high
 +bgcolor #c4cccc
 +openUrl _blank
 </flash> </flash>
 </code> </code>
Line 46: 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.1258739300.txt.gz · Last modified: 2009-11-20 18:48 by 74.93.99.97

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