How to embed Flash files into MediaWiki output

Issue

Customer is unable to embed SWF files into the output for MediaWiki format

Solution

Please note that the extension used in these steps are only appropriate if used with an internal Wiki as it poses security issues if deploying to an external Wiki, so please keep this in mind

  1. Use the dhflashplayer extension available from http://www.mediawiki.org/wiki/Extension:Dhflashplayer and copy the dhflashplayer.php into your Wiki extensions dir.

  2. Add a directory for the flash player.swf you are going to use and the SWFObject.js file you need. The embedded code in your Frame or Word source will be replaced by the code in SWFObject.js at runtime. I found a player and SWFObject.js at http://www.longtailvideo.com/players/jw-flv-player/. (The swfobject javascript is in the download zip file.)

  3. Create a directory in your main wiki dir for the swf files and upload them there.
  4. Add this line to LocalSettings.php: include_once("extensions/dhflashplayer.php");

  5. Edit the dhflashplayer.php file so that it points to your swfObject.js file, by looking inside the <script> tag and finding the SRC= attribute, replacing the URL you find there with the URL to your swobject.js file.

  6. Finally, add this code to where ever you want to embed a video:

<dhflashplayer>file=your.flv|width=320|height=240| path=http://www.yourwebserver.com/yourmediafolder/</dhflashplayer>

replacing with your own swf file name, your wiki server name and swf file directory, and adding any other attributes desired as described in the Mediawiki org page on dhflashplayer. You have to explicitly supply the path name

A helpful tutorial can be found here: http://umwdtlt.org/newmedia/wiki/index.php?title=Embed_FLV

Permalinks/Solutions/Output/MediaWiki/EmbedSWF (last edited 2010-03-30 22:13:33 by LaurenLever)