Flash: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
Line 46: Line 46:
By default, Mediawiki still blocks many files from being uploaded for security reasons. Add this line your ''LocalSettings.php'' file, which will allow the upload of Flash files:
By default, Mediawiki still blocks many files from being uploaded for security reasons. Add this line your ''LocalSettings.php'' file, which will allow the upload of Flash files:
$wgFileExtensions[] = 'swf';
$wgFileExtensions[] = 'swf';

See also [[http://meta.wikimedia.org/wiki/Help:Images_and_other_uploaded_files#Supported_file_types.3B_miscellaneous|Help:Images and other uploads]]: ''You may also need to remove the desired extension from the [[Help:Images_and_other_uploaded_files#Uploading_non-image_files|filetype blacklist]] in <code>/includes/DefaultSettings.php</code>.


== Known Bugs ==
== Known Bugs ==

Revision as of 04:24, 3 January 2006

The flash extension allows the display of flash movies within a wiki.

Syntax

Base Syntax

<flash>file=filename.swf|attribute=value|...</flash>

Attribute Reference

  • width=px or % (Modify the width of the object)
  • height=px or a% (Modify the height of the object)
  • play=true/false (Start playing the file or wait at first frame, default:true)
  • loop=true/false (Loop the animation, default:true)
  • quality=low/autolow/medium/high/autohigh/best (Predefine the quality)
  • devicefont=true/false (Change the look of the text used in flash file)
  • bgcolor=#?????? (? -> Hexadecimal integer: 1-9, A-F)
  • scale=showall/noborder/exactfit (Automatically adjust content to width and height)
  • menu=true/false (Show or hide the menu on right-click)

More (but untested) attributes here.

Examples

<flash>file=happy.swf|width=10%|height=30|quality=best</flash>
Shows the movie with the best quality with a width of 10% and a height of 30 pixels.

<flash>file=cool.swf|width=200|height=300|bgcolor=#FDE742|scale=exactfit</flash>
Shows the movie with a width of 200 and a height of 300. The background color is light-yellow (#FDE742). The content of the movie is stretched to the size of 200x300.


Code / Downloads


Installation

  1. Click on one of the versions above
  2. Copy the code into a file (e.g. Flash.php)
  3. Save the file in the extensions directory of your mediawiki folder
  4. Add the line include('extensions/Flash.php'); to the LocalSettings.php file

Now you can use the extension with <flash>...</flash> in the wiki


Frequently Asked Questions

I can't upload Flash (*.swf) files!

If you cannot upload anything, then first enable uploads. Find the line #$wgDisableUploads = false; in LocalSettings.php and uncomment it.

By default, Mediawiki still blocks many files from being uploaded for security reasons. Add this line your LocalSettings.php file, which will allow the upload of Flash files:

$wgFileExtensions[] = 'swf';

See also [and other uploads]: You may also need to remove the desired extension from the filetype blacklist in /includes/DefaultSettings.php.

Known Bugs

  • Possible security issues with Javascript that are not tested yet


Untested Attributes

  • align
  • salign
  • base
  • wmode
  • SeamlessTabbing
  • flashvars
  • name (object-specific)
  • id (embed-specific)
  • movie (object-specific)
  • src (embed-specific)