Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions public/karax.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<link rel="stylesheet" href="/css/nimforum.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.12/css/all.css" integrity="sha384-G0fIWCsCzJIMAVNQPfjH08cyYaUtMwjJwqiRKxxE/rx96Uroj1BtIQ6MLJuheaO9" crossorigin="anonymous">
<link rel="icon" href="/images/favicon.png">
<link href="/threadActivity.xml" title="Thread activity" type="application/atom+xml" rel="alternate">
<link href="/postActivity.xml" title="Post activity" type="application/atom+xml" rel="alternate">

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=$ga"></script>
Expand Down
11 changes: 2 additions & 9 deletions src/main.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,14 @@
#template `!`(idx: untyped): untyped =
# row[idx]
#end template
#proc genRSSHeaders(c: TForumData): string =
# result = ""
<link href="${c.req.makeUri("/threadActivity.xml")}" title="Thread activity"
type="application/atom+xml" rel="alternate">
<link href="${c.req.makeUri("/postActivity.xml")}" title="Post activity"
type="application/atom+xml" rel="alternate">
#end proc
#
#proc genThreadsRSS(c: TForumData): string =
# result = ""
# const query = sql"""SELECT A.id, A.name,
# strftime('%Y-%m-%dT%H:%M:%SZ', (A.modified)),
# 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
# WHERE NOT A.isDeleted AND A.id = b.thread AND B.author = C.id
# GROUP BY B.thread
# ORDER BY modified DESC LIMIT ?"""
# const threadId = 0
Expand Down Expand Up @@ -63,7 +56,7 @@ ${xmlEncode(rstToHtml(!postContent))}</content>
# strftime('%Y-%m-%dT%H:%M:%SZ', A.creation),
# A.creation, COUNT(C.id)
# FROM post AS A, person AS B, post AS C, thread AS T
# WHERE A.author = B.id AND A.thread = C.thread AND C.id <= A.id
# WHERE NOT T.isDeleted AND NOT A.isDeleted AND A.author = B.id AND A.thread = C.thread AND C.id <= A.id
# AND T.id = A.thread
# GROUP BY A.id
# ORDER BY A.creation DESC LIMIT 10"""
Expand Down