diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-01-17 12:58:17 +0000 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-01-17 12:58:17 +0000 |
commit | 452d9623214abee53527f2c852a84db4994fe9e3 (patch) | |
tree | caad53cf19df3f9bfe5ce26042e2f55fbe697f89 | |
parent | 004ffac63fcc26ea1c3ff70e64a8ab626a09ec25 (diff) |
Add missing changes from previous patch.
-rw-r--r-- | mulkcms.lisp | 44 |
1 files 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.</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." - "")) + (cond + ((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.") + (*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))) |