From 452d9623214abee53527f2c852a84db4994fe9e3 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 17 Jan 2013 12:58:17 +0000 Subject: Add missing changes from previous patch. --- mulkcms.lisp | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/mulkcms.lisp b/mulkcms.lisp index e6a0b0b..c4bbc60 100644 --- a/mulkcms.lisp +++ b/mulkcms.lisp @@ -91,14 +91,17 @@ (defun use-akismet-p () - (and (boundp '*wordpress-key*) *wordpress-key* t)) + (and (boundp '*wordpress-key*) *wordpress-key*)) (defun spamp/akismet (&rest comment-data) ;; Taken from Mulkblog. - (when (use-akismet-p) - (ignore-errors - (akismet-login) - (string= "true" (apply #'akismet-check-comment comment-data))))) + (cond + ((use-akismet-p) + (ignore-errors + (akismet-login) + (string= "true" (apply #'akismet-check-comment comment-data)))) + (*drop-unfiltered* t) + (t nil))) (defun parse-http-date (date-string) @@ -356,6 +359,8 @@ :field-label "Website") (list :field-id "email" :field-label "E-Mail")) + :require-js (and (not (use-akismet-p)) + *drop-unfiltered*) :body-label "Message" :submit-button-label "Submit" :title "Submit a comment" @@ -367,18 +372,23 @@ Comment format is plain text. Use blank lines to separate paragraphs.

" - (if - (use-akismet-p) - "This website uses Akismet - for spam detection. - E-mail addresses are - never disclosed to - anyone (including - Akismet) other than the - site owner." - "")) + (cond + ((use-akismet-p) + "This website uses Akismet + for spam detection. + E-mail addresses are + never disclosed to + anyone (including + Akismet) other than the + site owner.") + (*drop-unfiltered* + "This website uses a JavaScript-based + spam prevention system. Please enable + JavaScript in your browser to post + comments.") + (t ""))) :action (link-to :post-comment :article-id article :absolute t))) -- cgit v1.2.3