0%
OneHub

Tutorial Animated flashing online and offline frame avatar

New threads Top posters New members General forum statistics

    • Thread
      Forum
      Messages
      View
      Date
      By
      Last reply
  • Loading…
  • Loading…
  • Forum statistics

    Threads
    228
    Messages
    286
    Members
    11
    Latest member
    PuNkReAS
    Member time online
    1d 7h 42m
223 0 0

OneHub

SUPER ADMIN
Joined
Sep 3, 2025
Messages
267
Reaction score
17
5 MONTHS
5 MONTHS OF SERVICE
Result:
1758650347792.gif

Animated flashing online and offline frame


Open the message_macros template of the theme you are using and find the following code:
CSS:
<xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />

[ATTACH type="full" alt="Animated flashing online and offline frame-1.webp"]20[/ATTACH]
Replace with the following code:

CSS:
<xf:if is="$xf.options.showMessageOnlineStatus && $user && $user.isOnline()"> <div class="onehub-avatar2"> <div class="onehub-avatar-border2"> <xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="image" /> </div> </div> <xf:else /> <div class="onehub-avatar"> <div class="onehub-avatar-border"> <xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="image" /> </div> </div> </xf:if>

Add the following code to your theme's extra.less template:

CSS:
/* avata on off */
.onehub-avatar-border {
display: block; border-radius: 50%; border: 6px solid rgba(255, 0, 0, 0.7); /* Kırmızı */ animation: borderBlinkRed 2s infinite alternate;} .onehub-avatar-border2 {
display: block; border-radius: 50%; border: 6px solid rgba(0, 255, 0, 0.7); /* Yeşil */ animation: borderBlinkGreen 2s infinite alternate;} @keyframes borderBlinkRed {
0% { border-color: rgba(255, 0, 0, 0.7); }
100% { border-color: rgba(255, 0, 0, 0.2); }} @keyframes borderBlinkGreen {
0% { border-color: rgba(0, 255, 0, 0.7);} 100% {border-color: rgba(0, 255, 0, 0.2);}} @media (max-width: @xf-publicNavCollapseWidth) {
.onehub-avatar { padding: 2px; }
.onehub-avatar-border { border-width: 2px;} .onehub-avatar2 { padding: 2px; }
.onehub-avatar-border2 {border-width: 2px; }}

/* avata on off */
 
Last edited:

Trending content

Back
Top Bottom