ffans / creator-declarations
Creator-provided content disclosures for Flarum posts.
Package info
github.com/FFans/creator-declarations
Type:flarum-extension
pkg:composer/ffans/creator-declarations
Fund package maintenance!
Requires
- flarum/core: ^2.0.0
Requires (Dev)
- flarum/testing: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A Flarum extension. Creator-provided content disclosures for the posts.
The extension helps authors describe the source, authenticity, safety context, and commercial nature of each posts.
This extension was built with AI assistance and will continue to be improved and maintained based on community feedback.
Preview
Features
- Select multiple declarations when starting a discussion or writing a reply.
- Show declaration details and notes in modal.
- Display source declarations as standalone notices when no other declaration types are selected.
- ……
Available declarations
| Category | Declaration |
|---|---|
| Content source | Original content |
| Content source | Reposted content |
| Content source | Referenced or quoted content |
| Authenticity | AI-generated content |
| Authenticity | Fictional or staged content |
| Authenticity | Personal opinions or perspectives |
| Safety | Dangerous behavior; do not imitate |
| Safety | Potentially disturbing |
| Commercial disclosure | Contains marketing or promotional information |
| Commercial disclosure | Paid partnership, sponsorship, or material interest |
Requirements
| Flarum version | Extension version | Branch |
|---|---|---|
| 2.x | 0.2.x or 2.x |
main |
| 1.x | 0.1.x or 1.x |
1.x |
Installation
Install with Composer:
composer require ffans/creator-declarations php flarum cache:clear
You can enable the extension from the Flarum administration dashboard.
Updating
composer update ffans/creator-declarations php flarum migrate php flarum cache:clear
Configuration
Open Administration → Extensions → FFans Creator Declarations.
| Setting | Default |
|---|---|
| Require a declaration when starting a discussion | Off |
| Require a declaration when replying | Off |
| Maximum declarations per post | 5 |
| Show declarations in user profile Posts lists | Off |
| Declaration order | Built-in order |
| Individual declaration types | All enabled |
The extension also adds these permissions:
- Allow editing own creator declarations — controls how long authors may edit declarations on their own posts.
- Edit creator declarations on posts — allows moderators to edit declarations on any post.
Usage
When composing a discussion or reply, select Add self declarations, choose the declarations that apply, add any required details, and save. The declarations are submitted together with the post.
Users with permission can edit existing declarations from the post controls menu. Disclosures are informational and should be considered together with the post content.
Development
Local development installation
Configure a Composer path repository from the Flarum root directory and install the extension:
composer config repositories.creator-declarations path "/path/to/your/local/dir/creator-declarations" composer require ffans/creator-declarations:"@dev" php flarum extension:enable ffans-creator-declarations php flarum cache:clear
Frontend development
cd js npm install npm run check-typings npm run build php flarum cache:clear; & php flarum assets:publish
Use npm run dev for a development build that watches for frontend changes.
Backend tests
Install the development dependencies, initialize the integration-test environment once, then run the test suite:
composer install
composer test:setup
composer test
Integration tests use a MySQL or MariaDB instance. Connection details are configured with DB_DRIVER (default sqlite), DB_HOST (default localhost), DB_PORT (default 3306), DB_DATABASE (default flarum_test), DB_USERNAME (default root), DB_PASSWORD (default root), and DB_PREFIX (default empty). The test directory can be configured with FLARUM_TEST_TMP_DIR_LOCAL or FLARUM_TEST_TMP_DIR.
Create the dedicated test database before running composer test:setup. Setup wipes the selected database, so never point these variables at a development or production Flarum database. Subsequent integration tests run database changes inside transactions, allowing the initialized test database to be reused.
Run only the database-free unit tests with:
composer test:unit
Translations
Want to help translate this extension? Visit Robert Korulczyk's Weblate.
Links
License
Released under the MIT License.

