Animated Avatars in threads

by security - 28-07-2015, 08:43 AM
Closed Account
Posts:
13
Joined:
Jul 2015
Likes:
1
Credits:
21
Reputation:
0
2 Years of Service
#1
OP
Posted: 28-07-2015, 08:43 AM (This post was last modified: 28-07-2015, 08:44 AM by security.)
This is a simple template edit that allows animated avatars to show in posts. You have two options here:

1. Forces the size of all avatars to be 96x96
2. Allow avatars to use their aspect ration.

Also there is 2 versions, one that displays the animation to everyone and the other codes won't show animation to guests for faster browsing. [Image: clear.png]

Guest will see animation


Forced 96x96 edit: Open template message_user_info

Find
Code:
<xen:avatar user="$user" size="m" />
Replace with
Code:
<a class="username avatar Av{$user.user_id}l" href="{xen:link members, $user}">
<img src="{xen:helper avatar, $user, l, 'true'}" alt="{$user.username}" height="96px" width="96px" itemprop="photo" />
</a>
Aspect ration edit: Open template message_user_info

Find
Code:
<xen:avatar user="$user" size="m" />
Replace with
Code:
<a class="username avatar Av{$user.user_id}l" href="{xen:link members, $user}">
<img src="{xen:helper avatar, $user, l, 'true'}" alt="{$user.username}" style="max-height:96px;max-width:96px;" itemprop="photo" />
</a>
If guest; do not display animation

Forced 96x96 edit: Open template message_user_info

Find
Code:
<xen:avatar user="$user" size="m" />
Replace with
Code:
<xen:if is="!{$visitor.user_id}">
<xen:avatar user="$user" size="m" />
<xen:else />
<a class="username avatar Av{$user.user_id}l" href="{xen:link members, $user}">
<img src="{xen:helper avatar, $user, l, 'true'}" alt="{$user.username}" height="96px" width="96px" itemprop="photo" />
</a></xen:if>
Aspect ration edit: Open template message_user_info

Find
Code:
<xen:avatar user="$user" size="m" />
Replace with
Code:
<xen:if is="!{$visitor.user_id}">
<xen:avatar user="$user" size="m" />
<xen:else />
<a class="username avatar Av{$user.user_id}l" href="{xen:link members, $user}">
<img src="{xen:helper avatar, $user, l, 'true'}" alt="{$user.username}" style="max-height:96px;max-width:96px;" itemprop="photo" />
</a></xen:if>
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)