Extensions:User Ads

From Lorekeeper Wiki
Revision as of 13:04, 21 January 2026 by Camyza (talk | contribs)
Jump to navigation Jump to search
User Ads
Description Users can submit ads to the site that will show up on all pages.
Author(s) Camyza
Status stable
Github user-ads-v3
LK Version v3.0.0
Contains a Migration






Allows users and staff alike to create user advertisements (aka ads) to the site. Only logged in members of the site can see the ads.

It doesn't allow any tags, just plain text when submitting, so no linking, no bold, no nothing to make it pretty nor prone to injections.

Installation

Pull the extension and deal with any conflicts that will arise.

Do the following commands once you resolve all conflicts.

  • php artisan migrate
  • php artisan optimize

Configuration

The user ads are called with @include('layouts._user_ads') in app.blade.php by default. If you move this elsewhere, like the Dashboard, you may have to fiddle with the back end.

You can also adjust the look of the user ads index and the ads itself with these files: resources/views/user_ads/index.blade.php resources/views/user_ads/_user_ads.blade.php

This also adds a new staff power, manage_uses_ads, so be sure to add to those who you wish to help moderate any ads.

Usage

Display in the app.blade.php for only logged in users. It will not show to guests unless you edit it.

Users can delete their own ads but cannot edit their own.

Staff with the power manage_uses_ads are able to delete and edit ads regardless of who made them.

Troubleshooting

There shouldn't be any bugs.

Images