summaryrefslogtreecommitdiff
path: root/mulkcms.lisp
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-15 13:38:11 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-15 13:38:11 +0100
commitc63989699bbca26908c2efd7968f776800e75b36 (patch)
tree2e2779c891ab2d617ecdf4419cc888851f1a6a14 /mulkcms.lisp
parentc5436f91374bdf463e4c83637c90ac888f973a3f (diff)
Improve spam detection information on comment submission pages.
Diffstat (limited to 'mulkcms.lisp')
-rw-r--r--mulkcms.lisp38
1 files changed, 24 insertions, 14 deletions
diff --git a/mulkcms.lisp b/mulkcms.lisp
index 1445730..d6f09b4 100644
--- a/mulkcms.lisp
+++ b/mulkcms.lisp
@@ -63,9 +63,12 @@
("comment_content" . ,body))))
+(defun use-akismet-p ()
+ (and (boundp '*wordpress-key*) *wordpress-key* t))
+
(defun spamp/akismet (&rest comment-data)
;; Taken from Mulkblog.
- (when (and (boundp '*wordpress-key*) *wordpress-key*)
+ (when (use-akismet-p)
(ignore-errors
(akismet-login)
(string= "true" (apply #'akismet-check-comment comment-data)))))
@@ -174,19 +177,26 @@
:body-label "Message"
:submit-button-label "Submit"
:title "Submit a comment"
- :notes "<p><strong>Note:</strong>
- This website uses <span
- class='spam-detection-method'><a
- href=\"http://akismet.com/\">Akismet</a></span>
- for spam detection.
- E-mail addresses are never
- disclosed to anyone <span
- class='irrelevant-for-hashcash'>(including
- Akismet)</span> other than
- the site owner. Comment
- format is plain text. Use
- blank lines to separate
- paragraphs.</p>"
+ :notes (format
+ nil
+ "<p><strong>Note:</strong>
+ <span
+ class='spam-detection-info'>~A</span>
+ Comment format is plain
+ text. Use blank lines to
+ separate paragraphs.</p>"
+ (if
+ (use-akismet-p)
+ "This website uses <span
+ class='spam-detection-method'><a
+ href=\"http://akismet.com/\">Akismet</a></span>
+ for spam detection.
+ E-mail addresses are
+ never disclosed to
+ anyone (including
+ Akismet) other than the
+ site owner."
+ ""))
:action (link-to :post-comment :article-id article)))
:edit-link (link-to :edit :article-id article)
:edit-button-label "Edit"