allwiki首页  
天下维客 你可以修改的网络知识库
首页最近更改优秀条目专题展示电脑科技词典软件学习网络知识电脑安全明星时尚天下百科
 

MediaWiki扩展:Flash

天下维客,你可以修改的网络知识库

Jump to: navigation, search
MediaWiki扩展简明教程 Inputbox帮助文档 使用Spam黑名单 内容折叠隐藏 动态文章列表 指定图片链接
代码高亮处理 预置初始编辑文本 页面访问限制 所见即所得编辑器 QQ在线信息
交流:扩展使用 投票与评分 内容随机展示 wikitex 改进设想 ...更多
加入google地图和51地图标注功能 Ajax五颗星评分插件

通过运行Flash扩展本插件,可以在MediaWiki上显示Flash动画

目录

语法

基本语法

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

特性参考

  • width=px 或 % (调整flash对象的宽度)
  • height=px 或 a% (调整flash对象的高度)
  • play=true/false (页面调入后,自动开始播放/处于暂停状态。默认值:true)
  • loop=true/false (是否循环播放。默认值:true)
  • quality=low/autolow/medium/high/autohigh/best (预定义播放质量)
  • devicefont=true/false (调整flash文件中的文本外观)
  • bgcolor=#?????? (? -> 16进制整数: 1-9, A-F)
  • scale=showall/noborder/exactfit (自动调整内容到适合宽度和高度)
  • menu=true/false (右键点击时显示/隐藏菜单)
  • align
  • salign
  • base
  • wmode
  • SeamlessTabbing
  • flashvars
  • name (object-specific)
  • id (embed-specific)
  • movie (object-specific)
  • src (embed-specific)

范例

<flash>file=happy.swf|width=10%|height=30|quality=best</flash>


显示happy.swf——使用最佳效果、10%宽度、30像素的高度。

<flash>file=cool.swf|width=200|height=300|bgcolor=#FDE742|scale=exactfit</flash>


显示cool.swf——使用200像素宽度*300像素高度、亮黄色(#FDE742)。


代码/下载

安装

  1. 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 end of your LocalSettings.php file(注意:部分操作系统中,文件名对大小写敏感)

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

FAQ

无法上传*.swf文件

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 Help:Images and other uploads: You may also need to remove the desired extension from the filetype blacklist in
/includes/DefaultSettings.php
.
We founded an issue with the Mime Type Filter: Uploads were enabled, FileExtensions "swf" added, BlackList checked and still no upload. So when adding $wgVerifyMimeType= false; in LocalSettings.php we succeeded in uploading swf files. It certainly needs further investigations but for the time being it works

已知Bug

  • Javascript可能有潜在安全问题,尚未完全测试。


参见


英文原文参见: http://www.mediawiki.org/wiki/Extension:Flash

Personal tools
工具
金银币拍卖 金币拍卖预展  金银币网店 熊猫金银币 生肖金银币