XF 2.2 Users resource number in postbit?

DaveL

Well-known member
Hi,
Been having a good old search, but don't seem to be having much joy!
Is there a way to show how many resources a member has submitted in their postbit message block?
 
From memory, I don't believe that is available as a predefined entry, so you would have to edit the post_macros template and use $post.User.xfrm_resource_count to display the value.
 
From memory, I don't believe that is available as a predefined entry, so you would have to edit the post_macros template and use $post.User.xfrm_resource_count to display the value.
Thank you. Found the place to put it in the message_macros template.

Am I right in thinking I would need to add some code like this to get it to show?

<xf:if is="$extras.age && $user.Profile.age">
<dl class="pairs pairs--justified">
<xf:if is="property('xbMessageUserIcons')">
<dt><xf:fa icon="fa-birthday-cake fa-fw" data-xf-init="tooltip" title="{{ phrase('age') }}" /></dt>
<xf:else />
<dt>{{ phrase('age') }}</dt>
</xf:if>
<dd>{$user.Profile.age}</dd>
</dl>
</xf:if>
 
Something like that - you will need an if check to confirm the user has posted resources and then just format the display how you want.
You could also make the value link to the user's resources if desired.
 
Top Bottom