Extension:Page Forms/Download and installation

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
English • ‎français • ‎中文 • ‎日本語
Page Forms - navigation (view )
Basics Main page (talk) · Download and installation · Quick start guide · Hosting · Special pages
Using Page Forms PF and templates · Defining forms   (Input types ) · The "Edit with form" tab · Linking to forms · Creating query forms
Resources for help Common problems · Known bugs and planned features · Getting support · Developers' documentation · Testing
About Page Forms Authors and credits · Version history · Sites that use Page Forms · Related extensions

Download[edit]

You can download the Page Forms code, in .zip format, here.

You can also download the code directly via Git from the MediaWiki source code repository (see available tags). From a command line, you can call the following:

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

To view the code online, including version history for each file, go here.

Not recommended[edit]

There are some additional ways to download Page Forms, which are not recommended:

  • Page Forms can be downloaded via the MediaWiki Extension Distributor, which lets you download any extension for any version of MediaWiki. This not recommended because the code being downloaded represents a random snapshot in time, that could contain bugs that were fixed later - or, if the "development/trunk" version is used, it could conversely contain code that is too new, and hasn't been fully tested yet.
  • Page Forms is available via some Linux distributions, like Debian. These should probably not be used, since their version of the software tends to be significantly out of date.

Installation[edit]

  • Note: For versions 1.26 and lower of MediaWiki, it is highly recommended to use the 2nd option, of calling "require_once", rather than calling wfLoadExtension().


  • Download and place the file(s) in a directory called PageForms in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'PageForms' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'PageForms' );, you need to use:

require_once "$IP/extensions/PageForms/PageForms.php";

There are four user rights defined for Page Forms: 'createclass', 'editrestrictedfields', and 'viewedittab':

  • 'createclass' is the permission to create new classes (see Extension:Page Forms/Special pages). By default it is given to all members of the 'user' group.
  • 'editrestrictedfields' is the "permission" to edit restricted fields. By default it is given to all members of the 'sysop' group.
  • 'multipageedit' is the "permission" to use the MultiPageEdit Special Page, which allows to edit multiple pages through a single spreadsheet-like interface. By default it is given to all members of the 'user' group.
  • 'viewedittab' is the "permission" to see the "edit with form" tab. By default it is given to everyone (i.e, '*').

You can modify the set of users who have any of these permissions. For example, to have the "edit with form" tab show up only for administrators, you could add the following, below the inclusion of Page Forms:

$wgGroupPermissions['*']['viewedittab'] = false;
$wgGroupPermissions['sysop']['viewedittab'] = true;

Composer[edit]

Page Forms can also be downloaded and installed using Composer. However, this is not a well-supported feature at the moment.

To install with Composer, add the following to your composer.local.json file:

{
  "require": {
    "mediawiki/page-forms": "^4.4.2"
  }
}

More information about the package can be found on Packagist: https://packagist.org/packages/mediawiki/page-forms