From 28c73ca74250aa95438f6ae88dcde759df225336 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 8 Oct 2009 15:13:47 +0200 Subject: Add a comment and trackback moderation page. Ignore-this: 45d484506c4f5f4b0560f6397e5b61a2 darcs-hash:9cc1720d761894eff92ca76970a7c750dccc69d1 --- journal.lisp | 115 ++++++++++++++++++++++++++++++++++++++++++++--------------- main.lisp | 21 ++++++++++- 2 files changed, 107 insertions(+), 29 deletions(-) diff --git a/journal.lisp b/journal.lisp index 99b8459..a4a6191 100755 --- a/journal.lisp +++ b/journal.lisp @@ -47,6 +47,7 @@ (:post-comment (values "/~D" post-id)) (:trackback (values "/~D/trackback" post-id)) (:save (values "/~D/save" post-id)) + (:moderation-page "/moderate") (:css "/../journal.css"))))) @@ -278,39 +279,13 @@ (<:div :class :journal-comments (<:h2 "Kommentare") (dolist (comment comments) - (with-slots (author body date id email website) - comment - (<:div :class :journal-comment - :id (format nil "comment-~D" id) - (<:div :class :journal-comment-header - (<:as-html (format nil "(~A) " - (format-date nil "%day%.%mon%.%yr%, %hr%:%min%" date))) - (<:a :href website :rel "nofollow" - (<:as-html (format nil "~A" author))) - (<:as-html " meint: ")) - (<:div :class :journal-comment-body - (<:as-html (render-comment-body body)))))))) + (show-comment comment)))) (when (and comments-p (not (null trackbacks))) (<:div :class :journal-comments (<:h2 "Trackbacks") (dolist (trackback trackbacks) - (with-slots (title excerpt date id url blog-name) - trackback - (<:div :class :journal-comment - :id (format nil "trackback-~D" id) - (<:div :class :journal-comment-header - (<:as-html (format nil "(~A) " - (format-date nil "%day%.%mon%.%yr%, %hr%:%min%" date))) - (<:strong (<:as-html (format nil "~A " (or blog-name url)))) - (if (null title) - (<:a :href url :rel "nofollow" (<:as-html "schreibt hierzu:")) - (progn - (<:as-html "schreibt hierzu im Artikel ") - (<:a :href url :rel "nofollow" (<:as-html (format nil "~A" title))) - (<:as-html ":")))) - (<:div :class :journal-comment-body - (<:as-html (render-comment-body excerpt)))))))) + (show-trackback trackback)))) (when comments-p (<:as-is (format nil "