Difference between revisions of "Extensions:User Borders"

From Lorekeeper Wiki
Jump to navigation Jump to search
(add desc)
(→‎Configuration: Adding information on adjusting avatar sizes and styling)
Tag: 2017 source edit
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Extensioninfobox|title=User Borders|desc=Create borders that users can apply around their icons|auth=CH3RVB, LostInProgres|status=testing|github={{Github|user=ch3rvb|branch=extensions\user-borders}}|LKVer2.1.2|migration=yes|package=no}}
+
{{Extensioninfobox|title=User Borders|desc=Create borders that users can apply around their icons|auth=CH3RVB, LostInProgres|status=testing|github={{Github|user=ch3rvb|branch=extension\user-borders}}|LKVer2.1.2|migration=yes|package=no}}
  
 
Staff can upload borders from the admin panel. Borders are purely cosmetic, and when selected, will appear over the user's site avatar. Borders can appear over or under an avatar based on a setting set upon creation/editing.
 
Staff can upload borders from the admin panel. Borders are purely cosmetic, and when selected, will appear over the user's site avatar. Borders can appear over or under an avatar based on a setting set upon creation/editing.
Line 10: Line 10:
 
<code> php artisan migrate, php artisan update-extension-tracker, php artisan optimize</code>
 
<code> php artisan migrate, php artisan update-extension-tracker, php artisan optimize</code>
 
== Configuration ==
 
== Configuration ==
n/a
+
User-uploaded avatars, by default through the <code>updateAvatar()</code> function in <code>UserService.php</code>, are resized to be 150px by 150px. Avatars when displayed through this extension will be placed in a container with a maximum width of 150px, but the avatar itself will have a 15px solid transparent border applied to them, shrinking them slightly so borders can frame them better.
 +
 
 +
If you happen to change the code in <code>UserService.php</code> to allow for differently-sized avatars, you can either update <code>lorekeeper.css</code> directly or apply styling to the class <code>.user-avatar</code> in a custom stylesheet to adjust its maximum width, and you may also want to adjust the transparent border's width on <code>.user-avatar .avatar</code> as well.
 +
 
 +
The selector <code>.user-avatar .avatar</code>, which targets the avatar image within the container itself, also applies a 50% border radius to make it circular, as well as an aspect ratio of 1 / 1 to keep it square (mostly applicable to the default avatar on Lorekeeper, which is overly large and not square). Both of these can be adjusted freely by site owners as well, whether within the <code>lorekeeper.css</code> stylesheet or in a custom uploaded stylesheet.
 +
 
 
== Usage ==
 
== Usage ==
 
<!-- Is there anything users should know about using your extension? -->
 
<!-- Is there anything users should know about using your extension? -->

Latest revision as of 14:16, 20 August 2024

User Borders
Description Create borders that users can apply around their icons
Author(s) CH3RVB, LostInProgres
Status testing
Github extension\user-borders
LK Version Unspecified
Contains a Migration






Staff can upload borders from the admin panel. Borders are purely cosmetic, and when selected, will appear over the user's site avatar. Borders can appear over or under an avatar based on a setting set upon creation/editing.

Borders can be unlocked or set as default. They can be granted through loot as well as the admin panel. A user can change their border at any time.

Staff members can have their own exclusive borders if desired.

Installation

php artisan migrate, php artisan update-extension-tracker, php artisan optimize

Configuration

User-uploaded avatars, by default through the updateAvatar() function in UserService.php, are resized to be 150px by 150px. Avatars when displayed through this extension will be placed in a container with a maximum width of 150px, but the avatar itself will have a 15px solid transparent border applied to them, shrinking them slightly so borders can frame them better.

If you happen to change the code in UserService.php to allow for differently-sized avatars, you can either update lorekeeper.css directly or apply styling to the class .user-avatar in a custom stylesheet to adjust its maximum width, and you may also want to adjust the transparent border's width on .user-avatar .avatar as well.

The selector .user-avatar .avatar, which targets the avatar image within the container itself, also applies a 50% border radius to make it circular, as well as an aspect ratio of 1 / 1 to keep it square (mostly applicable to the default avatar on Lorekeeper, which is overly large and not square). Both of these can be adjusted freely by site owners as well, whether within the lorekeeper.css stylesheet or in a custom uploaded stylesheet.

Usage

Troubleshooting

Images

See Also