summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-12-12 14:59:23 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-12-12 14:59:23 -0500
commit38c92e63bb012da98019faf9bc11037c5cbd5a99 (patch)
tree502d0aa5ddbb2c8854bbd81d886f18878fb8448c /IkiWiki
parent9d5075ab521a24d718a2b663e11856c8cc80eb03 (diff)
move getsetup to usual place
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/comments.pm124
1 files changed, 62 insertions, 62 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 4ed696026..8d333f05f 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -26,6 +26,68 @@ sub import { #{{{
IkiWiki::loadplugin("inline");
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+ # Pages where comments are shown, but new comments are not
+ # allowed, will show "Comments are closed".
+ comments_shown_pagespec => {
+ type => 'pagespec',
+ example => 'blog/*',
+ default => '',
+ description => 'PageSpec for pages where comments will be shown inline',
+ link => 'ikiwiki/PageSpec',
+ safe => 1,
+ rebuild => 1,
+ },
+ comments_open_pagespec => {
+ type => 'pagespec',
+ example => 'blog/* and created_after(close_old_comments)',
+ default => '',
+ description => 'PageSpec for pages where new comments can be posted',
+ link => 'ikiwiki/PageSpec',
+ safe => 1,
+ rebuild => 1,
+ },
+ comments_pagename => {
+ type => 'string',
+ example => 'comment_',
+ default => 'comment_',
+ description => 'Base name for comments, e.g. "comment_" for pages like "sandbox/comment_12"',
+ safe => 0, # manual page moving required
+ rebuild => undef,
+ },
+ comments_allowdirectives => {
+ type => 'boolean',
+ default => 0,
+ example => 0,
+ description => 'Interpret directives in comments?',
+ safe => 1,
+ rebuild => 0,
+ },
+ comments_allowauthor => {
+ type => 'boolean',
+ default => 0,
+ example => 0,
+ description => 'Allow anonymous commenters to set an author name?',
+ safe => 1,
+ rebuild => 0,
+ },
+ comments_commit => {
+ type => 'boolean',
+ example => 1,
+ default => 1,
+ description => 'commit comments to the VCS',
+ # old uncommitted comments are likely to cause
+ # confusion if this is changed
+ safe => 0,
+ rebuild => 0,
+ },
+} #}}}
+
sub htmlize { # {{{
my %params = @_;
return $params{content};
@@ -145,68 +207,6 @@ sub preprocess { # {{{
return $content;
} # }}}
-sub getsetup () { #{{{
- return
- plugin => {
- safe => 1,
- rebuild => 1,
- },
- # Pages where comments are shown, but new comments are not
- # allowed, will show "Comments are closed".
- comments_shown_pagespec => {
- type => 'pagespec',
- example => 'blog/*',
- default => '',
- description => 'PageSpec for pages where comments will be shown inline',
- link => 'ikiwiki/PageSpec',
- safe => 1,
- rebuild => 1,
- },
- comments_open_pagespec => {
- type => 'pagespec',
- example => 'blog/* and created_after(close_old_comments)',
- default => '',
- description => 'PageSpec for pages where new comments can be posted',
- link => 'ikiwiki/PageSpec',
- safe => 1,
- rebuild => 1,
- },
- comments_pagename => {
- type => 'string',
- example => 'comment_',
- default => 'comment_',
- description => 'Base name for comments, e.g. "comment_" for pages like "sandbox/comment_12"',
- safe => 0, # manual page moving will required
- rebuild => undef,
- },
- comments_allowdirectives => {
- type => 'boolean',
- default => 0,
- example => 0,
- description => 'Interpret directives in comments?',
- safe => 1,
- rebuild => 0,
- },
- comments_allowauthor => {
- type => 'boolean',
- default => 0,
- example => 0,
- description => 'Allow anonymous commenters to set an author name?',
- safe => 1,
- rebuild => 0,
- },
- comments_commit => {
- type => 'boolean',
- example => 1,
- default => 1,
- description => 'commit comments to the VCS',
- # old uncommitted comments are likely to cause
- # confusion if this is changed
- safe => 0,
- rebuild => 0,
- },
-} #}}}
-
sub checkconfig () { #{{{
$config{comments_commit} = 1 unless defined $config{comments_commit};
$config{comments_pagename} = 'comment_'