From c2537607372da8264d63329f236f2c90257b2556 Mon Sep 17 00:00:00 2001 From: psychobunny <psycho.bunny@hotmail.com> Date: Thu, 30 Jan 2014 13:06:30 -0500 Subject: [PATCH] converted filter:posts.custom_profile_info to accept an array instead of building a string for better themability. closes #886 --- public/templates/topic.tpl | 4 +++- src/posts.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 7ee6f547c8..4feedc1c23 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -127,7 +127,9 @@ <div class="post-info"> <span class="pull-left"> [[topic:reputation]]: <i class='fa fa-star'></i> <span class='formatted-number post_rep_{posts.uid}'>{posts.user_rep}</span> | [[topic:posts]]: <i class='fa fa-pencil'></i> <span class='formatted-number user_postcount_{posts.uid}'>{posts.user_postcount}</span> - {posts.additional_profile_info} + <!-- BEGIN custom_profile_info --> + | {posts.custom_profile_info.content} + <!-- END custom_profile_info --> </span> <span class="pull-right"> [[category:posted]] <span class="relativeTimeAgo timeago" title="{posts.relativeTime}"></span> diff --git a/src/posts.js b/src/posts.js index b7048dc09c..9027c0524d 100644 --- a/src/posts.js +++ b/src/posts.js @@ -206,11 +206,11 @@ var db = require('./database'), } } - plugins.fireHook('filter:posts.custom_profile_info', {profile: "", uid: post.uid, pid: post.pid}, function(err, profile_info) { + plugins.fireHook('filter:posts.custom_profile_info', {profile: [], uid: post.uid, pid: post.pid}, function(err, profile_info) { if(err) { return callback(err); } - post.additional_profile_info = profile_info.profile; + post.custom_profile_info = profile_info.profile; if (post.editor !== '') { user.getUserFields(post.editor, ['username', 'userslug'], function(err, editorData) {