From ddd07883cbe4077729eca3c8e831ee8a811198fb Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Thu, 28 Mar 2013 00:03:37 +0100 Subject: [PATCH] Implements hyperlinking to specific post from rss. --- main.tmpl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.tmpl b/main.tmpl index 46f3979..95a8f58 100644 --- a/main.tmpl +++ b/main.tmpl @@ -79,7 +79,7 @@ # end if # const query = sql"""SELECT A.id, A.name, # strftime('%Y-%m-%dT%H:%M:%S', (A.modified)), -# COUNT(B.id), C.name, B.content +# COUNT(B.id), C.name, B.content, B.id # FROM thread AS A, post AS B, person AS C # WHERE A.id = b.thread AND B.author = C.id # GROUP BY B.thread @@ -90,6 +90,7 @@ # const postCount = 3 # const postAuthor = 4 # const postContent = 5 +# const postId = 6 # let recent = GetValue(db, sql"""SELECT # strftime('%Y-%m-%dT%H:%M:%S', (modified)) FROM thread # ORDER BY modified DESC LIMIT 1""") @@ -104,11 +105,14 @@ ${XMLencode(%name)} urn:entry:${%threadid} + # let url = c.genThreadUrl(threadid = %threadid, + # pageNum = $(ceil(parseInt(%postCount) / postsPerPage).int)) & + # "#" & %postId + href="${c.req.makeUri(url)}"/> ${%threadDate} Posts ${postCount}, ${XMLEncode(%postAuthor)} said: ${XMLEncode(%postContent)} +>Posts ${%postCount}, ${XMLEncode(%postAuthor)} said: ${XMLEncode(%postContent)} # end for