inherit
245731
0
Aug 14, 2020 22:07:46 GMT -8
rossi
23
June 2017
rossi
|
Post by rossi on Jun 15, 2017 18:52:51 GMT -8
basically what i wanted to do is give the ability for staff to change their own (or other members) name colors without having to give them the permissions necessary to edit it from the admin panel. the only way i could figure out how to do it is to use a custom profile field, set it to staff only, then plug it into the mini-profile template
{if $[user.is_banned]} <span style="text-decoration: line-through;"> $[user] </span> {else} <span {foreach $[user.mini_custom_field]} {if $[user.mini_custom_field.name] == "Name Color"} style="color: $[user.mini_custom_field.value]" {/if} {/foreach} > $[user] </span> {/if} first of all, it works, but imo it's too messy/hacky and i can't get a handle on how to format it. the single <span> tag alone is broken into 3 lines due to how it's currently formatted
would there be a cleaner way to accomplish the same thing?
edit: the code tag doesnt want to include my indentation for some reason, but its there
|
|
Kami
Forum Cat
Posts: 40,201
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,201
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jun 15, 2017 19:12:18 GMT -8
Unfortunately, no, there isn't a cleaner way to do this. rhe only way to change a user's name colour otherwise is with access to a plugin or the theme CSS which would mean access to the admin panel.
|
|