mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
converted filter:posts.custom_profile_info to accept an array instead of building a string for better themability. closes #886
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user