Extension:CommentStreams

Introduction
CommentStreams is a commenting system for wikis. Users can post comments below the content on a wiki page. The comments are displayed with the user's username, linked to their user page if it exists, the creation and last modification dates of the comment, and an optional user avatar. Comments can be edited and deleted only by the comment author. Comments are added in streams which include a title and a head comment that can be replied to by other comments.

CommentStreams does not depend upon any other extensions, but it provides several additional features if Echo and/or Semantic MediaWiki are installed.

If Echo is installed, web and email notifications are sent to users who have enabled them when comments are added on pages the user is watching or replies are posted to comments authored by the user. If Echo is installed, the minimum MediaWiki version required is 1.27.

If Semantic MediaWiki is installed, optional, user-configurable properties to set an avatar and display name for a user as well as special properties that can be queried on each comment to provide the comment title, a link to the page to which the comment refers, and a link to the head comment if the comment is a reply.

CommentStreams stores comments on pages in the CommentStreams namespace. These pages are given a randomly-generated string of characters as the name. Users cannot edit or delete these pages directly. A database table stores the comment title and ids of the page to which the comment refers and the page containing the head comment if the comment is a reply.

Semantic MediaWiki support
If Semantic MediaWiki is installed, CommentStreams defines the following properties on each comment page, which can be used to query for comments:

CommentStreams namespace
You can use the MediaWiki search box to search for comments. In the search result page, the page that the comment appears on, rather than the comment page in the CommentStreams namespace, appears in the search results. While it is possible to visit comment pages directly in the CommentStreams namespace, for example if they are listed in Special:RecentChanges, this is not encouraged. Editing, deleting, and moving comment pages by visiting them in the CommentStreams namespace is disabled. Instead editing and deleting comments is done from the content page on which the comment appears.

Disabling comments on a page
CommentStreams also offers a tag function,, which disables CommentStreams on a page even if it is in a namespace in which comments are enabled.

Initially collapsed CommentStreams
CommentStreams also offers a tag function,, which makes comments appear initially in a collapsed state (only the comment header with the comment title, author, dates, and buttons showing) on a page. This tag function has no effect if comments are disabled on the page.

Echo support
For a user to receive Echo notifications by web or email, the Echo extension must be installed and echo notifications must be enabled for that user. To enable CommentStreams Echo notifications by default for all users on a wiki, the following configuration should be used:

Users may edit their notification settings by visiting the page.

Notifications will be sent to a user when another user posts a new comment or a reply on a page the first user is watching. Notifications will also be sent to a user when another user posts a reply to a comment the first user is watching. A user can watch a comment by clicking on the star on the comments title bar. Clicking on the star again will remove the comment from the user's comment watchlist. When a users posts a new comment, it will automatically be added to the user's comment watchlist.

If it is taking a long time to create or reply to a comment with Echo enabled, you can have the Echo event creations done on the job queue (see Extension:Echo), by setting the following:

Comment moderation
A group (csmoderators) and two new rights (cs-moderator-edit and cs-moderator-delete) exist to support comment moderation. By default, members of csmoderators have the csdelete right (they may delete any comment) but they do not have the cs-moderator-edit right (they may not edit any comment). Those rights may be assigned to other groups or changed. In addition, the  configuration variable makes it easy for moderators to quickly delete entire comment threads. For example:

As an aid in comment moderation, the special page  lists all comments in reverse chronological order of when they were last edited.

Avatar
If the Social Profile extension is installed, avatars set for users will be displayed beside the comments and replies they author. If the Social Profile extension is not installed but the Semantic MediaWiki extension is installed, the  configuration variable can be used to specify avatars.

Version History

 * Version 3.9
 * Bug fixes: deletion of comments with replies and missing notifications on watched comments


 * Version 3.8
 * Get avatar from SocialProfile extension if it is installed
 * Reworked user interface
 * Added comment watchlist and reworked notifications


 * Version 3.7
 * Added
 * Added  type to   and adding logging of comment page creations, deletions and edits to
 * Suppressed comment page creations, deletions, and edits from
 * Fixed missing subtitle on comment pages


 * Version 3.6
 * Added permalinks
 * Fixed bug prevention comment deletion
 * Added Semantic MediaWiki properties for vote counts
 * Added error messages for disallowed actions on comment pages


 * Version 3.5
 * added comment voting
 * requires a database update if voting is enabled
 * fixed several bugs:
 * handling of the delete button in certain pathological cases
 * print out an error message if the user has been logged out (either a timeout or logout from a different window)


 * Version 3.4
 * Added comment moderation


 * Version 3.3
 * Fixed database update bug


 * Version 3.2
 * Fixed reply bug


 * Version 3.1
 * Fixed Semantic MediaWiki dependency bug


 * Version 3.0
 * Echo supported added
 * Echo extension must be installed to enable Echo notifications; if Echo is not installed, CommentStreams continues to function without notifications
 * if Echo is installed, minimum required MediaWiki version is 1.27
 * if Echo is not installed, minimum required MediaWiki version is 1.25
 * use OOjs UI for dialogs


 * Version 2.1
 * added delete "are you sure?" dialog box
 * use jquery.ui.dialog for dialogs
 * set text field focus when editing and creating comments


 * Version 2.0
 * refactored
 * simplified configuration
 * localized strings
 * made comments and comment titles searchable
 * added comment modification date
 * added optional user avatar
 * made EditOwn unnecessary
 * fixed JavaScript deprecation warning
 * fixed SQL file path bug
 * added
 * protected comment pages from being directly edited or deleted


 * Version 1.0
 * initial version

Known issues

 * If CommentStreams is used on a page which uses HeaderTabs, and a comment is posted which transcludes another page using HeaderTabs, the JavaScript on the page breaks.
 * Workaround: Don't transclude pages with HeaderTabs onto pages with HeaderTabs.