# Copyright © 2008 Simon McVittie <http://smcv.pseudorandom.co.uk/>
# Licensed under the GNU GPL, version 2, or any later version published by the
# Free Software Foundation
-package IkiWiki::Plugin::smcvpostcomment;
+package IkiWiki::Plugin::postcomment;
use warnings;
use strict;
use IkiWiki 2.00;
-use constant PLUGIN => "smcvpostcomment";
+use constant PLUGIN => "postcomment";
use constant PREVIEW => "Preview";
use constant POST_COMMENT => "Post comment";
use constant CANCEL => "Cancel";
package IkiWiki::PageSpec;
-sub match_smcvpostcomment ($$;@) {
+sub match_postcomment ($$;@) {
my $page = shift;
my $glob = shift;
- unless ($page =~ s/\[smcvpostcomment\]$//) {
+ unless ($page =~ s/\[postcomment\]$//) {
return IkiWiki::FailReason->new("not posting a comment");
}
return match_glob($page, $glob);
padding: 2px;
}
-.smcvpostcomment-display .author { font-weight: bold; }
-.smcvpostcomment-display { border: 1px inset #999; margin: 3px; padding: 3px; }
-.smcvpostcomment-header { font-style: italic; }
-.smcvpostcomment-subject { font-weight: bold; border-bottom: 1px solid #999; }
+.postcomment-display .author { font-weight: bold; }
+.postcomment-display { border: 1px inset #999; margin: 3px; padding: 3px; }
+.postcomment-header { font-style: italic; }
+.postcomment-subject { font-weight: bold; border-bottom: 1px solid #999; }
-<div class="smcvpostcomment-display">
+<div class="postcomment-display">
-<div class="smcvpostcomment-header">
+<div class="postcomment-header">
Posted by
<TMPL_IF NAME="AUTHOR">
<span class="author">
(<TMPL_VAR CTIME>)
</div>
-<div class="smcvpostcomment-subject"><TMPL_VAR TITLE></div>
+<div class="postcomment-subject"><TMPL_VAR TITLE></div>
<div class="inlinecontent">
<TMPL_VAR CONTENT>
</div>
-</div><!--.smcvpostcomment-display-->
+</div><!--.postcomment-display-->
--- /dev/null
+<div class="postcomment-embed">
+<TMPL_IF NAME=DISABLED>
+[Posting comments disabled: <TMPL_VAR NAME=DISABLED>]
+<TMPL_ELSE>
+<a href="<TMPL_VAR CGIURL ESCAPE=HTML>?do=postcomment&page=<TMPL_VAR PAGE ESCAPE=URL>">Post a comment</a>
+</TMPL_IF>
+</div>
-<div class="smcvpostcomment-form">
+<div class="postcomment-form">
<TMPL_VAR MESSAGE>
<TMPL_VAR FORM-START>
<TMPL_VAR FIELD-DO>
</div><!-- #preview -->
</TMPL_IF>
-</div><!-- .smcvpostcomment-form -->
+</div><!-- .postcomment-form -->
+++ /dev/null
-<div class="smcvpostcomment-embed">
-<TMPL_IF NAME=DISABLED>
-[Posting comments disabled: <TMPL_VAR NAME=DISABLED>]
-<TMPL_ELSE>
-<a href="<TMPL_VAR CGIURL ESCAPE=HTML>?do=smcvpostcomment&page=<TMPL_VAR PAGE ESCAPE=URL>">Post a comment</a>
-</TMPL_IF>
-</div>