开发者中心
From MediaWiki.org
This page is a translated version of the page Developer hub and the translation is 65% complete.
![]() |
用户 | ![]() |
系统管理员 | ![]() |
开发员 |
MediaWiki开发说明,包括关键文件,资源和开发工具。它是为 使用过MediaWiki的熟练LAMP(软件包) 程序员写的。
For an introductory guide to developing MediaWiki, read how to become a MediaWiki hacker.
For help installing or customizing MediaWiki, visit the 系统管理员中心. For help using MediaWiki, visit the 用户中心.
概要[edit | edit source]
MediaWiki是以开源形式开发的。[1] 使用 PHP 编程语言 [2]MediaWiki主要在LAMP平台运行。[3][4] 核心开发是通过大规模在线协作完成的。
- 开发讨论可以在各种邮件列表和IRC 频道中。主要开发者列表为wikitech-l,主要的开发者 IRC 频道为#mediawiki和#wikimedia-dev。请阅读Developers中的内容以对邮件列表和 IRC 频道中的人有个印象。
- Source code is managed using the Git revision control system. Read the Git article for an overview of how the MediaWiki developers use Git. Read the wikitech:Help:Access#Access FAQ article if you'd like access.[5]
- Developers extending or interfacing with MediaWiki (instead working on the core code) have several convenient extension points, including the API, the Hooks system and Skins – see the #Extending MediaWiki section of this page for an overview.
主要文档[edit | edit source]
编码、开发和规范[edit | edit source]
- Development policy – 主要开发策略简介。
- Coding conventions – learn how to write PHP code in the MediaWiki style.
- Security for developers – 了解如何保持MediaWiki系统安全。
- 代码提交核查表 – 在提交代码前,请仔细根据核查表检查相关事项。
- 代码审查手册 – MediaWiki代码审查手册,供审查人员使用。
- 需求中心(RfC) – 了解MediaWiki需求表,也可以提出自己对MediaWiki的需求建议。
调试和测试[edit | edit source]
- How to debug – a guide to debugging MediaWiki.
- Manual:Errors and symptoms – an overview of common MediaWiki errors and their correlating symptoms.
- Selenium Framework – 学习如何使用Selenium为MediaWiki写UI测试用例。
- Unit testing – learn to write unit tests for MediaWiki using PHPUnit.
- Security – security issues are reported to [email protected].
系统架构[edit | edit source]
- Manual:Code – an overview of the key parts of MediaWiki's source code.
- Database layout – an overview of MediaWiki's database schemas.
- Global object variables – a partial list of key global variables.
- Localisation – learn about MediaWiki's internationalisation system.
- Manual namespace on this wiki – documentation for developers.
- MediaWiki类参考手册 –从MediaWiki源码生成的技术文档。 (注意: 手册很大,加载会比较慢。)
- MediaWiki 虚拟库——手册、教程及所选文章的集合。
子系统[edit | edit source]
- API – MediaWiki's API provides direct, high-level access to the data contained in the MediaWiki databases
- ContentHandler——MediaWiki 的自定义页面类型支持框架。
- 数据库访问——MediaWiki 中数据库使用综述,包括数据库抽象层简明指南。
- Job queue——MediaWiki 中让长时间任务异步运行的框架。
- 消息 API——MediaWiki 中通过 PHP 或 JavaScript 提供本地化程序消息的框架。
扩展 MediaWiki[edit | edit source]
MediaWiki has been designed to allow for modification without changing the "core code". This makes it easy to update to a new version of MediaWiki without having to manually merge in old extension code changes. There are six main extension points that allow developers to change or extend what MediaWiki can do. The extension points are:
- API – access the data and metadata of MediaWiki instances through a powerful web API
- Hooks – 系统的执行挂钩
- Parser Functions – 添加自定义的指令,例如
{{#if:...|...|...}}
- Skins – 自定义 MediaWiki 的外观
- Special Pages – 添加自定义的特殊页面
- Tag Extensions – 添加自定义的标签,例如
<newtag>...</newtag>
插件开发人员的帮助文档[edit | edit source]
- Manual:Developing extensions——扩展开发指南。
- Project:WikiProject Extensions
- Extensions FAQ
- See Category:Extensions——扩展列表
- Manual:$wgExtensionFunctions——用于在安装好 MediaWiki 核心之前延迟扩展安装(或执行其他回滚)。
- Extension:BoilerPlate——空的扩展模板
皮肤开发人员的帮助文档[edit | edit source]
- Manual:Skinning——MediaWiki 皮肤创建教程。
- Manual:Skin configuration——在维基中皮肤配置指南。
Help for library code reuse[edit | edit source]
- Manual:Developing libraries – a guide to packaging third-party libraries for use with MediaWiki
使用第三方维基站点[edit | edit source]
- Enterprise hub —— 企业式维基
- Academic hub —— 大学式维基
备注[edit | edit source]
- ↑ 开发人员由志愿者、Wikimedia基金会员工和合作伙伴组成。从 贡献列表 可以获得为MediaWiki代码作出贡献的人员名单。
- ↑ ,但MediaWiki不全都是PHP开发的。部分基础支持工具是用其他语言开发的,像 批处理文件 , shell脚本 , makefiles 和 Python.
- ↑ 当然,MediaWiki可以运行在所有支持PHP的平台上,但是需要注意,非LAMP平台,由于部分工具和操作系统特性不支持,可能会限制一些MediaWiki的功能,而且还会影响性能。
- ↑ MediaWiki支持 MySQL 和其他 DBMS,包括 Oracle, PostgreSQL 和 SQLite。
- ↑ Browse the source code and revisions at https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git or clone the development version of the code using this Git command:
git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git MediaWiki
- ↑ Visit http://news.gmane.org/gmane.org.wikimedia.mediawiki.bugs to see recent changes to bugs and issues in the Wikimedia Phabricator instance.