clarkwinkelmann/flarum-ext-post-stream-search

Filter post stream by keyword or other criteria.

Installs: 2 360

Dependents: 0

Suggesters: 1

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Language:TypeScript

Type:flarum-extension

1.1.0 2023-05-08 16:16 UTC

This package is auto-updated.

Last update: 2024-12-14 01:14:12 UTC


README

MIT license Latest Stable Version Total Downloads Donate

This extension lets users filter the discussion post stream by keyword and other criteria.

The filter toolbar can be brought up by typing CTRL+F or CTRL+SHIFT+F while on a discussion page. The browser might not allow intercepting CTRL+F. In that case only the variant with SHIFT will work. Other access methods can be enabled in the extension settings.

The toolbar contains fields to perform a text search or filter by one or multiple authors.

If the Scout extension is enabled (0.3.0+ required) the text search in posts will use the Scout index.

The toolbar can be "pinned" and will automatically appear anytime a discussion is opened.

When filters are applied, posts that don't match are hidden but a label remains saying how many posts have been hidden between posts that remain visible. The sort order does not change, posts remain sorted chronologically.

At the moment filters cannot be perma-linked. If the page is refreshed, the unfiltered page will be shown again.

The matched keywords are not highlighted in the search results by default. This feature is provided by the Advanced Search Highlight extension.

When using the default Flarum search (Scout not enabled), some of the same quirks as the Flarum search will apply: you will only get results when typing 3+ characters, and the search could match tokens that are part of the post source but not its output. When using Scout, those effects might not be present depending on the driver.

Installation

This extension will automatically install Flamarkt Backoffice to gain access to some of its re-usable components. You must enable Backoffice in the extension list before enabling this extension. The backoffice panel isn't used, you can ignore it.

composer require clarkwinkelmann/flarum-ext-post-stream-search

If you want search result highlighting, also install the following extension. It requires PHP 7.4+

composer require clarkwinkelmann/flarum-ext-advanced-search-highlight

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