From b95ed08641880a6b99ce5f692d45f855f57dd044 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 8 Oct 2009 12:58:15 +0200 Subject: Display trackbacks just like comments. Ignore-this: fe76b7323c2590281829e0baa2cd7b97 darcs-hash:f7fb163726f9b61ad1229ea097a5242f363e8b89 --- journal.lisp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/journal.lisp b/journal.lisp index 0488f23..e706fb6 100755 --- a/journal.lisp +++ b/journal.lisp @@ -211,11 +211,14 @@ (comments-about journal-entry :ordered-p t :ham-p t) - comments-p))) + comments-p + (trackbacks-about journal-entry + :ordered-p t + :ham-p t)))) (defun show-journal-entry-with-components (id title body categories - posting-date comments comments-p) + posting-date comments comments-p trackbacks) (unless *full-entry-view* (<:tr (<:td (<:a :href (link-to :view :post-id id) @@ -288,6 +291,27 @@ (<:div :class :journal-comment-body (<:as-html (render-comment-body body)))))))) + (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)))))))) + (when comments-p (<:as-is (format nil "