Node.js based forum software built for the modern web
closes #76
Baris Soner Usakli8d2c4fd62518
diff --git a/public/templates/topic.tpl b/public/templates/topic.tplindex 576afb828f..7ef124deca 100644--- a/public/templates/topic.tpl+++ b/public/templates/topic.tpl@@ -56,8 +56,8 @@<div class="post-signature">{main_posts.signature}</div><div class="profile-block"><img class="hidden-desktop" src="{main_posts.picture}?s=10&default=identicon" align="left" /> posted by <strong><a class="" href="/users/{main_posts.userslug}">{main_posts.username}</a></strong> {main_posts.relativeTime} ago- <span class="{main_posts.edited-class} hidden-phone">| last edited by <strong><a href="/users/{main_posts.editor}">{main_posts.editor}</a></strong> {main_posts.relativeEditTime} ago</span>- <span class="{main_posts.edited-class}"><i class="icon-edit visible-phone" title="edited by {main_posts.editor} {main_posts.relativeEditTime} ago"></i></span>+ <span class="{main_posts.edited-class} hidden-phone">| last edited by <strong><a href="/users/{main_posts.editorslug}">{main_posts.editorname}</a></strong> {main_posts.relativeEditTime} ago</span>+ <span class="{main_posts.edited-class}"><i class="icon-edit visible-phone" title="edited by {main_posts.editorname} {main_posts.relativeEditTime} ago"></i></span><div class="post-buttons visible-phone"><div class="post_reply"><i class="icon-reply"></i></div></div>@@ -91,8 +91,8 @@<div class="post_reply" title="Reply"><i class="icon-reply"></i></div></span><img class="hidden-desktop" src="{posts.picture}?s=10&default=identicon" align="left" /> posted by <strong><a class="username-field" href="/users/{posts.userslug}">{posts.username}</a></strong> {posts.relativeTime} ago- <span class="{posts.edited-class} hidden-phone">| last edited by <strong><a href="/users/{posts.editor}">{posts.editor}</a></strong> {posts.relativeEditTime} ago</span>- <span class="{posts.edited-class}"><i class="icon-edit visible-phone" title="edited by {posts.editor} {posts.relativeEditTime} ago"></i></span>+ <span class="{posts.edited-class} hidden-phone">| last edited by <strong><a href="/users/{posts.editorslug}">{posts.editorname}</a></strong> {posts.relativeEditTime} ago</span>+ <span class="{posts.edited-class}"><i class="icon-edit visible-phone" title="edited by {posts.editorname} {posts.relativeEditTime} ago"></i></span></div></div></div>diff --git a/src/posts.js b/src/posts.jsindex 1e0ed0c820..b5901cd4f9 100644--- a/src/posts.js+++ b/src/posts.js@@ -41,7 +41,15 @@ marked.setOptions({post.picture = userData.picture || require('gravatar').url('', {}, https=global.config.https);post.signature = marked(userData.signature || '');- callback();+ if(post.editor !== '') {+ user.getUserFields(post.editor, ['username', 'userslug'], function(editorData) {+ post.editorname = editorData.username;+ post.editorslug = editorData.userslug;+ callback();+ });+ } else {+ callback();+ }});}