MemoTek

Un article de OUIes Ki.

Jump to: navigation, search

Flash Extension is just another Flash extension (obviously ;-) ) for MediaWiki. See also Flash and Flashow. It's based in Flash swf extension, but this revision allows to use local swf files located in your webserver (Modifications made by Daniel Mustieles <daniel.mustieles[NO-SPAM]@ie.edu).

Syntax

The Flash extension uses tags.

Sample

Give the URL of the swf-file as the content of the swf-tag, specify width and hight as attributes. (default to width=550, height=400)

If you have a local swf file you can use this syntax:

Note that you don't have to write DocumentRoot's path inside inside LocalSettings.php.Would not work unless the require was placed at the end of the Localsettings.php file.'''Important:''' Before '''EOM''' must not be any whitespace. '''E''' must be first character in that line.The Code in flash.php: " tag // Original file by Brigitte Jellinek // Modified by Daniel Mustieles to allow local swf files $wgExtensionFunctions[] = "wfSwf"; function wfSwf() { global $wgParser; $wgParser->setHook( "swf", "RenderSwf" ); } function RenderSwf( $input, $argv ) { global $wgScriptPath; $output = ""; // external URL if ( strpos($input , "http") === 0 && strpos($input, ".swf") == strlen($input)-4 ) { $url = $input; } // internal Media: else { $url = $input; } $width = isset($argv['width']) ? $argv['width']  : 550; $height = isset($argv['height'])? $argv['height'] : 400; $id = basename($input, ".swf"); $output .=<< EOM; $output = str_replace("\n", "", $output); return $output;}?>== Alternatives ==* [[Extension:Flash|Flash]]* [[Extension:Flashow|Flashow]]* [[Extension:LinkSwf|LinkSwf]][[Category:Media handling extensions|{{PAGENAME}}]]"> inside LocalSettings.php.Would not work unless the require was placed at the end of the Localsettings.php file.'''Important:''' Before '''EOM''' must not be any whitespace. '''E''' must be first character in that line.The Code in flash.php: " tag // Original file by Brigitte Jellinek // Modified by Daniel Mustieles to allow local swf files $wgExtensionFunctions[] = "wfSwf"; function wfSwf() { global $wgParser; $wgParser->setHook( "swf", "RenderSwf" ); } function RenderSwf( $input, $argv ) { global $wgScriptPath; $output = ""; // external URL if ( strpos($input , "http") === 0 && strpos($input, ".swf") == strlen($input)-4 ) { $url = $input; } // internal Media: else { $url = $input; } $width = isset($argv['width']) ? $argv['width']  : 550; $height = isset($argv['height'])? $argv['height'] : 400; $id = basename($input, ".swf"); $output .=<< EOM; $output = str_replace("\n", "", $output); return $output;}?>== Alternatives ==* [[Extension:Flash|Flash]]* [[Extension:Flashow|Flashow]]* [[Extension:LinkSwf|LinkSwf]][[Category:Media handling extensions|{{PAGENAME}}]]" type="application/x-shockwave-flash" width="550" height="400">
Affichages
Outils personnels