Extension:Dhflashplayer

From MediaWiki.org

Jump to: navigation, search

         

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
Dhflashplayer

Release status: stable

Implementation  Tag
Description Allow the display of DreamHost's flash movie player within MediaWiki.
Author(s)  Mrsdonovan
Last Version  0.99 (June 2009)
License GPL
Download Version 0.99
Example  <dhflashplayer>...</dhflashplayer>

check usage (experimental)

Dhflashplayer extension allow the display of DreamHost's flash movie player within MediaWiki. This script is based on Flashow v0.01 by Eric Larcher and the original code by PatrikRoy.

Contents

[edit] Syntax

[edit] Base Syntax

<dhflashplayer>attribute1=value1|attribute2=value2|...</dhflashplayer>


[edit] Attribute Reference

  • file = file name with extension (e.g. "snake.swf")
  • width = width of the movie in px (e.g. "150")
  • height = height of the movie in px (e.g. "80")
  • path = full path of the movie file (e.g. "http://badger.com/")
  • charset = charset used by the feed (e.g. "utf-8")
  • flashvars = Flash variables to pass to the flash player (e.g. "&showdigits=true&autostart=true&image=http://mywebsite.com/image.jpg"). Must include the ampersand!!
  • more_then_one = If you want to put more then one video on one page, set this to true or 1. It will then leave out the second call to the SWFObject.js file

[edit] Examples

Bare minimum:
<dhflashplayer>file=mushroom.flv|width=200|height=120|path=http://somewebsite.com/movies/</dhflashplayer>

With flash variables and only one video player on the page, use something like:
<dhflashplayer>file=mushroom.flv|width=200|height=120|path=http://somewebsite.com/movies/|flashvars=&showdigits=true&autostart=false&image=http://somewebsite.com/images/mushroom.jpg</dhflashplayer>

With more then one video on the page, the extra players on the same page should use the following code:
<dhflashplayer>file=mushroom.flv|width=200|height=120|path=http://somewebsite.com/movies/|flashvars=&showdigits=true&autostart=false&image=http://somewebsite.com/images/mushroom.jpg|more_then_one=true</dhflashplayer>

[edit] Code

[edit] Installation

  • Save the code as dhflashplayer.php and upload it into the extension directory of your MediaWiki installation like: mediawiki/extensions/dhflashplayer.php
  • Add the following to the end of LocalSettings.php:
include_once("extensions/dhflashplayer.php");

You can now use the extension with <dhflashplayer>...</dhflashplayer> in the wiki.

[edit] Other Servers & Other Flash Players

It is possible to use this extension on non-dreamhost servers. You can also use another flash players and SWFObjects instead of the one Dreamhost offers by changing the paths to your flashplayer and copy of SWFObjects in the dhflashpayer.php file.

[edit] Notes

  • Does not work with the latest version of SWFObject, v2 or greater.

[edit] Alternatives