SamNews- fix for the front page query

There is an issue with the query for the SamNews index page, if a post hasn’t been made in the INDEX_INTERVAL (default is 5 days) the front page will show “no results.”

I have come up with a better query that addresses this problem. The new query shows all the posts within INDEX_INTERVAL on top, sorted score descending (and next by creation date)– then underneath the rest of the posts are displayed descending by their creation date.

To use the new query, replace the specified lines with the ones below:

index.php, change line 65 to:

index.php, change line 68 to:

/cron/gen_rss.php, change line 25 to:

The fix will be included in a future update.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>