Difference between revisions of "Extensions:Character Status Badges"

From Lorekeeper Wiki
Jump to navigation Jump to search
(add extension info)
Tag: 2017 source edit
(→‎Installation: edit code whoops)
Tag: 2017 source edit
Line 10: Line 10:
 
Alternately, you can move the contents into the _header.blade.php file if you want it on every single page, but header is shared between both masterlist and MYO entries and will need a check to remove the '''art badge''' from MYO slots:
 
Alternately, you can move the contents into the _header.blade.php file if you want it on every single page, but header is shared between both masterlist and MYO entries and will need a check to remove the '''art badge''' from MYO slots:
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
@if($character->is_gift_art_allowed && $character->is_myo_slot)
+
@if($character->is_gift_art_allowed && !$character->is_myo_slot)
 
<h1><span class="badge badge-success" style="position: absolute; top: 0px; right: 70px;" data-toggle="tooltip" title="OPEN for gift art."><i class="fas fa-pencil-ruler"></i></span></h1>
 
<h1><span class="badge badge-success" style="position: absolute; top: 0px; right: 70px;" data-toggle="tooltip" title="OPEN for gift art."><i class="fas fa-pencil-ruler"></i></span></h1>
@else
+
@elseif($!character->is_myo_slot)
 
     <h1><span class="badge badge-danger" style="position: absolute; top: 0px; right: 70px;" data-toggle="tooltip" title="CLOSED for gift art."><i class="fas fa-pencil-ruler"></i></span></h1>
 
     <h1><span class="badge badge-danger" style="position: absolute; top: 0px; right: 70px;" data-toggle="tooltip" title="CLOSED for gift art."><i class="fas fa-pencil-ruler"></i></span></h1>
 
@endif
 
@endif
Line 18: Line 18:
  
 
As a note, this extension seperates notifs at the top of the page (new news and messages) from the content of the page itself into TWO divs. The news div is on top, and the new div for content is given the '''relative''' position. This is to account for the badge's position with and without news.
 
As a note, this extension seperates notifs at the top of the page (new news and messages) from the content of the page itself into TWO divs. The news div is on top, and the new div for content is given the '''relative''' position. This is to account for the badge's position with and without news.
 +
 
== Configuration ==
 
== Configuration ==
 
Fontawesome.com is used for the icons, feel free to look for new icons custom to your site.
 
Fontawesome.com is used for the icons, feel free to look for new icons custom to your site.

Revision as of 16:37, 5 September 2020

Character Status Badges
Description Changes the display of the badges on a character's page
Author(s) Junijwi
Status stable
Github character-status-badges
LK Version Unspecified






This extension displays badges on a character's main page and profile page which show their trade and gift art status more clearly. These badges should appear above the BOOKMARK button.

IMAGE: the badge style

The badge uses fontawesome icons and is based off of the FTO badge html for displaying FTO status on a user's profile page.

Installation

This extension puts the badges ONLY on the character page and profile page (not in images, bank, etc). You can copy paste it into any character page you want.

Alternately, you can move the contents into the _header.blade.php file if you want it on every single page, but header is shared between both masterlist and MYO entries and will need a check to remove the art badge from MYO slots:

@if($character->is_gift_art_allowed && !$character->is_myo_slot)
	<h1><span class="badge badge-success" style="position: absolute; top: 0px; right: 70px;" data-toggle="tooltip" title="OPEN for gift art."><i class="fas fa-pencil-ruler"></i></span></h1>
@elseif($!character->is_myo_slot)
    <h1><span class="badge badge-danger" style="position: absolute; top: 0px; right: 70px;" data-toggle="tooltip" title="CLOSED for gift art."><i class="fas fa-pencil-ruler"></i></span></h1>
@endif

As a note, this extension seperates notifs at the top of the page (new news and messages) from the content of the page itself into TWO divs. The news div is on top, and the new div for content is given the relative position. This is to account for the badge's position with and without news.

Configuration

Fontawesome.com is used for the icons, feel free to look for new icons custom to your site.

You can change the badge colors using the classes from bootstrap; replace "badge-success" and "badge-danger" with the bootstrap colors you want (primary, secondary, success, warning, danger, light, dark, etc).

You can also change the warning by changing the title=""; text in the style.

Usage

Troubleshooting

Feel free to @ me in the discord (Juni#0448) for any issues.

See Also