Keyword

Displaying content from a specific time period

  • Stuart Revnell
  • Stuart Revnell's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago - 12 years 3 months ago #67495 by Stuart Revnell
Displaying content from a specific time period was created by Stuart Revnell
Hi there,
I have two things I'd appreciate some help on please:

1) I'm trying to display K2 content from the last 30 days only (or better still, a specific month) on my news landing page at http://goo.gl/c3awA
I've tried the K2 Tools module, but this only lets me display by a time period if I set the ordering to display by the most popular or commented items.
I then tried K2 Tools module, but that doesn't seem to have an option for this, and after that, I tried to configure the K2 category display options, but there's nothing there I can see about limiting display by time period./li]

2) I've installed the K2 Tools module on the RH side of the News page, set to Archive mode. The number of articles per month displays correct, but if I click on a month, the K2 Tools module in 'Breadcrumb' mode, at the top of the screen, shows a month earlier. i.ehttp://s420161789.websitehome.co.uk/index.php/news/itemlist/date/2012/5?catid=6

Can anyone help please?
Thanks!
Stuart

Please Log in or Create an account to join the conversation.

  • Stuart Revnell
  • Stuart Revnell's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago #67496 by Stuart Revnell
Replied by Stuart Revnell on topic Re: Displaying content from a specific time period
Anybody got any thoughts on this one please?
Thanks
Stuart

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #67497 by Lefteris
Hi. Have you hacked any K2 code? What PHP version is your server running?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Stuart Revnell
  • Stuart Revnell's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago #67498 by Stuart Revnell
Replied by Stuart Revnell on topic Re: Displaying content from a specific time period
Hi Lefteris,
No, I haven't hacked any code yet - server is running 5.2.17.
Thanks for your help.
Stuart

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #67499 by Lefteris
Hi. I am not sure yet why you get one month back. K2 uses strtotime function to create the date. However i cannot reproduce the issue. Are you able to edit code? If so, try to change line 250 of /components/com_k2/views/itemlist/view.html.php from:
$date = strtotime(JRequest::getInt('year').'-'.JRequest::getInt('month'));

to:
$date = strtotime(JRequest::getInt('year').'-'.JRequest::getInt('month').'-1');

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum