扩展:页面表单/下载与安装

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:Page Forms/Download and installation and the translation is 20% complete.
Outdated translations are marked like this.
Other languages:
English • ‎français • ‎italiano • ‎polski • ‎čeština • ‎中文 • ‎日本語

下载

您可以在[$url 这里]下载.zip格式的页面表单代码。

https://github.com/wikimedia/mediawiki-extensions-PageForms/archive/4.8.zip

您也可以直接从MediaWiki源代码库通过Git下载代码(参见可用标签)。 从命令行,您可以调用以下内容:

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

如果像在线查看代码以及文件历史,请参阅PageForms

Not recommended

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

Once you have downloaded the code as a directory called PageForms in your extensions folder, you just need to add the following line to your LocalSettings.php file:

wfLoadExtension( 'PageForms' );

为页面表单定义了四个手册:用户权限

  • '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

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.8"
  }
}

有关软件包的更多信息,请参阅https://packagist.org/packages/mediawiki/page-forms