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]

You can download the extension directly from the MediaWiki source code repository (browse code). You can get:

One of the extensions tags

Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag

  • Go to the tags list
  • Click the name of the tag you want to download
  • Click "snapshot"
The latest version of one of the extensions branches

Each extension has a master branch containing the latest code (might be unstable). Extensions can have further branches as well.

  • Go to the branches list
  • Click the branch name
  • Click "snapshot"
A snapshot made during the release of a MediaWiki version.

This might be unstable and is not guaranteed to work with the associated MediaWiki version.

After you've got the code, save it into the extensions/CreatePage directory of your wiki.

If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, 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]