Difference between revisions of "Extensions:Character Authorization"
(Created page with "{{subst:Extension Page}}") Tag: 2017 source edit |
Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
− | {{Extensioninfobox|title= | + | {{Extensioninfobox|title=Character Authorization|desc=Allows users to hide their characters from other users, and to authorize only a select 25 users to view them.|auth=Cylunny|status=testing|github={{Github|user=Cylunny|branch=extension/character-authorization}}|LKVer=2.1.3|migration=yes|package=no}} |
− | + | 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 == | == Installation == | ||
<!-- Describe installation. Include any requirements (such as packages), necessary commands, etc. --> | <!-- Describe installation. Include any requirements (such as packages), necessary commands, etc. --> | ||
== Configuration == | == 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. |
+ | <code> <a href="#"><img src="{{ url('/images/characters.png') }}" class="img-thumbnail" alt="Thumbnail for {{ $character->fullName }}"/></a> </code> | ||
== Usage == | == Usage == | ||
− | + | Users can hide their character and add authorized users by editing their character's profile. | |
== Troubleshooting == | == 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 | ||
+ | <code>@if($character)</code> | ||
+ | to | ||
+ | <code>@if($character && (!$character->is_hidden || ($character->is_hidden && $character->isAuthorized(Auth::user()))))</code> | ||
+ | and it should show unauthorized users the 'user has no selected character' info instead. | ||
== Images == | == Images == | ||
− | + | (not yet sorry :c) | |
== See Also == | == See Also == | ||
− | + | If this extension helped you, feel free to support me on [https://ko-fi.com/cylunny Kofi]! | |
− |
Revision as of 00:34, 24 April 2024
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!