Manual:Extensions/zh

{| style="border: 2px solid #aaa; padding: 1em 2em; margin: 1em 0 2em 0; width:auto; margin:0 auto; float: left" |

什么是扩展插件?
扩展插件允许你定制MediaWiki的外观和工作方式.

Wiki用户可以浏览现有扩展插件或者请求一个新插件. 系统管理员可在他管理的MediaWiki网站上安装（或删除）扩展插件. 开发者可以编写新插件 或者 完善已有插件. 根据关键字搜索扩展插件:
 * style="textalign: center; valign: middle; padding: 0 2em" |


 * }

安装插件可以实现各人不同的目的：


 * 扩充用于写文章的wiki的标记 - 参阅 Category:Parser function extensions 和 Category:Parser extensions.
 * 添加新的报告或新的管理功能 - 参阅 Category:Special page extensions.
 * 改变MediaWiki的外观和感觉 - 参阅 Gallery of user styles 和 Category:User interface extensions.
 * 定制验证机制提高安全等级 - 参阅 Category:Authentication and Authorization Extensions.

浏览扩展插件
你可浏览Category:Extensions by category(分类的扩展插件)或者Extension Matrix(扩展插件矩阵)以了解已有插件的功能范围.关于如何安装这些插件或者如何编写自己的插件,参见后续章节.

检查已安装的插件
只有那些具备访问服务器文件系统的管理员可以安装用于MediaWiki的扩展插件,但是任何人都可以点击Special:Version页面获得当前有哪些扩展插件被用在这个MediaWiki网站上.例如,点击这些扩展插件被用在了英文版的Wikipedia网站上.

安装扩展插件
在安装完MediaWiki后即可安装扩展插件. 添加一个插件需要下面几个步骤：


 * 1) 开始前
 * A few extensions require the installation of a patch. Many of them also provide instructions designed for installation using unix commands. You require shell access (SSH) to enter these commands listed on the extension help pages.
 * 1) 下载扩展插件.
 * Extension Distributor helps you to select and download most of the popular extensions.
 * Extensions are usually distributed as modular packages. They generally go in their own subdirectory of .  A list of extensions documented on MediaWiki.org is available on the extension matrix, and a list of extensions stored in the Wikimedia SVN repository is located at svn:trunk/extensions. Some extensions are available as source code within [ this wiki] . You may want to automate copying them.
 * Unofficial bundles of the extensions in the Wikimedia SVN repository can be found on the toolserver. These bundles are arbitrary snapshots, so keep in mind they might contain a broken version of the extension (just as if you load them from the developer's repository directly).
 * 1) 安装扩展插件.
 * Generally, at the end of the  file (but above the PHP end-of-code delimiter, " ", if present), the following line should be added:
 * This line forces the PHP interpreter to read the extension file, and thereby make it accessible to MediaWiki.
 * Some extensions can conflict with maintenance scripts, for example if they directly access $_SERVER (not recommended).
 * In this case they can be wrapped in the conditional so maintenance scripts can still run.
 * if (!$wgCommandLineMode) {
 * require_once( "$IP/extensions/extension_name/extension_name.php" );
 * }
 * The maintenance script importDump.php will fail for any extension which requires customized namespaces which is included inside the conditional above such as Extension:Semantic MediaWiki, Extension:Semantic Forms.
 * The maintenance script importDump.php will fail for any extension which requires customized namespaces which is included inside the conditional above such as Extension:Semantic MediaWiki, Extension:Semantic Forms.

完善扩展插件
FIXME

开发扩展插件
This complex topic is handled on under the developing extensions manual page.

另请参阅

 * Extension Matrix
 * Category:Extensions
 * Category:Extensions in need of a new maintainer
 * Template:Extension
 * Manual:Developing extensions
 * Manual:Parser functions
 * Manual:Special pages
 * Manual:Tag extensions
 * Project:Extension requests
 * Manual:Translating extensions - Information about translating extensions.
 * m:Category:MediaWiki extensions - in the process of being moved to MediaWiki.org.