Extension:UserAgreement

This page is a translated version of the page Extension:UserAgreement and the translation is 71% complete.
Other languages:
MediaWiki 拡張機能マニュアル
OOjs UI icon advanced-invert.svg
UserAgreement
リリースの状態: 安定
実装 ユーザー インターフェイス, API , データベース
説明 Render a user agreement before granting access to a Wiki.
作者
最新バージョン 1.0.1
互換性ポリシー master は後方互換性を維持しています。
MediaWiki >= 1.35.3
PHP 5.5+
データベースの変更 はい
ライセンス MIT ライセンス
ダウンロード
Mediawiki
translatewiki.net で翻訳を利用できる場合は、UserAgreement 拡張機能の翻訳にご協力ください

使用状況とバージョン マトリクスを確認してください。

問題点 未解決のタスク · バグを報告

はじめに

UserAgreement adds the ability for administrators to specify a user agreement message and have it rendered to users for acknowledgement before granting access to a wiki's contents. This only applies to users who are logged in.

Users who have not yet acknowledged the current version of the user agreement will be presented with the agreement upon visiting any wiki page and will be unable to view any wiki content until they've acknowledged the user agreement. Users need only acknowledge the current version of the user agreement once to gain access to a wiki's content.

UserAgreement does not depend upon any other extension.

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のUserAgreementという名前のディレクトリ内に配置します。
  • 以下のコードを LocalSettings.php の末尾に追加します:
    wfLoadExtension( 'UserAgreement' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

使用法

To specify a user agreement message for users to acknowledge, simply edit the page Mediawiki:Useragreement (watch your capitalization) to contain exactly the message you would like presented to users in wikitext format. Each time the Mediawiki:Useragreement page is updated, all users will be required to acknowledge the updated user agreement before being able to continue accessing the wiki's content.

By default, the user agreement message is left blank and thus, no message is presented to users and they are not required to acknowledge anything before viewing a wiki's content.

Implementation Details

UserAgreement adds a new database table called useragreement with columns ua_user and ua_user_accepted_timestamp. This table is used to record the timestamps corresponding to the last time each user acknowledged some version of the user agreement.

The logic governing user agreement display is simple. If a user's ua_user_accepted_timestamp value is greater than the revision timestamp of the Mediawiki:Useragreement page's current revision (meaning the user accepted some version of the user agreement after the current version of the agreement was last edited), then that user is not required to view and acknowledge the current version of the user agreement before accessing the wiki's content. Otherwise, the user will be presented with the current version of the user agreement upon visiting any wiki page and will not be granted access to any of the wiki's content until they have acknowledged the current version of the user agreement, which will then update the ua_user_accepted_timestamp column for that user.

バージョン履歴

Version 1.0.1
  • Added documentation url link on Special:Version page.
Version 1.0.0
  • Initial version