diff --git a/activethreads.php b/activethreads.php index 3cb5b31..cf55c12 100644 --- a/activethreads.php +++ b/activethreads.php @@ -9,6 +9,10 @@ function getLatestActiveThreads() // This will be the array, where we can save the threads $threads = array(); + $limit = strtotime("1 day ago"); + if (date("D") === "Mon") { + $limit = strtotime("3 days ago"); + } // Run the Query $query = "SELECT `".MYBB_PREFIX."forums`.`name` AS `forumname`, `".MYBB_PREFIX."threads`.`subject`, @@ -26,7 +30,7 @@ function getLatestActiveThreads() "; $query = $pdo->prepare($query); $query->execute([ - 'date' => strtotime("1 day ago") + 'date' => $limit ]); return $query->fetchAll();