added timestamp to teaser, continuing work on recent replies block

This commit is contained in:
psychobunny
2013-05-24 14:34:55 -04:00
parent 8a2499a423
commit 8c2b6cda69
5 changed files with 109 additions and 13 deletions

View File

@@ -180,7 +180,8 @@ var RDB = require('./redis.js'),
'pin-icon': pinned[i] === '1' ? 'icon-pushpin' : 'none',
'badgeclass' : (hasReadTopics[i] && current_user !=0) ? '' : 'badge-important',
'teaser_text': teaserInfo[i].text,
'teaser_username': teaserInfo[i].username
'teaser_username': teaserInfo[i].username,
'teaser_timestamp': utils.relativeTime(teaserInfo[i].timestamp)
});
}
}
@@ -260,8 +261,10 @@ var RDB = require('./redis.js'),
}
Categories.getRecentReplies = function(cid, callback) {
RDB.zrange('categories:recent_posts:cid:' + cid, 0, -1, function(err, replies) {
callback(replies);
RDB.zrange('categories:recent_posts:cid:' + cid, 0, -1, function(err, pids) {
posts.getPostSummaryByPids(pids, function(posts) {
callback(posts);
});
});
}