Manual:Code
Contents |
This page describes key files and directories in the MediaWiki source code. For more detailed information, see the class, file and comprehensive references auto-generated from the MediaWiki source code using doxygen.
[edit] Access points
File | Description |
---|---|
index.php | Main access point for the MediaWiki software. It handles most requests made to MediaWiki. For more information, read Manual:Index.php. |
api.php | External access point for MediaWiki's API. For more information, read Manual:Api.php. |
load.php | Script for the front-end to hook into for loading ResourceLoader modules For more information, read Manual:Load.php. |
img_auth.php | Script that only serves images to logged in users. To configure the wiki to use that script, see Manual:Image Authorisation. For more information, read Manual:Img_auth.php. |
opensearch_desc.php | Returns an OpenSearch description document that describes the web interface of MediaWiki's search engine. For more information, read Manual:Opensearch_desc.php. |
profileinfo.php | Allow users to see the profiling information that are stored in the database. See How to debug#Profiling. For more information, read Manual:Profileinfo.php. |
redirect.php | Script that redirects to the article passed in the wpDropdown parameter of the request. Needed for Nostalgia skin. For more information, read Manual:Redirect.php. |
thumb.php | Script used to resize images. For more information, read Manual:Thumb.php. |
trackback.php | Adds trackbacks to the database. For more information, read Manual:Trackback.php. |
[edit] Directory /includes/
This directory stores common include files needed by MediaWiki.
File | Description |
---|---|
includes/Article.php | Contains the Article class, which represents an article in the wiki and provides methods to view, modify and manage articles. For more information, read Manual:Article.php. |
includes/Edit.php | Provides much of the code related to the editing user interface For more information, read Manual:Edit.php. |
includes/GlobalFunctions.php | Contains globally used functions like wfMsgExt For more information, read Manual:GlobalFunctions.php. |
includes/LinkCache.php | For more information, read Manual:LinkCache.php. |
includes/Linker.php | Contains methods to create internal, external or image links and implements page existence detection. For more information, read Manual:Linker.php. |
includes/OutputPage.php | Hold HTML and wikitext parsing. Will also generate the <head> element or part of it. For more information, read Manual:OutputPage.php. |
includes/Pager.php | Contains the IndexPager class used for paging results of MySQL queries. For more information, read Manual:Pager.php. |
includes/Parser.php | Contains most of the code that converts wikitext to HTML (though few bits and pieces are in Manual:Skin.php.) For more information, read Manual:Parser.php. |
includes/Setup.php | Include commonly used files and initializes the global object variables so that MediaWiki can work. For more information, read Manual:Setup.php. |
includes/Skin.php | Encapsulates a "look and feel" for the wiki. For more information, read Manual:Skin.php. |
includes/Title.php | Represents the title of an article, and does all the work of translating among various forms such as plain text, URL, database key, etc. For convenience, and for historical reasons, it also represents a few features of articles that don't involve their text, such as access rights. For more information, read Manual:Title.php. |
includes/User.php | Encapsulates the state of the user viewing/using the site. Can be queried for things like the user's settings, name, etc. Handles the details of getting and saving to the user table of the database, and dealing with sessions and cookies. For more information, read Manual:User.php. |
includes/UserMailer.php | Collection of static functions for sending mail. For more information, read Manual:UserMailer.php. |
includes/WebRequest.php | This file contains the definition of the WebRequest class. For more information, read Manual:WebRequest.php. |
includes/WebStart.php | It does the initial setup for a web request: security checks, loads LocalSettings.php and Setup.php. For more information, read Manual:WebStart.php. |
includes/Wiki.php | This file consists of the definition of the class MediaWiki. For more information, read Manual:Wiki.php. |
[edit] Directory /includes/db/
This directory contains the code for database support. Database.php provides MediaWiki's database abstraction layer.
[edit] Directory /languages/
This directory contains files used for localization and internationalization.
File | Description |
---|---|
languages/Language.php | Contains the Language class, it represents the language used for incidental text, and also has some character encoding functions and other locale stuff. Two globals contain an instance of this class: $wgContLang for the site language and $wgLang for the user language. For more information, read Manual:Language.php. |
[edit] Directory /maintenance/
This directory contains maintenance scripts that must be run from a command line interface.
See Manual:Maintenance scripts for an overview of those scripts.
[edit] Directory /resources/
[edit] Directory /skins/
This directory contain all skins classes, JavaScripts, CSS and some images used by that skins.
Code for most special pages is in files named Special*.php in the /includes/specials/ directory.
Language: | English • Français • Bahasa Indonesia • 日本語 • Português do Brasil • Русский • 中文(简体) |
---|