X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e9797ee0863855da93c7a98612c984fecc8d1e23..d05463b06979cee9be5ad98d3c7807c9696e87d4:/doc/plugins/comments.mdwn?ds=sidebyside diff --git a/doc/plugins/comments.mdwn b/doc/plugins/comments.mdwn index fa263ef40..48b6c6ae7 100644 --- a/doc/plugins/comments.mdwn +++ b/doc/plugins/comments.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=comments author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin adds "blog-style" comments. Unlike the wiki-style freeform Discussion pages, these comments are posted by a simple form, cannot later @@ -14,19 +14,23 @@ 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 -[[lockedit]] and [[anonok]] pages for details on locking down a wiki so -users can only post comments. +[[opendiscussion]], [[lockedit]] and [[anonok]] pages for details on locking +down a wiki so readers can only post comments. Individual comments are stored as internal-use pages named something like `page/comment_1`, `page/comment_2`, etc. These pages internally use a -`\[[!_comment]]` [[ikiwiki/directive]]. +[[comment_directive|ikiwiki/directive/comment]]. There are some global options for the setup file: -* `comments_shown_pagespec`: pages where comments will be displayed inline, - e.g. `blog/*` or `!*/discussion`. -* `comments_open_pagespec`: pages where new comments can be posted, e.g. - `blog/* and created_after(close_old_comments)` or `!*/discussion` +* `comments_pagespec`: [[ikiwiki/PageSpec]] of pages where comments are + allowed. The default is not to allow comments on any pages. To allow + comments to all posts to a blog, you could use + `blog/posts/* and !*/Discussion`. +* `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` * `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 @@ -38,14 +42,14 @@ There are some global options for the setup file: \[[!meta authorurl]] directives will not be overridden by the comments plugin -Known issues: - -* Needs code review -* The access control via postcomment() is rather strange (see [[discussion]] for more details) -* There is some common code cargo-culted from other plugins (notably inline and editpage) which - should probably be shared -* Joey doesn't think it should necessarily use internal pages (see [[discussion]]) -* Previews always say "unknown IP address" -* Add `COMMENTOPENID`: the authenticated/verified user name, if and only if it was an OpenID -* The default template should have a (?) icon next to unauthenticated users (with the IP address - as title) and an OpenID icon next to OpenIDs +## comment moderation + +If you enable the [[blogspam]] plugin, comments that appear spammy will be +held for moderation. (Or with the [[moderatedcomments]] plugin, all +comments will be held.) Wiki admins can access the comment moderation queue +via a button on their Preferences page. + +Comments pending moderation are not checked into revision control. +To find unmoderated comments, `find /your/ikiwiki/srcdir -name '*._comment_pending'` +To manually moderate a comment, just rename the file, removing the +"_pending" from the end, and check it into revision control.