Feeds and last modified / updated times

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.

Moderators: MOD Team, Support Team, Moderators, Styles Team, Developers, Management Team

Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.

Feeds and last modified / updated times

Postby Paul.J.Murphy » Mon Oct 19, 2009 4:40 pm

I've been having a play with 3.0.6-RC, and very glad to see feeds making it into the main distribution.

I have noticed one particular aspect of it which gives me some cause for thought. At present, the Last-Modified HTTP header and <updated> XML field both use time() which isn't exactly accurate or helpful. Here are the obvious spots which I'm thinking of, but there may be other spots in the code which could do with a tweak to make time/date more accurate:
Code: Select all
        'FEED_UPDATED'                  => $user->format_date(time(), $feed_date_format, true),

and
Code: Select all
        header("Last-Modified: " . gmdate('D, d M Y H:i:s', time()) . ' GMT');


Something like one of the following, depending on context, could be used instead of time(), and would be accurate nearly 100% of the time:
Code: Select all
SELECT MAX(forum_last_post_time) FROM phpbb_forums;

Code: Select all
SELECT MAX(topic_last_post_time) FROM phpbb_topics;

Code: Select all
SELECT forum_last_post_time FROM phpbb_forums WHERE forum_id=$forum_id;

Code: Select all
SELECT topic_last_post_time FROM phpbb_topics WHERE topic_id=$topic_id;


Also, adding something similar to the following would probably be appropriate with a more accurate Last-Modified:
Code: Select all
header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$config['feed_expires']) . ' GMT');


Another suggestion I have is to add $sort_days and $cache_time to the ACP page, as neither of those are really one-size fits all (although admittedly shouldn't be a significant issue for the huge sites to pop inside the code to tweak them).

Other than that, I reckon it looks pretty good.
Paul.J.Murphy
Registered User
 
Posts: 9
Joined: Mon Jun 16, 2008 4:49 am
Location: Edinburgh, Scotland, UK

Re: Feeds and last modified / updated times

Postby Acyd Burn » Thu Oct 29, 2009 3:37 pm

Good suggestion. :) Can you add this to our bug tracker at the main site?

http://www.phpbb.com/bugs/phpbb3/
phpBB Development Team Leader [phpBB 3 Development]
Image
User avatar
Acyd Burn
Development Team Leader
Development Team Leader
 
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You

Re: Feeds and last modified / updated times

Postby Paul.J.Murphy » Thu Oct 29, 2009 4:42 pm

Acyd Burn wrote:Good suggestion. :) Can you add this to our bug tracker at the main site?


'tis done. :-)
http://www.phpbb.com/bugs/phpbb3/ticket ... t_id=53305
Paul.J.Murphy
Registered User
 
Posts: 9
Joined: Mon Jun 16, 2008 4:49 am
Location: Edinburgh, Scotland, UK


Return to [3.x/Olympus] New features discussion

Who is online

Users browsing this forum: MSNbot and 11 guests