Extension:InlineComments

This page is a translated version of the page Extension:InlineComments and the translation is 31% complete.
MediaWiki 拡張機能マニュアル
InlineComments
リリースの状態: 安定
実装 ContentHandler
説明 Allows adding inline comments to pages
作者
最新バージョン 1.0
互換性の方針 長期間サポート リリースであるすべての MediaWiki リリースについて、拡張機能に対応するブランチが存在します。
MediaWiki >= 1.39.0
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
README
  • $wgInlineCommentsAutoDeleteComments
  • $wgInlineCommentsNamespaces
  • inlinecomments-add
  • inlinecomments-edit-all
  • inlinecomments-view
四半期ごとのダウンロード数 17 (Ranked 122nd)
translatewiki.net で翻訳を利用できる場合は、InlineComments 拡張機能の翻訳にご協力ください

The InlineComments extension adds the ability for viewers to add inline comments to a page, similar to inline comments in Confluence or annotations in tools like Google Docs.

使用法

To attach a comment to specific text, first highlight the text you want to attach the comment to. A "+" icon will then appear. If you click on it, or use the keyboard shortcut Ctrl+Alt+m, a comment entry form will appear on the side. Fill out the text area and hit "Save" to record your comment.

Once a comment is made, anyone can reply to it by hitting the "Reply" button and adding more text. A thread within InlineComments can grow to any length.

Comments can be edited by the author or the administrator by hitting the pencil icon on the right side of the comment.

You can also delete a thread (which can include one or more comments) by hitting the "Close discussion" button. This will delete all of that text from the InlineComments "slot" of the page. Since this deletion shows up in the page history, you can undo it any time, and restore the thread, simply by undoing that edit.

Users can be mentioned in the comments by using the "@" annotator.

If the Echo extension is installed:

  • Mentioning a user in an inline comment will trigger an echo notification to that user.
  • The comment thread creator will also get notified on any replies or the closure of the thread.

All inline comments are assigned with the "inlinecomments" tag, so that the changes can be easily filtered by tag in Special:RecentChanges and Special:Watchlist.

See also the screenshots below.

ダウンロード

You can download the InlineComments code, in .zip format, here.

You can also download the code directly via Git from the MediaWiki source code repository. From a command line, call the following:

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

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

view InlineComments code

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のInlineCommentsという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/InlineComments
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'InlineComments' );
    
  • Configure as required.
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

設定

The following settings can be added to LocalSettings.php:

$wgInlineCommentsAutoDeleteComments
Whether or not to automatically remove comments if the text they are commenting on gets deleted (default true)
$wgInlineCommentsNamespaces
The only namespaces for which InlineComments should be enabled. By default, it is set to $wgContentNamespaces. If set explicitly to an array of some namespaces, $wgContentNamespaces will not be included unless the user adds it in LocalSettings.php

InlineComments defines the following user rights:

inlinecomments-add
Whether you can add and delete comments on a page. By default this is given to all logged in users.
inlinecomments-view
Whether inline comments are shown to you. Please note, this controls the default interface but users may still be able to view existing comments by other means if the have 'read' rights on the wiki, such as through the history page or API.
inlinecomments-edit-all
Whether you can edit all inline comments on a page. By default this is given to sysop users.

スクリーンショット

Video demo

バージョン履歴

  • 0.1 - April 29, 2023 - Initial version
  • 0.2 - February 27, 2024 - Look-and-feel improvements, many bug fixes
  • 0.3 - April 11, 2024 - Renamed $wgInlineCommentsAutoResolveComments setting to $wgInlineCommentsAutoDeleteComments; renamed "Mark resolved" to "Close discussion"; added "inlinecomments-view" permission; added timestamp display on comment creation
  • 1.0 - August 21, 2024 - Added user mentions along with autocompletion; added edit functionality to comments; added $wgInlineCommentsNamespaces setting; overrode JSON diff with custom diff for comment edits; made the sidebar skin-neutral; added "inlinecomments" tag for all comment edits; fixed permission issues for view and edit rights of logged out users, blocked users and hidden users; added Echo notification for the comment initiator on reply and close action; added Echo notification for the mentioned user

関連項目