inherit
151650
0
Jul 29, 2018 18:13:48 GMT -8
• Ambrose •
1,077
February 2010
shoggard3
|
Post by • Ambrose • on Jul 7, 2019 18:42:05 GMT -8
How do I add a specific avatar and hover image for guests when they visit my forum? I know there's a way to do it, I just can't remember. =(
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 7, 2019 19:27:56 GMT -8
{if $[user.is_guest]} ... Guest profile {else} ... User profile {/if}
|
|
inherit
151650
0
Jul 29, 2018 18:13:48 GMT -8
• Ambrose •
1,077
February 2010
shoggard3
|
Post by • Ambrose • on Jul 7, 2019 22:17:46 GMT -8
So when I include that, I include the hover image into it too? Such as
{if $[user.is_guest]} Hover Image URL Default Avatar {else} User Profile {/if}
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 8, 2019 10:08:55 GMT -8
This statement says if the user is a guest, show this profile; otherwise, show the member (default) profile. If you have a hover and you want it to appear on both guest and member profiles, it would be efficient to do something like this: <div class="$[miniprofile_class]"> <div class="mini-profile__hover"> {if $[user.is_guest]} ... Guest hover content {else} ... Member hover content {/if} </div> {if $[user.avatar]} <div class="mini-profile__avatar"> $[user.avatar] </div> {/if} <div class="mini-profile__name"> <span>$[user]</span> {if $[user.is_guest]}<span class="mini-profile__name--small">Guest</span>{/if} {if $[user.is_deleted]}<span class="mini-profile__name--small">Deleted Member</span>{/if} </div> </div> .mini-profile { width: 200px; overflow: hidden; position: relative; }
.mini-profile__hover { background: rgba(0, 0, 0, 0.5); width: 200px; height: 300px; opacity: 0; position: absolute; top: 0; left: 0; z-index: 101; } .mini-profile:hover > .mini-profile__hover { opacity: 1; }
.mini-profile__avatar { width: 200px; height: 300px; overflow: hidden; vertical-align: middle; } .mini-profile__avatar > .avatar-wrapper { width: 200px; height: 300px; } .mini-profile__avatar > .avatar-wrapper > img { width: 200px; max-width: none; height: 300px; max-height: none; }
.mini-profile__name { background-color: @title_bar_background_color; padding: 20px; color: @title_text_color; font: @title_text_font; text-align: center; } .mini-profile__name--small { padding-top: 8px; font-size: 12px; } .mini-profile__name > span { display: block; } codepen.io/ebbymac/pen/437d06bab7a0badc5cbc9e7be6aecd94
|
|