diff options
-rw-r--r-- | init.php | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ <?php -class Scored_Oldest_First extends Plugin { +class Random_Order extends Plugin { function init($host) { $host->add_hook($host::HOOK_HEADLINES_CUSTOM_SORT_MAP, $this); @@ -8,13 +8,13 @@ class Scored_Oldest_First extends Plugin { function hook_headlines_custom_sort_map() { return [ - "dates_reverse_scored" => "Oldest first (with score)" + "random_order" => "Random" ]; } function hook_headlines_custom_sort_override($order) { - if ($order == "dates_reverse_scored") { - return [ "score DESC, updated", false ]; + if ($order == "random_order") { + return [ "RANDOM()", false ]; } else { return [ "", false ]; } @@ -22,7 +22,7 @@ class Scored_Oldest_First extends Plugin { function about() { return array(null, - "Consider article score while sorting by oldest first", + "Return headlines in random order", "fox", false, ""); |