Manual:Code/zh

本页面描述了MediaWiki源代码中的关键文件与目录. 有关更多详细信息，请参见由MediaWiki源代码使用doxygen自动生成的类、文件和综合参考资料.

访问节点

 * 参见Special:Version

您可以通过运行该段代码生成此列表： git grep -l /includes/WebStart.php.

这些是使用wiki时，浏览器可以遇到的文件. 所有这些文件都位于wiki根目录，每个文件都搭配 包装，对于网络服务器而言，它需要 扩展来通过PHP5引擎执行脚本.

==

用于文件缓存的默认目录，如果启用（通过设置 ——默认值为. ）. 该位置可使用$wgFileCacheDirectory来自定义.

包含各种文本文件，它们应当帮助您了解MediaWiki代码中最重要的部分.

Mediawiki扩展与核心代码分别放置. 安装扩展需要复制相关文件至该目录，并按照扩展自己的安装指导启用它（通常需编辑LocalSettings.php文件）. 在当前版本中，有一组扩展与全新MediaWiki安装文件一起分布.

该目录存储MediaWiki需要的常见包含文件.

此目录包含操作类，它们处理可在页面上执行的不同操作（例如查看、删除、编辑等）. 所有这些类都是 、 或 类的延伸. 其中有一些都是小操作，这些操作调用 或 类中的方法来进行实际工作.

This directory contains the code for the MediaWiki API. See API:Main page. The most important files are:

This directory contains files with code relating to MediaWiki's caching mechanisms.

This directory contains a few classes related to (request) contexts. As of MediaWiki 1.18 the context of a request is encapsulated inside a  instance which implements. A context is a way of grouping the parts of a request together. This reduces the need for globals. See for more information.

This directory contains the code for database support.  provides MediaWiki's database abstraction layer.

This directory contains the standard MediaWiki difference engine. A difference engine computes the difference between two texts. Whether this difference engine is used or some external diff tool, depends on the $wgExternalDiffEngine setting.

Files related to the job queue. Each job class for a specific type of job derives from the  class and has to implement a   method which does the actual job.

Some files related to logging the events which happen on a Wiki. This directory was introduced in MW 1.19. Some of the files were already present in olders versions, in the includes/ directory.

This directory contains files for handling several media formats, mostly images.

This directory contains some Unicode normalization routines. See for more information.

Files related to MediaWiki's caching mechanisms. The files in this directory provide the possibility to store objects in PHP accelerators, in memcached, in a database or in DBA files.

The MediaWiki parser, which transforms wikitext to HTML, can be found here together with related files. The most interesting files in this directory:

Files related to ResourceLoader, a JavaScript/CSS delivery optimizing system for MediaWiki.

This directory contains the code to implement the possibility of searching a wiki using one the possible backends.

This directory contains the code and classes for the standard special pages. All special page classes derive from class  (defined in |includes/SpecialPage.php]). Special pages which come with extension are located in their respective extensions directories. See also Manual:Special pages.

Files providing the backend of MediaWiki's file upload feature.

/languages/目录
该目录下包含有用于国际化的文件.

Language.php

 * SVN上的文件

包含有Language类，它负责处理杂项文本所使用的语言，并包含有部分文字编码功能以及其他与本地化有关的功能. 有两个全局变量包含有该类的实例：用于站点语言的$wgContLang变量与用于用户语言的$wgLang变量.

/maintenance/目录
该目录包含有必须通过命令行界面运行的维护脚本.

参见Manual:Maintenance scripts以获取这些脚本的概况.

/skins/目录
该目录包含了所有用于展示外观的skin类JavaScript,CSS以及部分用于skin类的图像

参见

 * How to become a MediaWiki hacker
 * Manual:Coding conventions
 * Manual:Global object variables