Extension:InlineComments

From mediawiki.org
MediaWiki extensions manual
InlineComments
Release status: stable
Implementation ContentHandler
Description Allows adding inline comments to pages
Author(s) WikiTeq, Brian Wolff, Yaron Koren
Latest version 0.3
Compatibility policy For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.
MediaWiki >= 1.39.0
License GNU General Public License 2.0 or later
Download
README
  • $wgInlineCommentsAutoDeleteComments
  • inlinecomments-add
  • inlinecomments-view
Quarterly downloads 12 (Ranked 133rd)
Translate the InlineComments extension if it is available at translatewiki.net

The InlineComments extension adds the ability for viewers to add inline comments to a page, in a manner similar to the annotations within software such as Google Docs.

Usage[edit]

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.

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.

See also the screenshots below.

Download[edit]

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

Installation[edit]

  • Download and move the extracted InlineComments folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/InlineComments
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'InlineComments' );
    
  • Configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration[edit]

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)

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.

Screenshots[edit]

Video demo[edit]

Version history[edit]

  • 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