]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/plugins/contrib/comments.mdwn
Merge commit 'upstream/master' into pub/master
[git.ikiwiki.info.git] / doc / plugins / contrib / comments.mdwn
1 [[!template id=plugin name=comments author="[[Simon_McVittie|smcv]]"]]
2 [[!tag type/useful]]
4 This plugin adds "blog-style" comments. The intention is that on a non-wiki site
5 (like a blog) you can lock all pages for admin-only access, then allow otherwise
6 unprivileged (or perhaps even anonymous) users to comment on posts.
8 When using this plugin, you should also enable [[htmlscrubber]] and either [[htmltidy]]
9 or [[htmlbalance]]. Directives are filtered out by default, to avoid commenters slowing
10 down the wiki by causing time-consuming processing. As long as the recommended plugins
11 are enabled, comment authorship should hopefully be unforgeable by CGI users.
13 The plugin adds a new [[ikiwiki/PageSpec]] match type, `postcomment`, for use
14 with `anonok_pagespec` from the [[plugins/anonok]] plugin or `locked_pages` from
15 the [[plugins/lockedit]] plugin. Typical usage would be something like:
17     locked_pages => "!postcomment(*)"
19 to allow non-admin users to comment on pages, but not edit anything. You can also do
21     anonok_pages => "postcomment(*)"
23 to allow anonymous comments (the IP address will be used as the "author").
25 There are some global options for the setup file:
27 * `comments_shown_pagespec`: pages where comments will be displayed inline, e.g. `blog/*`
28   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 comments on the
32   [[sandbox]] will be called something like `sandbox/comment_12`
33 * `comments_allowdirectives`: if true (default false), comments may contain IkiWiki
34   directives
35 * `comments_commit`: if true (default true), comments will be committed to the version
36   control system
38 This plugin aims to close the [[todo]] item "[[todo/supporting_comments_via_disussion_pages]]",
39 and is currently available from [[smcv]]'s git repository on git.pseudorandom.co.uk (it's the
40 `postcomment` branch). A demo wiki with the plugin enabled is running at
41 <http://www.pseudorandom.co.uk/2008/ikiwiki/demo/>.
43 Known issues:
45 * Needs code review
46 * The access control via postcomment() is rather strange (see [[discussion]] for more details)
47 * There is some common code cargo-culted from other plugins (notably inline and editpage) which
48   should probably be shared
49 * Joey doesn't think it should necessarily use internal pages (see [[discussion]])
51 > I haven't done a detailed code review, but I will say I'm pleased you
52 > avoided re-implementing inline! --[[Joey]]
54 Wishlist:
56 * tbm would like anonymous people to be able to enter their name and possibly email
57   address
58 * smcv would like an indication of who you're posting as / the ability to log in
59   as someone else (even if anonymous comments are allowed, it'd be nice to be
60   able to choose to log in with a username or OpenID, like in Livejournal);
61   perhaps editpage needs this too
63 Fixed issues:
65 * Joey didn't think the `\[[!comments]]` directive was appropriate; comments now appear
66   on pages selected with a [[ikiwiki/pagespec]]
67 * Joey thought that raw HTML should always be allowed; it now is