Featured Discussions

Schedule featured status for discussions

Compatible with Flarum v1.8.5

Latest release 1.0.0

453 downloads

released on Sep 22, 2021

Tags

Featured Discussions

License Latest Stable Version Total Downloads Donate

This extension adds a new filterable property to discussions. At the moment it's not displayed in any special way inside Flarum, but it can be used via the REST API for special integrations.

Discussions can be queued with specific dates for start and end of featuring. A schedule can be created from a CRON expression to easily manage the queue.

To retrieve discussions, use the featured filter. By default discussions will be sorted by most recently featured, you can customize it using the sort parameter.

GET https://flarum.tld/api/discussions?filter[featured]=1&sort=featuredFrom

The feature status has an expiration date, this prevents older entries from being retrieved via the API, and allows controlling how many entries will be visible at a given time. The expiration duration can be customized per discussion, or with the global default duration in the settings.

Installation

composer require clarkwinkelmann/flarum-ext-featured-discussions:*

Limitations

As you approach 50 scheduled discussions in the future, the "Next" option and the schedule page might stop working as expected. Discussions can always be manually scheduled past that threshold.

Since the duration is constant but the schedule can be monthly, it's impossible to have the monthly featured status to expire exactly when the next feature starts. This is probably not an issue when retrieving a given number of featured posts from the REST API since there can exist more featured posts than you actually display.

The moderation permission is tag scopable, but if you give different permissions in different tags the schedule page might present some confusing behavior since the user could see discussions they cannot reschedule.

Support

This extension is under minimal maintenance.

It was developed for a client and released as open-source for the benefit of the community. I might publish simple bugfixes or compatibility updates for free.

You can contact me to sponsor additional features or updates.

Support is offered on a "best effort" basis through the Flarum community thread.

Links

© 2024 Hyn by DaniĆ«l "Luceos" Klabbers. All rights reserved. · Extensions and extension information is provided by the respective (copyright holding) authors. · Extiverse is not affiliated to the Flarum project or Flarum foundation. · Images on Extiverse pages are from Unsplash.