Extension:PostComment

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
Postcomment
Release status: stable
Implementation Page action
Description Allows users to post comments directly to discussion pages.
Author(s) Travis Derouin (Tderouintalk)
Latest version 0.1 (2007-03-08)
MediaWiki 1.6+
Database changes No
License GPL v2+
Download Template:WikimediaDownload/svn
Translate the PostComment extension if it is available at translatewiki.net
Check usage and version matrix.

The PostComment extension allows users to post comments directly to discussion pages directly from a form at the bottom of each discussion page. This extension is by no means meant to be an extensive solution to discussion page problems (I'll leave that to LiquidThreads), it's just a simple extension that works for smaller wikis. So far we've had over 150,000 talk page messages posted with it and our community seems to like its simplicity.

Configuration & Installation[edit]

  • Get the source via SVN
  • Add
require_once ('extensions/Postcomment/Postcomment.php');

to LocalSettings.php

  • Find a place in your skin where you'd like the comment form to appear and place a call to wfPostcommentForm(). For example, in MonoBook.php you could change
            <!-- end content -->
            <div class="visualClear"></div>

to:

            <!-- end content -->
            <div class="visualClear"></div>
            <?php wfPostcommentForm(); ?>
  • Add the following CSS to your main.css stylesheet - feel free to modify:
#discussion_entry {
	border: 1px solid #CED1FF; 
	padding: 5px;  
	margin-bottom:5px
}

td.discussion_entry_date {
	font-size: smaller;
}

td.discussion_entry_user {
	font-weight: bold;
}

td.discussion_entry_comment {
}

Modifications[edit]

  • The comment form can appear on article pages. Simply remove these lines in Postcomments.php and it will work. However, all users' comments will also be inserted into where the form appears directly.
// just for talk pages
if (!$wgTitle->isTalkPage() || $action != '')
return;

Bugs and enhancements[edit]

Bugs or feature requests can be sent to the author at travis @ wikihow.com.