Skip to content

Node.js based forum software built for the modern web

converted filter:posts.custom_profile_info to accept an array instead of building a string for better themability. closes #886

psychobunnyc2537607372d
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>&nbsp;|&nbsp;[[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) {