Extension:Create Page

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
Create Page

Release status: beta

Implementation Parser function, User interface
Description Allows placing an input that takes the name of a new page into pages.
Author(s) Jeroen De Dauw
Latest version 0.2 (2013-07-07)
MediaWiki 1.18.0 or higher
PHP 5.3 or above
Database changes No
License GNU General Public License 3.0 or later
Download See below
readme
release notes

Translate the Create Page extension if it is available at translatewiki.net

Check usage and version matrix; code metrics
Bugs: list open list all report

Requirements[edit | edit source]

Create Page requires:

Download[edit | edit source]

The extension can be retrieved directly from Git [?]:

  • Browse code
  • Some extensions have tags for stable releases.
  • Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).

Extract the snapshot and place it in the extensions/CreatePage/ directory of your MediaWiki installation.

If you are familiar with git and have shell access to your server, you can also obtain the extension as follows:

cd extensions/
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CreatePage.git

Installation[edit | edit source]

Once you have downloaded the code, place the CreatePage directory within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file:

# Create Page
require_once( "$IP/extensions/CreatePage/CreatePage.php" );

Usage[edit | edit source]

The input is placed using the #createpage parser function. It accepts 3 optional arguments. Namespace, default page name and submission button text, in that order.

Most simple usage, which will send the user to ?title=enteredPageName&action=edit&redlink=1, ie create enteredPageName if it does not exist yet.

{{#createpage}}

Create a page in the Course namespace.

{{#createpage|Course}}

A regularly behaving input, but with "Your page name" entered as default value.

{{#createpage||Your page name}}

Altering the text of the submission button.

{{#createpage|||Create this page!}}

Specifying default content for the page to be created.

{{#createpage||||Add some content here}}

Display the input on the same line as some text.

<p style="display:inline">Enter the name for a new course:</p> {{#createpage:Course||Create course}}

Version[edit | edit source]

This is a copy of the release notes file on SVN, which might be more up to date then this page.

Version 0.1[edit | edit source]

(2012-2-4)

Initial release.

Internationalization[edit | edit source]

Create Page is fully internationalized. Translation of Create Page messages is done through translatewiki.net. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on translatewiki.net, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.

Authors[edit | edit source]

Create Page has been written by Jeroen De Dauw as Wikimedia Foundation contractor for the Wikipedia Education Program.

Screenshots[edit | edit source]

External links[edit | edit source]

See also[edit | edit source]