inherit
140147
0
Nov 19, 2024 5:07:22 GMT -8
Nscalerr
Throw me to the wolves and I'll return leading the pack!
3,043
May 2009
nscalerr
|
Post by Nscalerr on Jan 13, 2017 23:18:20 GMT -8
Saw this in another thread and it sounds like a great idea, but it never actually went anywhere with that thread. Green light around avatar when onlineJust wondering if it is doable Kami or if something better can be done ? This is what I have come up with so far. {if $[user.is_online] && $[user.avatar]}<div class="avatar" style="background: #00BB00; border-radius: 100%; margin-bottom: 5px;">$[user.avatar]</div>{/if} {if !$[user.is_online] && $[user.avatar]}<div class="avatar" style="background: #DD0000; border-radius: 100%; margin-bottom: 5px;">$[user.avatar]</div>{/if}
|
|
Kami
Forum Cat
Posts: 40,204
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,204
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jan 14, 2017 1:12:30 GMT -8
Is this just for mini profiles or...?
|
|
inherit
140147
0
Nov 19, 2024 5:07:22 GMT -8
Nscalerr
Throw me to the wolves and I'll return leading the pack!
3,043
May 2009
nscalerr
|
Post by Nscalerr on Jan 14, 2017 1:17:14 GMT -8
Oops sorry Kami - yes just for the mini profiles.
|
|
Kami
Forum Cat
Posts: 40,204
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,204
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jan 14, 2017 1:18:51 GMT -8
Im about to head off to bed but if this isn't answered when i wake up i'll post my code :)
|
|
inherit
140147
0
Nov 19, 2024 5:07:22 GMT -8
Nscalerr
Throw me to the wolves and I'll return leading the pack!
3,043
May 2009
nscalerr
|
Post by Nscalerr on Jan 14, 2017 1:28:41 GMT -8
Ok Thanks. Have a good sleep.
|
|
Kami
Forum Cat
Posts: 40,204
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,204
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jan 14, 2017 10:14:03 GMT -8
Nscalerr - here's what I did: {if $[user.avatar]} <div class="avatar" style="{if $[user.is_online]}border: 5px solid #ff0000;{else}border: 5px solid #000;{/if}">$[user.avatar]</div><br /> To Edit: {if $[user.is_online]}border: 5px solid #ff0000;{else}border: 5px solid #000;{/if}red text for online users blue text for offline users this will accept any inline style, with the caveat that it might take a second to load since inline styles aren't cached by the browser. In action:
|
|
inherit
140147
0
Nov 19, 2024 5:07:22 GMT -8
Nscalerr
Throw me to the wolves and I'll return leading the pack!
3,043
May 2009
nscalerr
|
Post by Nscalerr on Jan 14, 2017 18:21:56 GMT -8
Thanks Kami all working well. Using the code below in the end. {if $[user.avatar]}<div class="avatar" style="{if $[user.is_online]}border: 1px solid #00BB00; border-radius: 100%; -moz-border-radius: 100%; -webkit-border-radius: 100%;{else}border: 1px solid #DD0000;border-radius: 100%; -moz-border-radius: 100%; -webkit-border-radius: 100%;{/if}">$[user.avatar]</div><br />{/if}
|
|
Kami
Forum Cat
Posts: 40,204
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,204
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jan 14, 2017 19:27:10 GMT -8
If both are rounded you can put that css outside the if statement. no point to have something identical be conditional. so --
border-radius:100%; {if $[user.is_online}...
|
|