summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-08 12:58:15 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-08 12:58:15 +0200
commitb95ed08641880a6b99ce5f692d45f855f57dd044 (patch)
tree5af6134d49e7b43ad41f33593947aa48bcdb9f3d
parentd824e377fa8e7f9b2107657d0d46277fbc098acd (diff)
Display trackbacks just like comments.
Ignore-this: fe76b7323c2590281829e0baa2cd7b97 darcs-hash:f7fb163726f9b61ad1229ea097a5242f363e8b89
-rwxr-xr-xjournal.lisp29
1 files 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 "<!--
<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"
@@ -492,6 +516,7 @@
nil
(get-universal-time)
nil
+ nil
nil)
;; Editor here.
(<:form :action (link-to :preview :post-id id)