Viernes, 19 Diciembre 2014 06:34
beggarly

Feature Request filter by most popular in the last x months?

Filters news by the current section and category

Feature Request filter by most popular in the last x months?

Postby Waterbaby999 » Tue Apr 21, 2009 11:33 pm

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
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Feature Request filter by most popular in the last x months?

Postby zokiboss » Thu Jun 11, 2009 6:15 pm

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
zokiboss
Fresh Boarder
Fresh Boarder
 
Posts: 1
Joined: Thu Jun 11, 2009 6:09 pm

Re: Feature Request filter by most popular in the last x months?

Postby Waterbaby999 » Thu Jun 11, 2009 7:25 pm

Thanks for this - very useful! Will try to implement it on my site.

Ruth
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Feature Request filter by most popular in the last x months?

Postby chus » Sat Jun 13, 2009 1:55 am

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!
User avatar
chus
Administrator
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?

Postby ksandven » Mon Jul 06, 2009 9:55 am

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!
ksandven
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Thu Apr 02, 2009 8:19 pm

Re: Feature Request filter by most popular in the last x months?

Postby Waterbaby999 » Tue Jul 07, 2009 10:13 pm

Is it possible to refine this slightly, by giving the option to specify which date is being used to work from? Some examples:

    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
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Feature Request filter by most popular in the last x months?

Postby ksandven » Tue Jul 14, 2009 11:38 am

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!
ksandven
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Thu Apr 02, 2009 8:19 pm

Re: Feature Request filter by most popular in the last x months?

Postby Waterbaby999 » Tue Jul 14, 2009 9:37 pm

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
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Feature Request filter by most popular in the last x months?

Postby ksandven » Mon Jul 20, 2009 9:14 am

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!
ksandven
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Thu Apr 02, 2009 8:19 pm

Re: Feature Request filter by most popular in the last x months?

Postby ksandven » Tue Sep 08, 2009 10:12 pm

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!
ksandven
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Thu Apr 02, 2009 8:19 pm

Next

Return to Filtered News



Who is online

Users browsing this forum: No registered users and 0 guests

cron