Extension:EditSubpages
![]() リリースの状態: 安定 |
|
---|---|
実装 | 利用者権限 |
説明 | Allows sysops to unlock pages for anonymous editing |
作者 | Ryan Schmidt and Prod |
最新バージョン | 3.5.0 |
MediaWiki | 1.25+ |
PHP | 5.3+ |
ライセンス | GNU 一般公衆利用許諾書 2.0 のみ |
ダウンロード | |
|
|
四半期ごとのダウンロード数 | 2 (Ranked 138th) |
translatewiki.net で翻訳を利用できる場合は、EditSubpages 拡張機能の翻訳にご協力ください | |
The EditSubpages extension restricts anonymous users from editing most pages. Sysops (or whatever group has the 'editinterface' permission) can add pages to "MediaWiki:Unlockedpages" to allow anonymous editing.
使用法
Add pages to be unlocked to MediaWiki:Unlockedpages in a bulleted list (they may be links). Any line that isn't part of a bulleted list is treated as a comment. Example:
* Unlocked page 1 # Comment. Note that declaring the namespace matters * Help:Unlocked page 2 * Talk:Unlocked page 3 This is a comment too :). Unlike page 1, which has both the subject and talk page unlocked, page 3 only has an unlocked talk page. * Unlocked page 4/subpage # this will only unlock subpages of this subpage, so page 4 itself # uneditable by anons.
This will allow anonymous users (or any user lacking the 'edit' permission) to edit that page and all subpages of it (e.g. Unlocked page 1, Unlocked page 1/Subpage, etc.), as well as their respective talk pages. If you declare a talk page, it will not make the respective subject page editable. To prevent talk pages from being edited but allow the subject pages to be, simply protect the talk page.
This will also allow the anonymous users to create new pages that are sub-pages of the unlocked page.
Extended syntax
The extended syntax (also known as flags), allows you to control exactly how each unlocked page works.
The way of utilizing this is as follows:
* Unlocked page|flags|alternate text (optional, useful if you are using links) # ex: * [[Somepage/sub/subpage|+b-t|unlocks base pages but does not unlock talk pages]] * HELLO|+in-c # The above unlocks HELLO, Hello, Help:Hello, User:HEllO, etc. # but does not allow creation of new pages
フラグ | 説明 | フラグ | 説明 |
---|---|---|---|
+s* | Unlocks subpages of the page | -s | Does not unlock subpages of the page |
+b | Unlocks basepages of the page | -b* | Does not unlock basepages of the page |
+u | Apply these restrictions to both users and anons | -u* | Only apply these restrictions to anons |
+c* | Allow creation of new pages | -c | Do not allow creation of new pages |
+t* | Unlock the talk page as well | -t | Do not unlock the talk page as well |
+e* | Allow editing of unlocked pages | -e | do not allow editing of unlocked pages |
+i | Case insensitive | -i* | case sensitive |
+n | Namespace inspecific | -n* | Namespace specific |
+r | Treated as a regex fragment | -r* | Treated as a string |
+w | Allow wildcards * and ? | -w* | Does not allow wildcards |
+w does not work with +r set. * means "0 or more characters", ? means "0 or 1 characters" Character classes are denoted with square brackets, such as [ae] to match a or e Negate a character class with !, e.g. [!ae] to match everything except a or e Literal *, ?, [, and ] must be escaped with \ (like \* and \?. \\ produces a literal backslash) |
Caveats
- This extension goes down the list in order and stops when it reaches the first match. As such, it is impossible to have multiple conditions for a single page/group of pages.
- The +r flag has an implicit ^ and $ before and after the fragment, respectively. This means if you want it only to match part of a title, you will need to use ".*title.*" and not just "title." (Former parses to /^.*title.*$/, latter to /^title$/)
- The extension's require_once either needs to be after you configure $wgGroupPermissions on your LocalSettings.php file, or you need to make sure that '*' is allowed to 'edit', 'createpage', and 'createtalk', or the extension will not work as expected.
- The +u flag applies to all logged-in users, no matter what groups they are in (aka sysops are not exempt). As such, it is possible to lock yourself out of the list of unlocked pages until you disable the extension.
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のEditSubpages
という名前のディレクトリ内に配置します。
開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/EditSubpages - 以下のコードを LocalSettings.php ファイルの末尾に追加します:
wfLoadExtension( 'EditSubpages' );
- Configure at your convenience
- 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
設定
As of version 3.1, it is possible to modify what the default flags are via $wgEditSubpagesDefaultFlags.
This can either be a string in the format +blah-blah, like MediaWiki:Unlockedpages, or in an array format where flags are the keys and the value is true
if it should be set by default, and false
if it should be unset by default.
更新履歴
Version | |
---|---|
3.5 | Convert to use extension registration. Now requires MediaWiki 1.29+ |
3.4 | Fix fatal error in certain page/flag combinations. Expand functionality of the wildcard flag (+w) to include character classes and negated character classes. |
3.3 | Move to new JSON i18n format. Now requires PHP 5.3+. |
3.2 | Fix EditSubpages so that it actually successfully unlocks pages. |
3.1 | Made flags parsing more flexible, so you can have stuff like "-blah" or "+a+s+d+f", fixed error when trying to view special pages on certain versions of MediaWiki. Added $wgEditSubpagesDefaultFlags variable. |
3.0 | Added flags feature for finer control over the behavior of unlocked pages. |
2.2 | Fixed bug that did not allow anonymous users to save unlocked pages. |
2.1 | Fixed author field in the extension credits. |
2.0 | Switched to using userCan hook. Fixed namespace issue. Fixed incompatibility with Extension:ConfirmAccount . Now works for versions of MediaWiki 1.6.0+. This will probably be the final release of this extension unless more major bugs are discovered. |
1.2.2 | Fixed major bug that did not unlock Talk pages when they were explicitly declared. If you have any earlier version, please upgrade to this version for correct functionality! |
1.2.1 | Fixed major bug that prevented any pages from being unlocked. If you have version 1.2, upgrade to this version! |
1.2 | Used strpos instead of regex for faster processing and less memory usage. Bugfixes. Moved into Subversion |
1.1 | Added ability to use comments and talk pages are now unlocked as well. |
1.0 | Initial creation |
この拡張機能は以下のウィキ ファーム/ウィキ ホスト/パッケージに含まれています: これは正式な一覧ではありません。 一部のウィキ ファーム/ウィキ ホスト/パッケージは、ここに記載されていなくてもこの拡張機能を含んでいる場合があります。 必ずご利用のウィキ ファーム、ウィキ ホスト、バンドルで確認してください。 |