Old articles in the “Popular” module
Tags: joomla, popular, mos_mostread
Often there is such problem with the “Popular” module (”Most Read Content”, mos_mostread). There some articles are located, and everyone click on them. As a result these articles do not leave from “popular”, and new articles don’t appear here. It is vicious circle.
One of solutions is to show popular news for the last NNN days.
In order to do that, add in /modules/mod_mostread.php
."n AND ((TO_DAYS('".date("Y-m-d",time()+$mosConfig_offset*60*60). "') - TO_DAYS(a.created)) <= 'NNN')"
(where NNN is a number of days) in three places after lines (~37, 53, 93)
. "n AND ( a.publish_up = " . $database->Quote( $nullDate ) . " OR a.publish_up <= " . $database->Quote( $now ) . " )" . "n AND ( a.publish_down = " . $database->Quote( $nullDate ) . " OR a.publish_down >= " . $database->Quote( $now ) . " )"
And add “a.created” to the SELECT list of all the above sql-queries.
Or, you can download the “Popular of late” module (v1.1 - now Mambo-compatible) and use it instead of “Popular”. The module based on the original “Popular” module and have one additional parameter only - the period of “novelty”.
November 25th, 2011 at 8:47 am
This is no longer applicable with the latest version.