---------------------------------------------------------------------------------------- The UX will send a category ID to the feed endpoint as we want to filter the items by ID. - If this ID is provided, we can return empty cards data, but populate the items only. Need to JOIN on the was_item_category when we are given a category ID. My concern here is a complex feed query, but lets see if we can come up with one that is fast and efficient using these JOINs on the category table. We will need to match the items based on type/typeID and the given category. was_dashboard_item was_item_category_relation was_item_category $this->input('category_slug', '') log_message('error', "TODO :: get_new_dashboard_item_ids_starter: ".preg_replace('/\s+/', ' ', str_replace(array("\r\n", "\r", "\n"), " ", $this->db->last_query()))); $routeCollector->addRoute('GET', '/dashboard/feeds', '/Dashboard/feeds'); -> dashboard/get $routeCollector->addRoute('GET', '/dashboard/new-feed-ids', '/Dashboard/newFeedIds'); -> dashboard/ajax/get_new_item_ids $routeCollector->addRoute('GET', '/dashboard/new-feeds', '/Dashboard/newFeeds'); -> dashboard/ajax/get_new - classes/day?date=1735756200 - classes/month?month=1&year=2025&timezone=GMT%2B05:30 - communities/{slug}/top-contributors 'category_slug' => $this->input('category_slug', '') Below, will be Classes & Video Shorts. 3 - The page "Questions", will be the questions card, with the latest 30 questions loaded [ Default: 40, Question Comment limit: 60 ] /dashboard/new-questions?filter_state=all [ /Dashboard/newQuestions ] -> dashboard/ajax/get_new_questions https://api11.nileshmahajan.com/dashboard/new-questions?filter_state=all https://api11.nileshmahajan.com/dashboard/new-questions?filter_state=all&category_slug=email-marketing 4 - The "Posts" page will be the posts card with the latest 30 posts loaded [ Default: 100 ] /dashboard/new-blogs?filter_state=all [ /Dashboard/newBlogs ] -> dashboard/ajax/get_new_blogs https://api11.nileshmahajan.com/dashboard/new-blogs?filter_state=all https://api11.nileshmahajan.com/dashboard/new-blogs?filter_state=all&category_slug=seo 5 - The "Video Shorts" page will be the Video shorts with the latest 30 Video Shorts loaded [ 3 ] /dashboard/video-shorts?id=0 [ /Dashboard/videoShorts ] -> dashboard/ajax/get_video_shorts https://api11.nileshmahajan.com/dashboard/video-shorts?id=0 https://api11.nileshmahajan.com/dashboard/video-shorts?id=0&category_slug=youtube ---------------------------------------------------------------------------------------- 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 php /var/www/html/umesh/wa_social/wa-ux-revamp/cli.php scripts memcache_tasks view_memcache_key get_communities_active php /var/www/html/umesh/wa_social/wa-ux-revamp/cli.php scripts memcache_tasks delete_memcache_key get_communities_active ---------------------------------------------------------------------------------------- category_stats My Best Rankings by Community: This should be the user's top ranked communities. So Once we gather the user's rank among all communities, we can sort by rank and return the top 5. For tie breaking, we can use the community_order that is the category table. Engagements This is the count of point events for the current selected period ALTER TABLE `was_points_event` ADD INDEX `idx_user_date_points` (`recipient_user_id`, `event_points_date`, `event_user_id`); was_points_event was_points_payout was_points_payout_period was_points_payout_period_category Today: https://api11.nileshmahajan.com/leaderboards/overview/my-points?start_date=2025-01-17&end_date=2025-01-17&filter_days=1 Payout using date from 'was_points_event' table. Yesterday: https://api11.nileshmahajan.com/leaderboards/overview/my-points?start_date=2025-01-16&end_date=2025-01-16&filter_days=-1 Payout using date from 'was_points_event' table. This Week: https://api11.nileshmahajan.com/leaderboards/overview/my-points?start_date=2025-01-12&end_date=2025-01-18&filter_days=7 Payout using date from 'was_points_event' table. Last 30 Days: https://api11.nileshmahajan.com/leaderboards/overview/my-points?start_date=2024-12-19&end_date=2025-01-17&filter_days=30 Payout using date from 'was_points_event' table. Custom: https://api11.nileshmahajan.com/leaderboards/overview/my-points?start_date=2025-01-01&end_date=2025-01-17&filter_days=custom All previous months payout from 'was_points_payout' table and current payout period with date from 'was_points_event' table. - This Month: https://api11.nileshmahajan.com/leaderboards/overview/my-points?start_date=2025-01-01&end_date=2025-01-31&filter_days=month Current payout period from 'was_points_event' table. - This Year [ ALL previous months + current month ]: https://api11.nileshmahajan.com/leaderboards/overview/my-points?start_date=2025-01-01&end_date=2025-01-17&filter_days=year All previous months payout from 'was_points_payout' table and current payout period with date from 'was_points_event' table. - All Time [ ALL payout period + current month ]: https://api11.nileshmahajan.com/leaderboards/overview/my-points?start_date=2024-11-01&end_date=2025-01-17&filter_days=0 All previous months payout from 'was_points_payout' table and current payout period with date from 'was_points_event' table. $146 $gamificationModel->getUserPayoutPointsData($this->userId, $currentPayoutPeriod);