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.

浏览扩展插件
You can browse Category:Extensions by category or the Extension Matrix to see the full range of extensions that have already been written. For information on installing these extensions or writing your own, see below.

检查已安装的插件
Only someone with administration access to the filesystem on a server can install extensions for MediaWiki, but anyone can check which extensions are active on an instance of MediaWiki by accessing the Special:Version article. For example, these extensions are active in the English 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.