Also note, turn the caches off under "Advanced settings" for this add-on if you're play around, and under Tools > Rebuild > Flush the caches when you disable them.
- Setup your cumulative trophy's for this add-on in the User->Trophy->Cumulative
- Run the Rebuild Cache -> "Top Contributors"
This add-on purposely caches thing hard, so you need to disable & flush if you're messing about. Re-enable caches when you're done.
It will run back to the beginning of time to calculate it's own cumulative trophy's. In scoring months from the past, it WILL use all other cumulative trophy's.Okay that seemed to grab the new cumulative trophies. It won't factor in previous cumulative trophies before install, only afterwards?
Regarding a leaderboard... TrophyEssentials (TE) does NOT record any dates for when the cumulative trophy's are awarded. Nothing, nadda.
However, with this addon, cumulative trophy's do now record dates for each cumulative action tracked... so adding a leaderboard is now possible (by month, annual, etc). With the following caveat: because TE never recorded any dates prior to installing this add-on, any leaderboard would be limited historically to the date this add-on (v2.1.0) was installed + when TE was installed with TCM v2.1.0.
No, I misspoke, I forgot that I made the rebuild recalculate the actions and record a timestamp in a new table for all historical actions.Okay, so to be clear, any cumulative trophy points earned BEFORE this add-on was updated 2.1.0, will not be reflective in the ranking.
Perfect, then if the user gets ether of a TCM Milestone Trophy, or a Cumulative Trophy, the points will be added to that.
View attachment 325346
I hear you, promise. I think you're right. I think it's a "row multiplication" issue with the trophy points scoring. I'll look at it for a bit, but if no headway I'm heading to bedI have more trophy points than what is shown on the list during the current month (I counted) and other members have less trophy points than what is shown in the list.
Therefore, I really do think I need to remove trophy points as a scoring method entirely. It's just completely inefficient for anything that needs to be duration/time-span based.
[HEADING=2]Stack trace[/HEADING]
SELECT COUNT(*) AS total
FROM (
SELECT sub.user_id, (sub.thread_count * 2 + sub.post_count * 1) AS points_value
FROM (SELECT p.user_id, COUNT(DISTINCT p.thread_id) AS thread_count, COUNT(p.post_id) AS post_count FROM xf_post p WHERE p.message_state = 'visible' AND p.post_date >= 1751328000 AND p.post_date < 1753878546 AND EXISTS (SELECT 1 FROM xf_thread t WHERE t.thread_id = p.thread_id AND t.discussion_state = 'visible' AND t.post_date >= 1751328000 AND t.post_date < 1753878546) GROUP BY p.user_id) sub
INNER JOIN xf_user u ON (sub.user_id = u.user_id) WHERE u.user_state = 'valid' AND u.is_banned = 0 AND t.node_id NOT IN ('71', '597', '599', '598', '621', '600', '289', '61', '442', '313', '649', '21', '83', '166') AND u.user_id NOT IN (2000163981) GROUP BY sub.user_id HAVING points_value > 0 ORDER BY points_value DESC, sub.user_id DESC LIMIT 200
) AS limited_users
------------
#0 src/XF/Db/Mysqli/Statement.php(207): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(43): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(61): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(152): XF\Db\AbstractAdapter->query('SELECT COUNT(*)...', Array)
#5 src/addons/Wutime/TopContributors/Pub/Controller/TopContributors.php(82): XF\Db\AbstractAdapter->fetchOne('SELECT COUNT(*)...')
#6 src/XF/Mvc/Dispatcher.php(362): Wutime\TopContributors\Pub\Controller\TopContributors->actionIndex(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('Wutime\\TopContr...', 'Index', Object(XF\Mvc\RouteMatch), Object(Wutime\TopContributors\Pub\Controller\TopContributors), NULL)
#8 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Wutime\TopContributors\Pub\Controller\TopContributors), NULL)
#9 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#11 src/XF.php(806): XF\App->run()
#12 index.php(23): XF::runApp('XF\\Pub\\App')
#13 {main}
- New: All scoring metrics are now "build your own", just like subway toppings
- New: Metric for "reactions given" and "reactions received"
- New: All metrics now have independent weights
- New: Metric for "milestone trophies"
- New: Thread replies received can be limited to only replies received from threads created within the month
- Update: Removed "Trophy points" option as a scoring metric (read the discussion thread for the reasoning behind this change)
- Optimization...
We use essential cookies to make this site work, and optional cookies to enhance your experience.