Feature Request filter by most popular in the last x months?
11 posts
• Page 1 of 2 • 1, 2
Feature Request filter by most popular in the last x months?
Hi all,
Is it possible to filter the news appearing by a time period - i.e. only recent news frm the last 2mths?
Would be willing to contribute if necessary!
Many thanks in advance,
Ruth
Is it possible to filter the news appearing by a time period - i.e. only recent news frm the last 2mths?
Would be willing to contribute if necessary!
Many thanks in advance,
Ruth
- Waterbaby999
- Fresh Boarder

- Posts: 13
- Joined: Wed Apr 15, 2009 7:15 pm
Re: Feature Request filter by most popular in the last x months?
Hello there. I needed that option too, and I made a little hack in the code, and it works perfectly, but the bad thing is that you will need manually change the code in file to change the dates, I doesn't have time to implement in the module admin panel.
1. open: /modules/mod_filterednews/helper.php
2. after 220 line, insert a new empty line, and type this: " ' AND DATEDIFF(now(), a.created)<10' ." (without double quotes, with single one).
3. Change the number 10, with the days you want to load from past.
it should look something like this:
-----------------------------------------------------------------------
' AND cc.published = 1' .
' AND DATEDIFF(now(), a.created)<10' .
$ordering;
-----------------------------------------------------------------------
I hope I helped you, and owners of this module please implement in next version. Regards // ZokiBoSS
1. open: /modules/mod_filterednews/helper.php
2. after 220 line, insert a new empty line, and type this: " ' AND DATEDIFF(now(), a.created)<10' ." (without double quotes, with single one).
3. Change the number 10, with the days you want to load from past.
it should look something like this:
-----------------------------------------------------------------------
' AND cc.published = 1' .
' AND DATEDIFF(now(), a.created)<10' .
$ordering;
-----------------------------------------------------------------------
I hope I helped you, and owners of this module please implement in next version. Regards // ZokiBoSS
- zokiboss
- Fresh Boarder

- Posts: 1
- Joined: Thu Jun 11, 2009 6:09 pm
Re: Feature Request filter by most popular in the last x months?
Thanks for this - very useful! Will try to implement it on my site.
Ruth
Ruth
- Waterbaby999
- Fresh Boarder

- Posts: 13
- Joined: Wed Apr 15, 2009 7:15 pm
Re: Feature Request filter by most popular in the last x months?
I hope I helped you, and owners of this module please implement in next version
We have indeed
Those who are interested can download the actual version with this feature.
Thank you!
-

chus - Administrator

- Posts: 455
- Joined: Thu Sep 13, 2007 2:21 am
- Location: Costa Rica
Re: Feature Request filter by most popular in the last x months?
This function doesn't work on my site. I have the module in several places and it works fine, but when I enter a number for the "only from Last X Days", the module doesn't return any values.
Best regards,
Kristoffer Sandven
Check out my blog: Joomla tips, news and tutorials.
http://www.joomlablogger.net/
Open Source Matters!
Kristoffer Sandven
Check out my blog: Joomla tips, news and tutorials.
http://www.joomlablogger.net/
Open Source Matters!
- ksandven
- Fresh Boarder

- Posts: 5
- Joined: Thu Apr 02, 2009 8:19 pm
Re: Feature Request filter by most popular in the last x months?
Is it possible to refine this slightly, by giving the option to specify which date is being used to work from? Some examples:
I'm sure there are other possible combinations.
Am thinking about using this for a related items module, and the above would be required to implement it.
Ruth
- The x months before/after the article was published,
- The last x months (from today)
I'm sure there are other possible combinations.
Am thinking about using this for a related items module, and the above would be required to implement it.
Ruth
- Waterbaby999
- Fresh Boarder

- Posts: 13
- Joined: Wed Apr 15, 2009 7:15 pm
Re: Feature Request filter by most popular in the last x months?
ksandven wrote:This function doesn't work on my site. I have the module in several places and it works fine, but when I enter a number for the "only from Last X Days", the module doesn't return any values.
Any idea why the module won't work on my site?
Best regards,
Kristoffer Sandven
Check out my blog: Joomla tips, news and tutorials.
http://www.joomlablogger.net/
Open Source Matters!
Kristoffer Sandven
Check out my blog: Joomla tips, news and tutorials.
http://www.joomlablogger.net/
Open Source Matters!
- ksandven
- Fresh Boarder

- Posts: 5
- Joined: Thu Apr 02, 2009 8:19 pm
Re: Feature Request filter by most popular in the last x months?
Just a thought but could it be a mis-match between date formats? I.E. UK and US layouts of dates being
31/12/1981 - UK
12/31/1981 - USA
No idea if this is a problem but recently had an issue with an Access DB where this caused things to break.
Ruth
31/12/1981 - UK
12/31/1981 - USA
No idea if this is a problem but recently had an issue with an Access DB where this caused things to break.
Ruth
- Waterbaby999
- Fresh Boarder

- Posts: 13
- Joined: Wed Apr 15, 2009 7:15 pm
Re: Feature Request filter by most popular in the last x months?
OK - where do I adjust that?
Best regards,
Kristoffer Sandven
Check out my blog: Joomla tips, news and tutorials.
http://www.joomlablogger.net/
Open Source Matters!
Kristoffer Sandven
Check out my blog: Joomla tips, news and tutorials.
http://www.joomlablogger.net/
Open Source Matters!
- ksandven
- Fresh Boarder

- Posts: 5
- Joined: Thu Apr 02, 2009 8:19 pm
Re: Feature Request filter by most popular in the last x months?
I still haven't found out how to get the pupular in the last X days to work on my site...
Best regards,
Kristoffer Sandven
Check out my blog: Joomla tips, news and tutorials.
http://www.joomlablogger.net/
Open Source Matters!
Kristoffer Sandven
Check out my blog: Joomla tips, news and tutorials.
http://www.joomlablogger.net/
Open Source Matters!
- ksandven
- Fresh Boarder

- Posts: 5
- Joined: Thu Apr 02, 2009 8:19 pm
11 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 0 guests