Quantcast
Viewing latest article 3
Browse Latest Browse All 2308

[3.3.x] Styles Support & Discussion • Re: Quick Avatar (page)

Serves me right for not testing it live. Ok, this works:

Code:

{% if S_REGISTERED_USER and (postrow.POSTER_ID == CURRENT_USER_GB) %}                         <a href="./ucp.php?i=ucp_profile&mode=avatar"><i class="icon fa-solid fa-camera" aria-hidden="true"></i>                         </a>                    {% endif %}
It really should have an extra condition to prevent it showing if the user does not have permission to change their avatar. Unfortunately it seems S_AVATARS_ENABLED is only recognised inside UCP, so is no good for this use case. Including that just prevents any output.

Personally I'd include the icon class if you are using an FA icon. There should be no need to wrap the anchor in an extra div. You can style and position the anchor without that. Beats me where people get the idea that everything needs to be wrapped in a div. A lot of the time it's just bloat.

ETA: Sniper's code works too.

Statistics: Posted by Gumboots — Thu Apr 10, 2025 10:22 am



Viewing latest article 3
Browse Latest Browse All 2308

Trending Articles