Extensions:Character Authorization

From Lorekeeper Wiki
Revision as of 00:34, 24 April 2024 by Cylunny (talk | contribs)
Jump to navigation Jump to search
Character Authorization
Description Allows users to hide their characters from other users, and to authorize only a select 25 users to view them.
Author(s) Cylunny
Status testing
Github extension/character-authorization
LK Version 2.1.3
Contains a Migration






Allows users to hide their characters from other users, and to authorize only a select 25 users/friends to view them. Staff will always be able to see those characters regardless. Logged out visitors will not see them. There are a couple of special cases:

  • on the masterlist, unauthorized characters will be listed with their slug/number, but the image is replaced with the default lorekeeper characters image. The image or name cannot be clicked, the owner is not listed.
  • on user profiles, the character will not show up at all for unauthorized users.
  • for prompts/submissions, the owner can still select the character, but other users cannot add it to submissions.

Installation

Configuration

If you wish to change the default character image on the masterlist to a custom one, you will need to edit the _masterlist_content.blade file and change the image in line 147 to point to your custom image. <a href="#"><img src="Template:Url('/images/characters.png')" class="img-thumbnail" alt="Thumbnail for {{ $character->fullName }}"/></a>

Usage

Users can hide their character and add authorized users by editing their character's profile.

Troubleshooting

We are never 100% safe from those pesky bugs. If you find something, feel free to contact me- I am cylunny on discord or toyhou.se!

If you use the featured character extension, you will have to edit a line in the _selected_character.blade yourself. Change @if($character) to @if($character && (!$character->is_hidden || ($character->is_hidden && $character->isAuthorized(Auth::user())))) and it should show unauthorized users the 'user has no selected character' info instead.

Images

(not yet sorry :c)

See Also

If this extension helped you, feel free to support me on Kofi!