Extensions:News Expansion

From Lorekeeper Wiki
Jump to navigation Jump to search
News Expansion
Description Add staff-only bulletins to the Staff Panel and add truncation to News
Author(s) Preimpression
Status status testing
Github newsExpansion
LK Version Unspecified
Contains a Migration


This expansion adds staff Bulletins using the News model and database table. It also adds a "staff member" power to allow Miscellaneous staff links to be added to the sidebar for any staff member to see, regardless of actual power. The extension adds the latest bulletin (truncated to a pixel size using JQuery) to the top of the admin panel but does not currently support notifying admins for new Bulletins.

Installation

Pull the branch and run the migration.

Make sure that if you are manually adjusting for conflicts, that you are careful to maintain the admin bulletin = false indication on public news - you don't want your regular members to be able to see admin Bulletins or be notified for them!

Configuration

You will need to add the generic "staff" power to existing non-admin staff roles in order for them to see the Bulletins list on the sidebar of the Admin Panel.

Usage

In order to add Bulletins, you go to the now-labeled News and Bulletins link on the sidebar and click "Create New Staff Bulletin." Note that if you accidentally make a staff bulletin as a news post or vice versa, you cannot swap it from the admin panel - you would need to go to the database and switch the boolean there.

On the admin list of news and bulletins, staff bulletins are marked by the same crown icon that the admin panel link uses. Admin news links go to a different url from regular news but are still accessible from the original /news/ url.

Troubleshooting

I don't know of any issues, but if you find any please feel free to let me know. I am also always open to Pull Requests if people want to improve upon my code.

See Also

To contact me, find me on the LK Discord server as Uri!