Score Details | |
|
Implementation | |
The field `score` in users_users holds user's total score. The table tiki_users_score logs events so that users aren't scored twice for same thing
Every time the user makes some scoring action, the event will be given a unique id (for example, read_article_10 if he's reading article with id 10). If there is no event for this user with same event id, or if the event has expired, this new event will be logged and the user's score will be updated. TODO: old events (with age configurable) should be erased for performance. The table tiki_score holds all events and respective punctuation:
All events are listed in lib/score/events.php. This file loads the array $events, each element is an array with properties of an event. The properties are, by array index: 0 - dependent features, separated by space or comma. Event will only appear in admin if all features listed here are set to "y".
Elements in $events file are sorted as they appear in admin, they must be grouped by category. |
Creating new event | |
Copy to clipboard
|
Future expansion and ideas | |
|
Ideas for these cool features | |
|
Related pages | |