]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/comments.mdwn
first pass through comments documentation
[ikiwiki.git] / doc / plugins / comments.mdwn
1 [[!template id=plugin name=comments author="[[Simon_McVittie|smcv]]"]]
2 [[!tag type/useful]]
3
4 This plugin adds "blog-style" comments. Unlike the wiki-style freeform 
5 Discussion pages, these comments are posted by a simple form, cannot later
6 be edited, and rss/atom feeds are provided of each page's comments.
7
8 When using this plugin, you should also enable [[htmlscrubber]] and either
9 [[htmltidy]] or [[htmlbalance]]. Directives are filtered out by default, to
10 avoid commenters slowing down the wiki by causing time-consuming
11 processing. As long as the recommended plugins are enabled, comment
12 authorship should hopefully be unforgeable by CGI users.
13
14 The intention is that on a non-wiki site (like a blog) you can lock all
15 pages for admin-only access, then allow otherwise unprivileged (or perhaps
16 even anonymous) users to comment on posts. See the documentation of the
17 [[lockedit]] and [[anonok]] pages for details on locking down a wiki so
18 users can only post comments.
19
20 Individual comments are stored as internal-use pages named something like
21 `page/comment_1`, `page/comment_2`, etc. These pages internally use a
22 `\[[!_comment]]` [[ikiwiki/directive]], and comment pages can be matched
23 using a special `postcomment()` [[ikiwiki/PageSpec]].
24
25 There are some global options for the setup file:
26
27 * `comments_shown_pagespec`: pages where comments will be displayed inline,
28   e.g. `blog/*` or `!*/discussion`.
29 * `comments_open_pagespec`: pages where new comments can be posted, e.g.
30   `blog/* and created_after(close_old_comments)` or `!*/discussion`
31 * `comments_pagename`: if this is e.g. `comment_` (the default), then
32   comment pages will be named something like `page/comment_12`
33 * `comments_allowdirectives`: if true (default false), comments may
34   contain IkiWiki [[directives|ikiwiki/directive]]
35 * `comments_commit`: if true (default true), comments will be committed to
36   the version control system
37 * `comments_allowauthor`: if true (default false), anonymous commenters may
38   specify a name for themselves, and the \[[!meta author]] and
39   \[[!meta authorurl]] directives will not be overridden by the comments
40   plugin
41
42 Known issues:
43
44 * Needs code review
45 * The access control via postcomment() is rather strange (see [[discussion]] for more details)
46 * There is some common code cargo-culted from other plugins (notably inline and editpage) which
47   should probably be shared
48 * Joey doesn't think it should necessarily use internal pages (see [[discussion]])
49 * Previews always say "unknown IP address"
50 * Add `COMMENTOPENID`: the authenticated/verified user name, if and only if it was an OpenID
51 * The default template should have a (?) icon next to unauthenticated users (with the IP address
52   as title) and an OpenID icon next to OpenIDs