2008-12-12 20:52:05 +01:00
|
|
|
[[!template id=plugin name=comments author="[[Simon_McVittie|smcv]]"]]
|
2012-03-26 17:03:35 +02:00
|
|
|
[[!tag type/web type/comments]]
|
2008-12-12 20:52:05 +01:00
|
|
|
|
|
|
|
This plugin adds "blog-style" comments. Unlike the wiki-style freeform
|
|
|
|
Discussion pages, these comments are posted by a simple form, cannot later
|
|
|
|
be edited, and rss/atom feeds are provided of each page's comments.
|
|
|
|
|
|
|
|
When using this plugin, you should also enable [[htmlscrubber]] and either
|
|
|
|
[[htmltidy]] or [[htmlbalance]]. Directives are filtered out by default, to
|
|
|
|
avoid commenters slowing down the wiki by causing time-consuming
|
|
|
|
processing. As long as the recommended plugins are enabled, comment
|
|
|
|
authorship should hopefully be unforgeable by CGI users.
|
|
|
|
|
|
|
|
The intention is that on a non-wiki site (like a blog) you can lock all
|
|
|
|
pages for admin-only access, then allow otherwise unprivileged (or perhaps
|
|
|
|
even anonymous) users to comment on posts. See the documentation of the
|
2010-02-06 22:19:17 +01:00
|
|
|
[[opendiscussion]], [[lockedit]] and [[anonok]] pages for details on locking
|
|
|
|
down a wiki so readers can only post comments.
|
2008-12-12 20:52:05 +01:00
|
|
|
|
|
|
|
Individual comments are stored as internal-use pages named something like
|
|
|
|
`page/comment_1`, `page/comment_2`, etc. These pages internally use a
|
2009-06-02 23:06:46 +02:00
|
|
|
[[comment_directive|ikiwiki/directive/comment]].
|
2008-12-12 20:52:05 +01:00
|
|
|
|
|
|
|
There are some global options for the setup file:
|
|
|
|
|
2008-12-18 00:50:04 +01:00
|
|
|
* `comments_pagespec`: [[ikiwiki/PageSpec]] of pages where comments are
|
|
|
|
allowed. The default is not to allow comments on any pages. To allow
|
2008-12-21 22:50:50 +01:00
|
|
|
comments to all posts to a blog, you could use
|
|
|
|
`blog/posts/* and !*/Discussion`.
|
2008-12-18 00:50:04 +01:00
|
|
|
* `comments_closed_pagespec`: [[ikiwiki/PageSpec]] of pages where
|
|
|
|
posting of new comments is closed, but any existing comments will still
|
|
|
|
be displayed. Often you will list a set of individual pages here.
|
|
|
|
For example: `blog/controversial or blog/flamewar`
|
2008-12-12 20:52:05 +01:00
|
|
|
* `comments_pagename`: if this is e.g. `comment_` (the default), then
|
|
|
|
comment pages will be named something like `page/comment_12`
|
|
|
|
* `comments_allowdirectives`: if true (default false), comments may
|
|
|
|
contain IkiWiki [[directives|ikiwiki/directive]]
|
|
|
|
* `comments_commit`: if true (default true), comments will be committed to
|
|
|
|
the version control system
|
|
|
|
* `comments_allowauthor`: if true (default false), anonymous commenters may
|
|
|
|
specify a name for themselves, and the \[[!meta author]] and
|
|
|
|
\[[!meta authorurl]] directives will not be overridden by the comments
|
|
|
|
plugin
|
2009-01-25 21:42:13 +01:00
|
|
|
|
|
|
|
## comment moderation
|
|
|
|
|
|
|
|
If you enable the [[blogspam]] plugin, comments that appear spammy will be
|
2009-10-26 18:24:27 +01:00
|
|
|
held for moderation. (Or with the [[moderatedcomments]] plugin, all
|
|
|
|
comments will be held.) Wiki admins can access the comment moderation queue
|
2009-01-26 01:04:45 +01:00
|
|
|
via a button on their Preferences page.
|
|
|
|
|
2010-07-14 20:32:16 +02:00
|
|
|
Comments pending moderation are not checked into revision control.
|
2010-07-14 16:23:18 +02:00
|
|
|
To find unmoderated comments, `find /your/ikiwiki/srcdir -name '*._comment_pending'`
|
2010-07-14 20:32:16 +02:00
|
|
|
To manually moderate a comment, just rename the file, removing the
|
|
|
|
"_pending" from the end, and check it into revision control.
|