MemoTek

Un article de OUIes Ki.

(Différences entre les versions)
Jump to: navigation, search
Version du 28 août 2007 à 17:06 (modifier)
Cdriko (Discuter | contributions)

← Différence précédente
Version du 28 août 2007 à 17:08 (modifier)
Cdriko (Discuter | contributions)

Différence suivante →
Ligne 1: Ligne 1:
-'''Flash Extension''' is just another '''Flash''' extension (obviously ;-) ) for MediaWiki. See also [[Extension:Flash|Flash]] and [[Extension:Flashow|Flashow]].+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)
-It's based in [[Extension:Flash swf|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 ==+<nowiki> <swf width="50" height="50">https://multimediaart.at/mmawiki/images/b/bb/Mini.swf</swf></nowiki>
- + <swf width="50" height="50">https://multimediaart.at/mmawiki/images/b/bb/Mini.swf</swf>
-The Flash extension uses <swf></swf> 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)+
- +
- <swf width="50" height="50">https://multimediaart.at/mmawiki/images/b/bb/Mini.swf</swf>+
If you have a local swf file you can use this syntax: If you have a local swf file you can use this syntax:
- <swf width="50" height="50">/wiki/images/Mini.swf</swf>+ <swf width="50" height="50">/wiki/images/Mini.swf</swf>
Note that you don't have to write DocumentRoot's path inside <swf> tags Note that you don't have to write DocumentRoot's path inside <swf> tags
- 
-== Installation == 
- 
-You need to drop '''flash.php''' into your extensions folder (usually /wiki/extensions/), and place <code>require_once("extensions/flash.php");</code> 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: 
- 
- <nowiki><?php 
- // MediaWiki Swf Extension Ver 0.1 
- // Set up MediaWiki to react to the "<swf>" tag 
- // Original file by Brigitte Jellinek 
- // Modified by Daniel Mustieles <daniel.mustieles@ie.edu> 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 
- <object width="$width" height="$height"><param name="movie" value="$url"> 
- </param><embed src="$url" type="application/x-shockwave-flash" width="$width" height="$height"></embed></object> 
-EOM; 
- $output = str_replace("\n", "", $output); 
- return $output; 
-} 
- 
-?></nowiki> 
- 
-== Alternatives == 
-* [[Extension:Flash|Flash]] 
-* [[Extension:Flashow|Flashow]] 
-* [[Extension:LinkSwf|LinkSwf]] 
- 
-[[Category:Media handling extensions|{{PAGENAME}}]] 

Version du 28 août 2007 à 17:08

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)

<swf width="50" height="50">https://multimediaart.at/mmawiki/images/b/bb/Mini.swf</swf>

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

Note that you don't have to write DocumentRoot's path inside
Affichages
Outils personnels