Flash: Difference between revisions
No edit summary |
No edit summary |
||
Line 42: | Line 42: | ||
=== I can't upload Flash (*.swf) files! === |
=== I can't upload Flash (*.swf) files! === |
||
If you cannot upload anything, then first enable uploads. Find the line <code>#$wgDisableUploads = false;</code> in ''LocalSettings.php'' and uncomment it. |
If you cannot upload anything, then first enable uploads. Find the line <code>#$wgDisableUploads = false;</code> in ''LocalSettings.php'' and uncomment it. |
||
But by default, mediawiki still blocks many files from being uploaded for security reasons. Add this line your ''LocalSettings.php'' file: <code>$wgFileExtensions = array( |
But by default, mediawiki still blocks many files from being uploaded for security reasons. Add this line your ''LocalSettings.php'' file: <code>$wgFileExtensions[] = array( 'swf' );</code>. This allows the upload flash files. |
||
Revision as of 15:56, 29 September 2005
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
- Click on one of the versions above
- Copy the code into a file (e.g. Flash.php)
- Save the file in the extensions directory of your mediawiki folder
- 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.
But by default, mediawiki still blocks many files from being uploaded for security reasons. Add this line your LocalSettings.php file: $wgFileExtensions[] = array( 'swf' );
. This allows the upload flash files.
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)