xypp / forum-quests
Add quests to the forum, and reward with money or other things
Installs: 628
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:flarum-extension
Requires
- flarum/core: ^1.2.0
- xypp/collector: *
- xypp/flarum-localize-date-lib: *
Requires (Dev)
README
A Flarum extension. Add quests to the forum, and reward with money or other things.
中文用户请参阅 README-CN.md
Migration Guide
If you are upgrading from 1.x to 2.0, please follow the steps below
- Backup your database
- Disable this extension
- Update the extension. You'll see our dependencies are also installed. If you are using
Collector
extension before, go to step 7. - Enable
Localize Date Lib
and configure Timezone - Enable
Collector
and check settings(Same as before by default) - Run
php flarum collector:migrate
. This command will copy all data from forum-quests database to collector. - Enable this extension
Simply Guide
Description
This extension provided a data analysis system that tracks user's data when it changed and trigger the corresponding quests.
When a user satisfy the condition of a quest, it will be triggered and the quest will be done. The reward will be given to the user.
If re-available is set, when the time is up, the quest can be triggered again.
Features
Time Span
This extension allows you to use time span in condition. For example, "Post Count" > 0 in Span 1 means that the user must post at least one post this day. The time span is calculated by the timezone configured in admin panel.
Re-Available
The quest is always supposed to be done multiple times, for example, once a day. You can use re-available
option to make the quest to be available again after some time. The extension currently support re-available after a day(by timezone) or after certain hours(exact time).
Frontend List and Hidden Item
This extension provides a frontend page for user to know what quest they are able to do. You can also hide the quest from the quest list until it is done.
Notice
About Recalculate Command
This command will ask all conditions to be rebuilt from database. However some conditions have not recorded with time so they will lost all accumulation data after recalculate.
When you running php flarum collector:recalculate
command, by default it will stop running and ask you to confirm when some conditions are not able to be rebuilt from database. If this is the first time you run this command, just type y
to continue.Otherwise Press Enter Or Type n
to skip rebuilt or you will lose all accumulation data and only get the total value of this condition.
Refreshing after edit
If you change a quest's Re-Available from once
to any other value, you may found that the users that had done the quest formerly was not able to do it again. That's because the extension will calculate the time user can do the quest again when they have just done it.
To fix the problem, rum php flarum forum-quests:refresh
Configure before usage
After installing, there are still something you need to do.
If you haven't enable Collector
- Enable
Localize Date Lib
and configure Timezone - Enable
Collector
and check settings(Same as before by default)
Then enable the extension.
For Best Experience
The quest done will notify the user by alert notification.
It will be better to work with following
- xypp/flarum-websocket-notification
- blomstra/realtime
- kyrne/websocket
- flarum/pusher
Installation
Install with composer:
Please Read Install Guide #Configure before usage
composer require xypp/forum-quests:"*"
Updating
Please Read the Migration Guide First Before Updating
composer update xypp/forum-quests:"*"
php flarum migrate
php flarum collector:recalculate
php flarum cache:clear
Screenshots
Comparing to Achievements/AutoMod?
This extension is designed for following targets that other extensions lacks:
- Metric Pre Day
- One-time trigger(No leave event)
- Multiple times
- Frontend List
Integration
The extension natively provides the following Conditions/Rewards.
Conditions
- Post Count(core)
- Discussion Count(core)
- Change Email(core)
- Change Avatar(core)
- User Page Visit(core)
- Page Reloads(core)
- Discussion Replied(core)
- Like Received(flarum/likes)
- Like Sent(flarum/likes)
- Store Purchased(xypp/store)
- Discussion was view(michaelbelgium/flarum-discussion-views)
- Badge Received(v17development/flarum-user-badges)
- Money(AntoineFr/money)
Rewards
- Money(AntoineFr/money)
- Store Item(xypp/store)
- Badge(v17development/flarum-user-badges)
From Other Extensions
- foskym/flarum-custom-levels: Reward with exp.
- xypp/flarum-invite-user: Conditions of invitation