XF 2.3 Resource count in postbit (2.3.0)

Solution
You can edit the message_macros template:

Find around line 86
HTML:
<xf:if is="$extras.custom_fields">
    <xf:macro id="custom_fields_macros::custom_fields_values"
        arg-type="users"
        arg-group="personal"
        arg-set="{$user.Profile.custom_fields}"
        arg-additionalFilters="{{ ['message'] }}"
        arg-valueClass="pairs pairs--justified" />
    <xf:if is="$user.canViewIdentities()">
        <xf:macro id="custom_fields_macros::custom_fields_view"
            arg-type="users"
            arg-group="contact"
            arg-set="{$user.Profile.custom_fields}"
            arg-additionalFilters="{{ ['message'] }}"
            arg-valueClass="pairs pairs--justified" />
    </xf:if>
</xf:if>

Add this code below...
You can edit the message_macros template:

Find around line 86
HTML:
<xf:if is="$extras.custom_fields">
    <xf:macro id="custom_fields_macros::custom_fields_values"
        arg-type="users"
        arg-group="personal"
        arg-set="{$user.Profile.custom_fields}"
        arg-additionalFilters="{{ ['message'] }}"
        arg-valueClass="pairs pairs--justified" />
    <xf:if is="$user.canViewIdentities()">
        <xf:macro id="custom_fields_macros::custom_fields_view"
            arg-type="users"
            arg-group="contact"
            arg-set="{$user.Profile.custom_fields}"
            arg-additionalFilters="{{ ['message'] }}"
            arg-valueClass="pairs pairs--justified" />
    </xf:if>
</xf:if>

Add this code below it:
HTML:
<xf:if is="$xf.visitor.canViewResources() AND $user.xfrm_resource_count">
    <dl class="pairs pairs--justified">
        <dt>{{ phrase('xfrm_resources') }}</dt>
        <dd><a href="{{ link('resources/authors', $user) }}" id="resources">{$user.xfrm_resource_count}</a></dd>
    </dl>
</xf:if>
 
Solution
You can edit the message_macros template:

Find around line 86
HTML:
<xf:if is="$extras.custom_fields">
    <xf:macro id="custom_fields_macros::custom_fields_values"
        arg-type="users"
        arg-group="personal"
        arg-set="{$user.Profile.custom_fields}"
        arg-additionalFilters="{{ ['message'] }}"
        arg-valueClass="pairs pairs--justified" />
    <xf:if is="$user.canViewIdentities()">
        <xf:macro id="custom_fields_macros::custom_fields_view"
            arg-type="users"
            arg-group="contact"
            arg-set="{$user.Profile.custom_fields}"
            arg-additionalFilters="{{ ['message'] }}"
            arg-valueClass="pairs pairs--justified" />
    </xf:if>
</xf:if>

Add this code below it:
HTML:
<xf:if is="$xf.visitor.canViewResources() AND $user.xfrm_resource_count">
    <dl class="pairs pairs--justified">
        <dt>{{ phrase('xfrm_resources') }}</dt>
        <dd><a href="{{ link('resources/authors', $user) }}" id="resources">{$user.xfrm_resource_count}</a></dd>
    </dl>
</xf:if>
works like a charm, thanks nick!
 
Back
Top Bottom