Skip to content

Node.js based forum software built for the modern web

more fixes to noscript

Julian Lam0a8c43901d6a
diff --git a/public/templates/noscript/topic.tpl b/public/templates/noscript/topic.tpl
index fbc4ce85a7..c19256d0f0 100644
--- a/public/templates/noscript/topic.tpl
+++ b/public/templates/noscript/topic.tpl
@@ -1,6 +1,7 @@
<ul class="posts">
<!-- BEGIN main_posts -->
<li>
+ <a name="{main_posts.pid}"></a>
<div class="row">
<div class="col-lg-2 profile">
<img class="img-thumbnail" src="{main_posts.picture}" /><br />
@@ -14,6 +15,7 @@
<!-- END main_posts -->
<!-- BEGIN posts -->
<li>
+ <a name="{posts.pid}"></a>
<div class="row">
<div class="col-lg-2 profile">
<img class="img-thumbnail" src="{posts.picture}" /><br />
diff --git a/src/webserver.js b/src/webserver.js
index 0ea5f47dfe..d802929f53 100644
--- a/src/webserver.js
+++ b/src/webserver.js
@@ -235,7 +235,8 @@ var express = require('express'),
});
},
function(topicData, next) {
- var lastMod = 0,
+ var posts = topicData.posts.push(topicData.main_posts[0]),
+ lastMod = 0,
timestamp;
for(var x=0,numPosts=topicData.posts.length;x<numPosts;x++) {