zephyrisle / flarum-holiday-notify
Holiday notifications and gray mode for Flarum
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:flarum-extension
pkg:composer/zephyrisle/flarum-holiday-notify
Requires
- flarum/core: ^1.8.0
- guzzlehttp/guzzle: ^7.0
- overtrue/chinese-calendar: ^1.0
- psr/container: 1.1
Requires (Dev)
This package is auto-updated.
Last update: 2026-02-11 14:08:59 UTC
README
A Flarum extension that provides holiday notifications using AI-generated content and gray mode for memorial days.
Features
- Gray Mode: Automatically applies grayscale filter to the forum on Memorial Days (Dec 13, Sep 18), excluding user avatars.
- Holiday Notifications: Sends notifications to all users on major holidays (Gregorian & Lunar).
- AI Integration: Generates unique holiday greetings using OpenAI (GPT-3.5/4).
- Admin Panel: Fully configurable holidays, independent switches, and OpenAI settings.
- Customizable: Add custom holidays, support for custom templates.
Requirements
- Flarum ^1.8
- A running queue worker (recommended) for mass notifications
Installation
Install with composer:
composer require zephyrisle/flarum-holiday-notify
php flarum migrate php flarum cache:clear
Configuration
- Go to Admin > Extensions > Holiday Notify & Gray Mode.
- Configure OpenAI API Key and URL (optional, required for AI generation).
- Enable/Disable specific holidays.
- Add custom holidays if needed.
Scheduler
To ensure notifications are sent automatically, you must have the Flarum scheduler running. Add this to your crontab:
* * * * * php /path/to/flarum schedule:run >> /dev/null 2>&1
The holiday check runs daily at 08:00.
Development
Frontend
cd js
npm install
npm run dev
Backend
To run tests:
vendor/bin/phpunit
Technical Details
- Frontend: TypeScript/JavaScript (Admin interface), CSS Filters (Gray Mode).
- Backend: PHP, MySQL, Queue (for mass notifications).
- AI: OpenAI API integration.
License
MIT