v1.18.x
Baris Usakli 12 years ago
parent ed967a0e2f
commit 582cd2f011

@ -29,7 +29,7 @@
<div class="hover-overlay">
{main_posts.username}<br />
<i class="icon-star"></i><span class="user_rep_{main_posts.uid}">{main_posts.user_rep}</span>
<i class="icon-pencil"></i><span class="user_posts_{main_posts.uid}">8</span>
<i class="icon-pencil"></i><span class="user_posts_{main_posts.uid}">{main_posts.user_postcount}</span>
</div>
</a>
<h3><p id="topic_title_{main_posts.pid}" class="topic-title">{topic_name}</p></h3>

@ -33,11 +33,12 @@ marked.setOptions({
}
Posts.addUserInfoToPost = function(post, callback) {
user.getUserFields(post.uid, ['username', 'userslug', 'reputation', 'picture', 'signature'], function(userData) {
user.getUserFields(post.uid, ['username', 'userslug', 'reputation', 'postcount', 'picture', 'signature'], function(userData) {
post.username = userData.username || 'anonymous';
post.userslug = userData.userslug || '';
post.user_rep = userData.reputation || 0;
post.user_postcount = userData.postcount || 0;
post.picture = userData.picture || require('gravatar').url('', {}, https=global.nconf.get('https'));
post.signature = marked(userData.signature || '');

Loading…
Cancel
Save