Extension:Comments

Comments extension adds the &lt;comments&gt; parser hook tag to allow commenting on articles where the tag is present.

Majority of the code fixes were done by Misza and Jack Phoenix.

Dependencies

 * New database tables: Comments, Comments_block and Comments_Vote &mdash; these tables currently cannot be created by running update.php, the official MediaWiki updater script, but instead you have to create them manually!

Installation

 * 1) Dump the files into $IP/extensions/Comments
 * 2) Create the three required database tables (see comments.sql for the schemas)
 * 3) Add require_once("$IP/extensions/Comments/Comment.php"); into the wiki's LocalSettings.php
 * 4) Installation can now be verified through the wiki's Special:Version

Comments of the Day
The extension also comes with a "Comments of the Day" feature (&lt;commentsoftheday /&gt;), which by default is not enabled. You can enable this feature in the wiki's LocalSettings.php, by adding the following after the require_once line:

If the nocache argument is passed to the parser hook (like this: &lt;commentsoftheday nocache=true /&gt;), the parser hook will not use memcached and will just fetch the data from the database instead of cache. This is useful if you want to show the most up-to-date data, but it can be very server-intensive.

User rights
This extension adds two new user rights, comment (which allows posting comments) and commentadmin</tt> (which allows deleting user-posted comments). By default, everyone, even anonymous users, can post comments, but only users in the commentadmin</tt> group can delete them.

User points

 * $wgUserStatsPointValues['comment_plus']</tt> &mdash; amount of points to give out when another user gives "thumbs up" to your comment.
 * $wgUserStatsPointValues['comment_ignored']</tt> &mdash; amount of points to give out when another user adds your comments to their ignore list (Special:CommentIgnoreList).

Parameters

 * $wgCommentsLog</tt> &mdash; whether to log comment actions to Special:Log/comments or not. Defaults to false</tt>.
 * $wgCommentsDirectory</tt> &mdash; path to the Comments extension files. Defaults to $wgScriptPath/extensions/Comments</tt>.
 * $wgCommentsDefaultAvatar</tt> &mdash; path to an image which will be displayed instead of an avatar if social tools (SocialProfile extension) aren't installed. Should be 50x50px.

Hooks
Comments extension adds two hooks, Comment::add and Comment::delete.

TODO list

 * 1) HTML output is not valid XHTML - would be nice if it were but we can live without that

Version history

 * 2.3 &mdash; bug fixed, first version that no longer requires SocialProfile
 * 2.2 &mdash; code cleanup
 * 2.1 &mdash; JS rewritten not to require YUI; $wgCommentsDefaultAvatar variable introduced
 * 2.0 &mdash; more cleanup, pretty much self-contained now
 * 1.1 &mdash; first working version by Misza
 * 1.0 &mdash; initial cleaned-up version of extensions/wikia/Comments/ by Jack Phoenix