Jump to content

User:Kan~metawiki/UserComments

From Meta, a Wikimedia project coordination wiki
 
A proposal to move this page to MediaWiki.org was rejected.

Intro

[edit]
Screenshot of User Comments in action

The main purpose of this extension is that users can write some comments about the subject of a page, for posting tips or annotations.
Well, I usually read the online manual of PHP, and sometimes it's more important the information you've found in a comment that the explanation of a function. So I think you could improve your wiki with this feature!

How the extension works

[edit]

The extension is registered for the <userComments/> tag, allowing you could post a comment and showing all validated comments for the page. When you decide to post one, it will redirect to the special page Special:WriteUserComment.
Also, this extension provides a special page for validating and managing user comments: Special:AdminUserComment. You have to log in before you access it.
You can see in action this extension in a [Spanish Wiki of LDAP].

How to use the extension

[edit]

To enable the extension and the special pages Special:WriteUserComment and Special:AdminUserComment, untar the file usercomments-1.0.tar in the root directory of your MediaWiki installation. After that, you may register the extension by adding

require_once("extensions/UserComments.php");

to your LocalSettings.php file.
Inside the UserComments.php file, you can configure the output language of this extension, between Spanish and English. You only have to edit it and comment/uncomment your option.
Also, you have to prepare your DB for this extension. You could execute the following SQL if you've installed a MySQL:

 CREATE TABLE `usercomments` (
  `Id` int(11) NOT NULL auto_increment,
  `IdPage` int(10) unsigned NOT NULL default '0',
  `Email` varchar(255) NOT NULL default '',
  `Text` blob NOT NULL,
  `Validated` tinyint(1) NOT NULL default '0',
  `Time` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`Id`)
 )

ChangeLog

[edit]

1.0

  • Launched first version

To Do

[edit]

If you want to suggest new features to this extensions, feel free to edit this section and write your comment ;)