PDA

View Full Version : Today Read (Popular Today)


akash210
07-07-2009, 10:33 AM
I'm not sure the "today_read" search_sort_by parameter takes into account the timezone settings. I've tested it quite a few times.

Can one of the developers please confirm?

If I'm correct, could you help me set it right?

Thanks.

akash210
07-09-2009, 04:16 AM
Apart from probably "get_created" none of the other article attributes like "get_last_read" or "today_read" take either timezone or date format setting into consideration. Just checked.

I need you to help me fix this. (And it should probably be fixed in the next version as well)

Thanks.

josephen
07-09-2009, 06:21 PM
What really annoys me about the date/time stamp thing is that when I modify an old article (i.e publishing date sometime in 1997), it simply shows up at the top of the list under that category :confused: - like if the system is using the last modified date instead of the original publishing date to sort the articles :cool:

I also need this to be fixed in the next version, along with the other minor time/date stamp related issues, since it's not logic that an article with old publishing date is shown before newer ones!

shketuljko
07-10-2009, 09:54 AM
Hmmm you are right. This is a bug. You can try with quick fix for this issue.
Please try to find get_last_read function in:
File: VIVVO_ROOT/lib/vivvo/core/Articles.class.php
Line: 785

Replace this code:


function get_last_read(){
return $this->last_read;
}


with:


function get_last_read($format = false){
return format_date($this->last_read, $format);
}

akash210
07-10-2009, 10:23 AM
What really annoys me about the date/time stamp thing is that when I modify an old article (i.e publishing date sometime in 1997), it simply shows up at the top of the list under that category :confused: - like if the system is using the last modified date instead of the original publishing date to sort the articles :cool:

I also need this to be fixed in the next version, along with the other minor time/date stamp related issues, since it's not logic that an article with old publishing date is shown before newer ones!

For you it's easy. You should just set the time created of the article to what it was (an old one). It won't appear before the newer ones then.

akash210
07-10-2009, 10:25 AM
Hmmm you are right. This is a bug. You can try with quick fix for this issue.
Please try to find get_last_read function in:
File: VIVVO_ROOT/lib/vivvo/core/Articles.class.php
Line: 785

Replace this code:


function get_last_read(){
return $this->last_read;
}


with:


function get_last_read($format = false){
return format_date($this->last_read, $format);
}


Thanks for the info buddy.. :)

Now can you please help me make the "today_read" parameter take timezone into account? I can't wait 10 hours everyday to see today's most popular stories.

Hope you understand.

Thanks.

shketuljko
07-14-2009, 08:14 AM
I'll check it and inform you about progress in a few days.

nisha
12-15-2009, 07:46 AM
Any Updates on this??

shketuljko
12-15-2009, 11:21 AM
I see that Vivvo includes auto_reset_today_read method which is located in VIVVO_ROOT/lib/vivvo/tasks/auto_reset_today_read.php
Cron jobs calls that method.

As I can see only problem can be Cron. Could you check if your Cron works properly. If it's not case you can apply this fix:
http://www.vivvo.net/forums/showpost.php?p=27386&postcount=2