Hi! I'm working on setting up Serendipity for a blog that needs to list postings by week, but I'm having problems with the "View by week" archive display. Postings appear to be from one week later than they actually are.
The site is here:
http://www.mcxl.se/serendipity/
Postings made today (which is week 40, right?) appear to be from week 41:
http://www.mcxl.se/serendipity/index.ph ... 6/W41.html
Also, the listings of number of post in the archive list in the sidebar is off. It says that week 39 (vecka=week in Swedish) has 3 posts, although those three posts are from week 40 and actually appear under W41.html
Can anyone help me with finding out what is wrong here? I don't think I've done anything that would mess this up, even though I can admit I've been a bit brutal with the template to fit in my design
H / Ludvig
Week view off by one?
-
klinteberg
- Regular
- Posts: 5
- Joined: Thu Oct 05, 2006 5:17 am
Ok... now I've been looking at this code for a while and created a makeshift plugin that does what I want (though I don't know PHP or s9y). On the blog linked to above my solution is the lower of the two week lists.
The problem with the links outputed by seems to by in serendipity_archives_plugin, on line 405 of plugin_internal.inc.php:
This sets the week to begin with sunday, and thats why the week number in the list is off by one. I changed this to
which seems to do it.
Then comes the ugly solution. I simply coded the links reading "Week N" to link to W(N+1).html to get to the right place. It's not beautiful, but it works, even though I had to remove the title to make it look alright =)
Well, that's it. I don't know if this problem is something local depending on the setting of the server, but it should anyhow be looked into.
The problem with the links outputed by seems to by in serendipity_archives_plugin, on line 405 of plugin_internal.inc.php:
Code: Select all
$ts = mktime(0, 0, 0, date('m'), 1);Code: Select all
$ts = mktime(0, 0, 0, date('m'), 2);Then comes the ugly solution. I simply coded the links reading "Week N" to link to W(N+1).html to get to the right place. It's not beautiful, but it works, even though I had to remove the title to make it look alright =)
Well, that's it. I don't know if this problem is something local depending on the setting of the server, but it should anyhow be looked into.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Thanks a lot for telling us! I must admit I'm not yet that familar with the View-by-Week Code, since someone else wrote it. I'll try to look at it to see if a more proper patch can be made and included in the distro!
Best regards,
Garvin
Thanks a lot for telling us! I must admit I'm not yet that familar with the View-by-Week Code, since someone else wrote it. I'll try to look at it to see if a more proper patch can be made and included in the distro!
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/