Post by Riley on Jun 13, 2021 11:45:37 GMT -8
Avatars have always jacked me up; I never know how to go about them when they're not in the profile or mini-profile. Just can't tame them.
Here is what I'm trying to code. (Top for guests, bottom alternative for members logged in.)
I've done the guest code well enough with an if/else, but I'm getting stumped on how to go about the member avatar.
Here's how being logged in appears (excuse the different text, I'm still figuring out the ~ vibe ~). However, the avatar only appears when I'm on the profile tab instead of on every page like I need it to be as it's included in the site header.
Here is the code from my forum layout that involves this section.
{if !$[current_user.is_member]}
<!-- IF NOT LOGGED IN -->
<table><tbody><tr>
<td><div class="login-area">
{if $[login_link] || $[register_link]}
$[login_link]{if $[login_link] && $[register_link]} or {/if}$[register_link]
{/if}</div></td><td><div class="login-default-av">?</div></td>
</tr></tbody></table>
{else}
<!-- IF LOGGED IN -->
<table><tbody><tr>
<td><div class="login-area">
be kind, warrior.<br>$[logout_link]</div></td>
<td><div class="login-member-av">$[user.avatar]</div></td>
</tr></tbody></table>
{/if}
The only property in my login-member-av class is max-width:50% in my failed attempt to try to scale the avatar down. I'll be making the avatar a hyperlink when the issue is sorted because that's one thing I can do for an avatar easily enough.
If I could get a point in the right direction, that would be fantastic! Many thanks in advance!