@ -56,8 +56,8 @@ var async = require('async'),
return next();
}
post.relativeTime = utils.toISOString(post.timestamp);
post.relativeEditTime = parseInt(post.edited, 10) !== 0 ? utils.toISOString(post.edited) : '';
post.timestampISO = utils.toISOString(post.timestamp);
post.editedISO = parseInt(post.edited, 10) !== 0 ? utils.toISOString(post.edited) : '';
Posts.parsePost(post, next);
}, next);
},
@ -81,7 +81,7 @@ module.exports = function(Posts) {
post.user = results.users[post.uid];
post.topic = results.topics[post.tid];
post.category = results.categories[post.topic.cid];
if (!post.content || !options.parse) {
if (options.stripTags) {
@ -307,7 +307,7 @@ module.exports = function(Topics) {
postData.display_moderator_tools = true;
postData.display_move_tools = true;
postData.selfPost = false;
postData.relativeTime = utils.toISOString(postData.timestamp);
postData.timestampISO = utils.toISOString(postData.timestamp);
postData.topic.title = validator.escape(postData.topic.title);
next(null, postData);
@ -60,7 +60,7 @@ module.exports = function(Topics) {
topic.titleRaw = topic.title;
topic.title = validator.escape(topic.title);
topic.relativeTime = utils.toISOString(topic.timestamp);
topic.timestampISO = utils.toISOString(topic.timestamp);
topic.lastposttimeISO = utils.toISOString(topic.lastposttime);
post.user = users[post.uid];
post.timestamp = utils.toISOString(post.timestamp);
tidToPost[post.tid] = post;
posts.parsePost(post, next);
@ -149,7 +149,7 @@ module.exports = function(User) {
function(users, next) {
users.forEach(function(user, index) {
if (user) {
user.timestamp = utils.toISOString(data[index].score);
user.timestampISO = utils.toISOString(data[index].score);
});
@ -57,7 +57,7 @@
</div>
<small>
<span class="pull-right">
Posted in <a href="{config.relative_path}/category/{posts.category.slug}" target="_blank"><i class="fa {posts.category.icon}"></i> {posts.category.name}</a>, <span class="timeago" title="{posts.relativeTime}"></span> •
Posted in <a href="{config.relative_path}/category/{posts.category.slug}" target="_blank"><i class="fa {posts.category.icon}"></i> {posts.category.name}</a>, <span class="timeago" title="{posts.timestampISO}"></span> •
<a href="{config.relative_path}/topic/{posts.topic.slug}/{posts.index}" target="_blank">Read More</a>
</span>
</small>