XenForo 2.0 Years of Service Modification (cracked.io Like)

ForumFlake

Well-known member
Registered
Joined
Feb 8, 2023
Messages
79
Points
8

Reputation:

also how can I have different colors for each one. They are all the same color, 1 month, 2 month, etc.
 

ForumFlake

Well-known member
Registered
Joined
Feb 8, 2023
Messages
79
Points
8

Reputation:

also how can I have different colors for each one. They are all the same color, 1 month, 2 month, etc.
ForumFlakeFigured out how to do the different colors. This is completed. Just trying to straighten the 2 months of flaking out above. like staff team and administrator badge. and even like above by OP.
 
View previous replies…

ForumFlake

Well-known member
Registered
Joined
Feb 8, 2023
Messages
79
Points
8

Reputation:

Figured out how to do the different colors. This is completed. Just trying to straighten the 2 months of flaking out above. like staff team and administrator badge. and even like above by OP.
ForumFlakeI have figured all the coding out, The only one I am having issues with is Yearly how can I do years of flaking to be displayed.
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
793
Points
153

Reputation:

I have figured all the coding out, The only one I am having issues with is Yearly how can I do years of flaking to be displayed.
ForumFlakeWhen a member reaches the registered length of 12 months, it will display. If you want to manually manipulate this for each user, then you would need to get [MMO] Edit User Join Date
 

ForumFlake

Well-known member
Registered
Joined
Feb 8, 2023
Messages
79
Points
8

Reputation:

How can I get the postbit like this? The boxes around the posts, trophies, etc.
 

ShieldX

Well-known member
Registered
Joined
Mar 27, 2022
Messages
540
Points
53

Reputation:

Hello,

A friend of mine coded that for me a while back for my theme, thought of sharing it with the greatest XF Nulled community to its existence.
It's a hard-code solution, I am pretty sure you can achieve the same with trophies + user pomotions, but yeah. Here is the code for lazy people.

HTML:
## Add after <xf:macro name="user_info" arg-user="!" arg-fallbackName=""> ###

<xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
<xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 365)) }}</xf:set>

## Add at the bottom of your postbit ##

<xf:if is="$yearsOld >= '1'">
            <div class="service-tag type-year-{$yearsOld}">{$yearsOld} years of service</div>
        <xf:elseif is="$monthsOld >= '1'" />
            <div class="service-tag type-month-{$monthsOld}">{$monthsOld} months of service</div>
    </xf:if>

CSS:
/*-------------------------------------------------------------------------*/
/* Years of Service
/*-------------------------------------------------------------------------*/

.type-month-1,
.type-month-2,
.type-month-3,
.type-month-4,
.type-month-5,
.type-month-6,
.type-month-7,
.type-month-8,
.type-month-9,
.type-month-10,
.type-month-11
 {
    color: hsl(199, 100%, 54%);
    border-bottom-style: solid;
    border-width: 2px;
}
.service-tag {
    order: 9;

    width: 85%;
    padding: 4px 6px;
    text-align: center;
    border-radius: 1px;
    font-size: 11px;
    text-shadow: none;
    text-transform: uppercase;
    margin: 3px auto 0 auto;
    margin-bottom: 5px;
    font-weight: bold;
    background: hsl(0, 0%, 7%);
}

For years, it's pretty much self-explanatory, you can take the CSS from above as framework.



xsSwxj3.png


Demo: https://wowemu.org/threads/valentines-day-2023-event.560/
Note: My theme is custom-made and is not for sale. I got quite a lot of messages since I posted this guide, just wanted to make it clear.
Splichowhat reputation addon you using ?
 

kuttysoft

Member
Registered
Joined
Aug 24, 2021
Messages
10
Points
13

Reputation:

i dont know this is not work for me
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
793
Points
153

Reputation:

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
793
Points
153

Reputation:

Updated the mod. Please get the new code from the first post, thank you.
 

kuttysoft

Member
Registered
Joined
Aug 24, 2021
Messages
10
Points
13

Reputation:

Screenshot_497.png


not working

Code:
<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">
    
    <xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
<xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 12)) }}</xf:set>

    <header class="message-user"
        {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>

        <xf:if is="$includeMicrodata">
            <meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
            <xf:if is="$user">
                <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
            </xf:if>
        </xf:if>
 
Last edited:

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
793
Points
153

Reputation:

kuttysoftYou have to adjust your css. The code I shared may be not fitting with your postbit.
Also make sure you add the code below your message-userExtras.

Plus, half of the code is missing, please check the first post again for the full instructions.
 
Last edited:

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,529
Points
523

Reputation:

View attachment 36894

not working

Code:
<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">
    
    <xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
<xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 12)) }}</xf:set>

    <header class="message-user"
        {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>

        <xf:if is="$includeMicrodata">
            <meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
            <xf:if is="$user">
                <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
            </xf:if>
        </xf:if>
kuttysoftplease follow the instruction in the first post in total, some of the code seems to be still missing in your changes @kuttysoft
 

kuttysoft

Member
Registered
Joined
Aug 24, 2021
Messages
10
Points
13

Reputation:

please follow the instruction in the first post in total, some of the code seems to be still missing in your changes @kuttysoft
BattleKingI think i am correctly add all codes can you check once

<xf:else />
<dt>{{ phrase('website') }}</dt>
</xf:if>
<dd data-xf-init="tooltip" title="{$user.Profile.website|url('host', phrase('visit_site'))}"><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url_display('host', phrase('visit_site'))}</a></dd>
</dl>
</xf:if>
<xf:if is="$extras.custom_fields">

<xf:if is="$user.canViewIdentities()">
<xf:macro template="custom_fields_macros" name="custom_fields_view"
arg-type="users"
arg-group="contact"
arg-set="{$user.Profile.custom_fields}"
arg-additionalFilters="{{ ['message'] }}"
arg-valueClass="pairs pairs--justified"
/>
<p>
<b>Awards</b>
</p>
</xf:if>
</xf:if>
</xf:contentcheck>
</div>
<xf:if is="$monthsOld < '12'">
<div style="margin-top:5px;margin-bottom:5px;">
<div class="user-service user-service--postbit ">
<div class="type-month-{$monthsOld}">{$monthsOld} months of service</div>
</div>
</div>
<xf:else />
<div style="margin-top:5px;margin-bottom:5px;">
<div class="user-service user-service--postbit">
<div class="type-year-{$yearsOld}">{$yearsOld} years of service</div>
</div>
</div>
</xf:if>
<xf:if is="{{ property('uix_collapseExtraInfo')}}">
</div>
<div class="thThreads__userExtra--toggle">
<a href="javascript:;" class="thThreads__userExtra--trigger" data-xf-click="ththreads-userextra-trigger"></a>
</div>
</xf:if>
</xf:if>
</xf:if>
</div>

<span class="message-userArrow"></span>
</section>
</xf:macro>

<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">

<xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
<xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 12)) }}</xf:set>

<header class="message-user"
{{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>

<xf:if is="$includeMicrodata">
<meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
<xf:if is="$user">
<meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
</xf:if>
</xf:if>

<div class="message-avatar">
<div class="message-avatar-wrapper">
<xf:avatar user="$user" size="s" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
</div>
</div>
<span class="message-userArrow"></span>
</header>
</xf:macro>

<xf:macro name="attachments" arg-attachments="!" arg-message="!" arg-canView="!">
<xf:if contentcheck="true">
<xf:css src="attachments.less" />
<section class="message-attachments">
<h4 class="block-textHeader">{{ phrase('attachments') }}</h4>
<ul class="attachmentList">
<xf:contentcheck>
<xf:foreach loop="$attachments" value="$attachment" if="!$message.isAttachmentEmbedded($attachment)">
<xf:macro template="attachment_macros" name="attachment_list_item"
arg-attachment="{$attachment}"
arg-canView="{$canView}" />
</xf:foreach>
</xf:contentcheck>
</ul>
</section>
</xf:if>
</xf:macro>

<xf:macro name="signature" arg-user="!">
<xf:if is="$xf.visitor.Option.content_show_signature AND $user.Profile.signature">
<xf:if contentcheck="true">
<aside class="message-signature">
<div class="uix_signatureExpand">{{ phrase('th_uix_expand_signature')}}</div>
<xf:contentcheck>
{{ bb_code($user.Profile.signature, 'user:signature', $user) }}
</xf:contentcheck>
</aside>
</xf:if>
</xf:if>
</xf:macro>
 

kuttysoft

Member
Registered
Joined
Aug 24, 2021
Messages
10
Points
13

Reputation:

This is my orginal Message_macros @Splicho

Code:
<xf:macro name="user_info"
    arg-user="!"
    arg-fallbackName=""
    arg-includeMicrodata="{{ true }}"
    arg-itemProp="">

    <section class="message-user"
        {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>

        <xf:if is="$includeMicrodata && $user">
            <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
        </xf:if>

        <div class="message-avatar {{ ($xf.options.showMessageOnlineStatus && $user && $user.isOnline()) ? 'message-avatar--online' : '' }}">
            <div class="message-avatar-wrapper">
                <xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
                <xf:if is="$xf.options.showMessageOnlineStatus && $user && $user.isOnline()">
                    <span class="message-avatar-online" tabindex="0" data-xf-init="tooltip" data-trigger="auto" title="{{ phrase('online_now')|for_attr }}"></span>
                </xf:if>
            </div>
        </div>
        <div class="message-userDetails">
            <h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'name' : '' }}" /></h4>
            <xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
            <xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
        </div>
        <xf:if is="$user.user_id">
            <xf:set var="$extras" value="{{ property('messageUserElements') }}" />
            <xf:if contentcheck="true">
                <div class="message-userExtras">
                <xf:contentcheck>
                    <xf:if is="$extras.register_date">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('joined') }}</dt>
                            <dd>{{ date($user.register_date) }}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.message_count">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('messages') }}</dt>
                            <dd>{$user.message_count|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.solutions AND $user.question_solution_count">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('solutions') }}</dt>
                            <dd>{$user.question_solution_count|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.reaction_score">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('reaction_score') }}</dt>
                            <dd>{$user.reaction_score|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.trophy_points && $xf.options.enableTrophies">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('points') }}</dt>
                            <dd>{$user.trophy_points|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.age && $user.Profile.age">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('age') }}</dt>
                            <dd>{$user.Profile.age}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.location && $user.Profile.location">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('location') }}</dt>
                            <dd>
                                <xf:if is="$xf.options.geoLocationUrl">
                                    <a href="{{ link('misc/location-info', '', {'location': $user.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$user.Profile.location}</a>
                                <xf:else />
                                    {$user.Profile.location}
                                </xf:if>
                            </dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.website && $user.Profile.website">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('website') }}</dt>
                            <dd><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url_display('host', phrase('visit_site'))}</a></dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.custom_fields">
                        <xf:macro template="custom_fields_macros" name="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 template="custom_fields_macros" name="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>
                </xf:contentcheck>
                </div>
            </xf:if>
        </xf:if>
        <span class="message-userArrow"></span>
    </section>
</xf:macro>

<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">
    <header class="message-user"
        {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>

        <xf:if is="$includeMicrodata">
            <meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
            <xf:if is="$user">
                <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
            </xf:if>
        </xf:if>

        <div class="message-avatar">
            <div class="message-avatar-wrapper">
                <xf:avatar user="$user" size="s" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
            </div>
        </div>
        <span class="message-userArrow"></span>
    </header>
</xf:macro>

<xf:macro name="attachments" arg-attachments="!" arg-message="!" arg-canView="!">
    <xf:if contentcheck="true">
        <xf:css src="attachments.less" />
        <section class="message-attachments">
            <h4 class="block-textHeader">{{ phrase('attachments') }}</h4>
            <ul class="attachmentList">
                <xf:contentcheck>
                    <xf:foreach loop="$attachments" value="$attachment" if="!$message.isAttachmentEmbedded($attachment)">
                        <xf:macro template="attachment_macros" name="attachment_list_item"
                            arg-attachment="{$attachment}"
                            arg-canView="{$canView}" />
                    </xf:foreach>
                </xf:contentcheck>
            </ul>
        </section>
    </xf:if>
</xf:macro>

<xf:macro name="signature" arg-user="!">
    <xf:if is="$xf.visitor.Option.content_show_signature AND $user.Profile.signature">
        <xf:if contentcheck="true">
            <aside class="message-signature">
            <xf:contentcheck>
                {{ bb_code($user.Profile.signature, 'user:signature', $user) }}
            </xf:contentcheck>
            </aside>
        </xf:if>
    </xf:if>
</xf:macro>
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
793
Points
153

Reputation:

This is my orginal Message_macros @Splicho

Code:
<xf:macro name="user_info"
    arg-user="!"
    arg-fallbackName=""
    arg-includeMicrodata="{{ true }}"
    arg-itemProp="">

    <section class="message-user"
        {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>

        <xf:if is="$includeMicrodata && $user">
            <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
        </xf:if>

        <div class="message-avatar {{ ($xf.options.showMessageOnlineStatus && $user && $user.isOnline()) ? 'message-avatar--online' : '' }}">
            <div class="message-avatar-wrapper">
                <xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
                <xf:if is="$xf.options.showMessageOnlineStatus && $user && $user.isOnline()">
                    <span class="message-avatar-online" tabindex="0" data-xf-init="tooltip" data-trigger="auto" title="{{ phrase('online_now')|for_attr }}"></span>
                </xf:if>
            </div>
        </div>
        <div class="message-userDetails">
            <h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'name' : '' }}" /></h4>
            <xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
            <xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
        </div>
        <xf:if is="$user.user_id">
            <xf:set var="$extras" value="{{ property('messageUserElements') }}" />
            <xf:if contentcheck="true">
                <div class="message-userExtras">
                <xf:contentcheck>
                    <xf:if is="$extras.register_date">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('joined') }}</dt>
                            <dd>{{ date($user.register_date) }}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.message_count">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('messages') }}</dt>
                            <dd>{$user.message_count|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.solutions AND $user.question_solution_count">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('solutions') }}</dt>
                            <dd>{$user.question_solution_count|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.reaction_score">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('reaction_score') }}</dt>
                            <dd>{$user.reaction_score|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.trophy_points && $xf.options.enableTrophies">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('points') }}</dt>
                            <dd>{$user.trophy_points|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.age && $user.Profile.age">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('age') }}</dt>
                            <dd>{$user.Profile.age}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.location && $user.Profile.location">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('location') }}</dt>
                            <dd>
                                <xf:if is="$xf.options.geoLocationUrl">
                                    <a href="{{ link('misc/location-info', '', {'location': $user.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$user.Profile.location}</a>
                                <xf:else />
                                    {$user.Profile.location}
                                </xf:if>
                            </dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.website && $user.Profile.website">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('website') }}</dt>
                            <dd><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url_display('host', phrase('visit_site'))}</a></dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.custom_fields">
                        <xf:macro template="custom_fields_macros" name="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 template="custom_fields_macros" name="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>
                </xf:contentcheck>
                </div>
            </xf:if>
        </xf:if>
        <span class="message-userArrow"></span>
    </section>
</xf:macro>

<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">
    <header class="message-user"
        {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>

        <xf:if is="$includeMicrodata">
            <meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
            <xf:if is="$user">
                <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
            </xf:if>
        </xf:if>

        <div class="message-avatar">
            <div class="message-avatar-wrapper">
                <xf:avatar user="$user" size="s" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
            </div>
        </div>
        <span class="message-userArrow"></span>
    </header>
</xf:macro>

<xf:macro name="attachments" arg-attachments="!" arg-message="!" arg-canView="!">
    <xf:if contentcheck="true">
        <xf:css src="attachments.less" />
        <section class="message-attachments">
            <h4 class="block-textHeader">{{ phrase('attachments') }}</h4>
            <ul class="attachmentList">
                <xf:contentcheck>
                    <xf:foreach loop="$attachments" value="$attachment" if="!$message.isAttachmentEmbedded($attachment)">
                        <xf:macro template="attachment_macros" name="attachment_list_item"
                            arg-attachment="{$attachment}"
                            arg-canView="{$canView}" />
                    </xf:foreach>
                </xf:contentcheck>
            </ul>
        </section>
    </xf:if>
</xf:macro>

<xf:macro name="signature" arg-user="!">
    <xf:if is="$xf.visitor.Option.content_show_signature AND $user.Profile.signature">
        <xf:if contentcheck="true">
            <aside class="message-signature">
            <xf:contentcheck>
                {{ bb_code($user.Profile.signature, 'user:signature', $user) }}
            </xf:contentcheck>
            </aside>
        </xf:if>
    </xf:if>
</xf:macro>
kuttysoft Works fine for me.


HTML:
<xf:macro name="user_info"
   arg-user="!"
   arg-fallbackName=""
   arg-includeMicrodata="{{ true }}"
   arg-itemProp="">
   <xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
   <xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 12)) }}</xf:set>
   <section class="message-user"
   {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>
   <xf:if is="$includeMicrodata && $user">
      <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
   </xf:if>
   <div class="message-avatar {{ ($xf.options.showMessageOnlineStatus && $user && $user.isOnline()) ? 'message-avatar--online' : '' }}">
      <div class="message-avatar-wrapper">
         <xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
         <xf:if is="$xf.options.showMessageOnlineStatus && $user && $user.isOnline()">
            <span class="message-avatar-online" tabindex="0" data-xf-init="tooltip" data-trigger="auto" title="{{ phrase('online_now')|for_attr }}"></span>
         </xf:if>
      </div>
   </div>
   <div class="message-userDetails">
      <h4 class="message-name">
         <xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'name' : '' }}" />
      </h4>
      <xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
      <xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
   </div>
   <xf:if is="$user.user_id">
      <xf:set var="$extras" value="{{ property('messageUserElements') }}" />
      <xf:if contentcheck="true">
         <div class="message-userExtras">
            <xf:contentcheck>
               <xf:if is="$extras.register_date">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('joined') }}</dt>
                     <dd>{{ date($user.register_date) }}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.message_count">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('messages') }}</dt>
                     <dd>{$user.message_count|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.solutions AND $user.question_solution_count">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('solutions') }}</dt>
                     <dd>{$user.question_solution_count|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.reaction_score">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('reaction_score') }}</dt>
                     <dd>{$user.reaction_score|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.trophy_points && $xf.options.enableTrophies">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('points') }}</dt>
                     <dd>{$user.trophy_points|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.age && $user.Profile.age">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('age') }}</dt>
                     <dd>{$user.Profile.age}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.location && $user.Profile.location">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('location') }}</dt>
                     <dd>
                        <xf:if is="$xf.options.geoLocationUrl">
                           <a href="{{ link('misc/location-info', '', {'location': $user.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$user.Profile.location}</a>
                           <xf:else />
                           {$user.Profile.location}
                        </xf:if>
                     </dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.website && $user.Profile.website">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('website') }}</dt>
                     <dd><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url_display('host', phrase('visit_site'))}</a></dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.custom_fields">
                  <xf:macro template="custom_fields_macros" name="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 template="custom_fields_macros" name="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>
            </xf:contentcheck>
         </div>
      </xf:if>
   </xf:if>
   <span class="message-userArrow"></span>
   <xf:if is="$monthsOld < '12'">
      <div style="margin-top:5px;margin-bottom:5px;">
         <div class="service-tag user-service--postbit ">
            <div class="type-month-{$monthsOld}">{$monthsOld} months of service</div>
         </div>
      </div>
      <xf:else />
      <div style="margin-top:5px;margin-bottom:5px;">
         <div class="service-tag user-service--postbit">
            <div class="type-year-{$yearsOld}">{$yearsOld} years of service</div>
         </div>
      </div>
   </xf:if>
   </section>
</xf:macro>
<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">
   <header class="message-user"
   {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>
   <xf:if is="$includeMicrodata">
      <meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
      <xf:if is="$user">
         <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
      </xf:if>
   </xf:if>
   <div class="message-avatar">
      <div class="message-avatar-wrapper">
         <xf:avatar user="$user" size="s" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
      </div>
   </div>
   <span class="message-userArrow"></span>
   </header>
</xf:macro>
<xf:macro name="attachments" arg-attachments="!" arg-message="!" arg-canView="!">
   <xf:if contentcheck="true">
      <xf:css src="attachments.less" />
      <section class="message-attachments">
         <h4 class="block-textHeader">{{ phrase('attachments') }}</h4>
         <ul class="attachmentList">
            <xf:contentcheck>
               <xf:foreach loop="$attachments" value="$attachment" if="!$message.isAttachmentEmbedded($attachment)">
                  <xf:macro template="attachment_macros" name="attachment_list_item"
                     arg-attachment="{$attachment}"
                     arg-canView="{$canView}" />
               </xf:foreach>
            </xf:contentcheck>
         </ul>
      </section>
   </xf:if>
</xf:macro>
<xf:macro name="signature" arg-user="!">
   <xf:if is="$xf.visitor.Option.content_show_signature AND $user.Profile.signature">
      <xf:if contentcheck="true">
         <aside class="message-signature">
            <xf:contentcheck>
               {{ bb_code($user.Profile.signature, 'user:signature', $user) }}
            </xf:contentcheck>
         </aside>
      </xf:if>
   </xf:if>
</xf:macro>
 
View previous replies…

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,529
Points
523

Reputation:

Works fine for me.


HTML:
<xf:macro name="user_info"
   arg-user="!"
   arg-fallbackName=""
   arg-includeMicrodata="{{ true }}"
   arg-itemProp="">
   <xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
   <xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 12)) }}</xf:set>
   <section class="message-user"
   {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>
   <xf:if is="$includeMicrodata && $user">
      <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
   </xf:if>
   <div class="message-avatar {{ ($xf.options.showMessageOnlineStatus && $user && $user.isOnline()) ? 'message-avatar--online' : '' }}">
      <div class="message-avatar-wrapper">
         <xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
         <xf:if is="$xf.options.showMessageOnlineStatus && $user && $user.isOnline()">
            <span class="message-avatar-online" tabindex="0" data-xf-init="tooltip" data-trigger="auto" title="{{ phrase('online_now')|for_attr }}"></span>
         </xf:if>
      </div>
   </div>
   <div class="message-userDetails">
      <h4 class="message-name">
         <xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'name' : '' }}" />
      </h4>
      <xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
      <xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
   </div>
   <xf:if is="$user.user_id">
      <xf:set var="$extras" value="{{ property('messageUserElements') }}" />
      <xf:if contentcheck="true">
         <div class="message-userExtras">
            <xf:contentcheck>
               <xf:if is="$extras.register_date">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('joined') }}</dt>
                     <dd>{{ date($user.register_date) }}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.message_count">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('messages') }}</dt>
                     <dd>{$user.message_count|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.solutions AND $user.question_solution_count">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('solutions') }}</dt>
                     <dd>{$user.question_solution_count|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.reaction_score">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('reaction_score') }}</dt>
                     <dd>{$user.reaction_score|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.trophy_points && $xf.options.enableTrophies">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('points') }}</dt>
                     <dd>{$user.trophy_points|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.age && $user.Profile.age">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('age') }}</dt>
                     <dd>{$user.Profile.age}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.location && $user.Profile.location">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('location') }}</dt>
                     <dd>
                        <xf:if is="$xf.options.geoLocationUrl">
                           <a href="{{ link('misc/location-info', '', {'location': $user.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$user.Profile.location}</a>
                           <xf:else />
                           {$user.Profile.location}
                        </xf:if>
                     </dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.website && $user.Profile.website">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('website') }}</dt>
                     <dd><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url_display('host', phrase('visit_site'))}</a></dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.custom_fields">
                  <xf:macro template="custom_fields_macros" name="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 template="custom_fields_macros" name="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>
            </xf:contentcheck>
         </div>
      </xf:if>
   </xf:if>
   <span class="message-userArrow"></span>
   <xf:if is="$monthsOld < '12'">
      <div style="margin-top:5px;margin-bottom:5px;">
         <div class="service-tag user-service--postbit ">
            <div class="type-month-{$monthsOld}">{$monthsOld} months of service</div>
         </div>
      </div>
      <xf:else />
      <div style="margin-top:5px;margin-bottom:5px;">
         <div class="service-tag user-service--postbit">
            <div class="type-year-{$yearsOld}">{$yearsOld} years of service</div>
         </div>
      </div>
   </xf:if>
   </section>
</xf:macro>
<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">
   <header class="message-user"
   {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>
   <xf:if is="$includeMicrodata">
      <meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
      <xf:if is="$user">
         <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
      </xf:if>
   </xf:if>
   <div class="message-avatar">
      <div class="message-avatar-wrapper">
         <xf:avatar user="$user" size="s" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
      </div>
   </div>
   <span class="message-userArrow"></span>
   </header>
</xf:macro>
<xf:macro name="attachments" arg-attachments="!" arg-message="!" arg-canView="!">
   <xf:if contentcheck="true">
      <xf:css src="attachments.less" />
      <section class="message-attachments">
         <h4 class="block-textHeader">{{ phrase('attachments') }}</h4>
         <ul class="attachmentList">
            <xf:contentcheck>
               <xf:foreach loop="$attachments" value="$attachment" if="!$message.isAttachmentEmbedded($attachment)">
                  <xf:macro template="attachment_macros" name="attachment_list_item"
                     arg-attachment="{$attachment}"
                     arg-canView="{$canView}" />
               </xf:foreach>
            </xf:contentcheck>
         </ul>
      </section>
   </xf:if>
</xf:macro>
<xf:macro name="signature" arg-user="!">
   <xf:if is="$xf.visitor.Option.content_show_signature AND $user.Profile.signature">
      <xf:if contentcheck="true">
         <aside class="message-signature">
            <xf:contentcheck>
               {{ bb_code($user.Profile.signature, 'user:signature', $user) }}
            </xf:contentcheck>
         </aside>
      </xf:if>
   </xf:if>
</xf:macro>
Splicho0 Month of service should be avoided too!
 

kuttysoft

Member
Registered
Joined
Aug 24, 2021
Messages
10
Points
13

Reputation:

Works fine for me.


HTML:
<xf:macro name="user_info"
   arg-user="!"
   arg-fallbackName=""
   arg-includeMicrodata="{{ true }}"
   arg-itemProp="">
   <xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
   <xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 12)) }}</xf:set>
   <section class="message-user"
   {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>
   <xf:if is="$includeMicrodata && $user">
      <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
   </xf:if>
   <div class="message-avatar {{ ($xf.options.showMessageOnlineStatus && $user && $user.isOnline()) ? 'message-avatar--online' : '' }}">
      <div class="message-avatar-wrapper">
         <xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
         <xf:if is="$xf.options.showMessageOnlineStatus && $user && $user.isOnline()">
            <span class="message-avatar-online" tabindex="0" data-xf-init="tooltip" data-trigger="auto" title="{{ phrase('online_now')|for_attr }}"></span>
         </xf:if>
      </div>
   </div>
   <div class="message-userDetails">
      <h4 class="message-name">
         <xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'name' : '' }}" />
      </h4>
      <xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
      <xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
   </div>
   <xf:if is="$user.user_id">
      <xf:set var="$extras" value="{{ property('messageUserElements') }}" />
      <xf:if contentcheck="true">
         <div class="message-userExtras">
            <xf:contentcheck>
               <xf:if is="$extras.register_date">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('joined') }}</dt>
                     <dd>{{ date($user.register_date) }}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.message_count">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('messages') }}</dt>
                     <dd>{$user.message_count|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.solutions AND $user.question_solution_count">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('solutions') }}</dt>
                     <dd>{$user.question_solution_count|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.reaction_score">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('reaction_score') }}</dt>
                     <dd>{$user.reaction_score|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.trophy_points && $xf.options.enableTrophies">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('points') }}</dt>
                     <dd>{$user.trophy_points|number}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.age && $user.Profile.age">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('age') }}</dt>
                     <dd>{$user.Profile.age}</dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.location && $user.Profile.location">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('location') }}</dt>
                     <dd>
                        <xf:if is="$xf.options.geoLocationUrl">
                           <a href="{{ link('misc/location-info', '', {'location': $user.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$user.Profile.location}</a>
                           <xf:else />
                           {$user.Profile.location}
                        </xf:if>
                     </dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.website && $user.Profile.website">
                  <dl class="pairs pairs--justified">
                     <dt>{{ phrase('website') }}</dt>
                     <dd><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url_display('host', phrase('visit_site'))}</a></dd>
                  </dl>
               </xf:if>
               <xf:if is="$extras.custom_fields">
                  <xf:macro template="custom_fields_macros" name="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 template="custom_fields_macros" name="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>
            </xf:contentcheck>
         </div>
      </xf:if>
   </xf:if>
   <span class="message-userArrow"></span>
   <xf:if is="$monthsOld < '12'">
      <div style="margin-top:5px;margin-bottom:5px;">
         <div class="service-tag user-service--postbit ">
            <div class="type-month-{$monthsOld}">{$monthsOld} months of service</div>
         </div>
      </div>
      <xf:else />
      <div style="margin-top:5px;margin-bottom:5px;">
         <div class="service-tag user-service--postbit">
            <div class="type-year-{$yearsOld}">{$yearsOld} years of service</div>
         </div>
      </div>
   </xf:if>
   </section>
</xf:macro>
<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">
   <header class="message-user"
   {{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>
   <xf:if is="$includeMicrodata">
      <meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
      <xf:if is="$user">
         <meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
      </xf:if>
   </xf:if>
   <div class="message-avatar">
      <div class="message-avatar-wrapper">
         <xf:avatar user="$user" size="s" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
      </div>
   </div>
   <span class="message-userArrow"></span>
   </header>
</xf:macro>
<xf:macro name="attachments" arg-attachments="!" arg-message="!" arg-canView="!">
   <xf:if contentcheck="true">
      <xf:css src="attachments.less" />
      <section class="message-attachments">
         <h4 class="block-textHeader">{{ phrase('attachments') }}</h4>
         <ul class="attachmentList">
            <xf:contentcheck>
               <xf:foreach loop="$attachments" value="$attachment" if="!$message.isAttachmentEmbedded($attachment)">
                  <xf:macro template="attachment_macros" name="attachment_list_item"
                     arg-attachment="{$attachment}"
                     arg-canView="{$canView}" />
               </xf:foreach>
            </xf:contentcheck>
         </ul>
      </section>
   </xf:if>
</xf:macro>
<xf:macro name="signature" arg-user="!">
   <xf:if is="$xf.visitor.Option.content_show_signature AND $user.Profile.signature">
      <xf:if contentcheck="true">
         <aside class="message-signature">
            <xf:contentcheck>
               {{ bb_code($user.Profile.signature, 'user:signature', $user) }}
            </xf:contentcheck>
         </aside>
      </xf:if>
   </xf:if>
</xf:macro>
Splichoyeah fixed now

Thank you
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
793
Points
153

Reputation:

code miss place First Post method not workd add code
<xf:macro name="user_info"
arg-user="!"
arg-fallbackName=""
arg-includeMicrodata="{{ true }}"
arg-itemProp="">
after this
<xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
<xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 12)) }}</xf:set>
adding will work
kuttysoftIn the first post I mentioned to paste it below this line xD. So next time, read better :)

I'm glad you fixed it!
 
Top