Closed (fixed)
Project:
Timeline
Version:
5.x-1.x-dev
Component:
Compatibility
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Apr 2007 at 09:01 UTC
Updated:
20 May 2007 at 14:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
Arto commentedBy API do you mean the ADOdb Date/Time library? If you do have the library installed, you may still be the very first one to ever try using the CCK date field + timeline on Drupal 5.x, so it could be just a simple problem that is quickly fixed. Jeff (the 5.x branch maintainer) may be able to help you out further.
As for the vertical timeline display, there is a known problem with that. Indications at present are that it needs to be fixed upstream in the SIMILE widget itself. I will add a warning about it to the README.txt.
Comment #2
Arto commentedHmm, on closer examination, you said date-range field. I'm not sure anyone's tried that before. The module has so far been used with two separate CCK date fields, one for the start date and one for the end date. In other words, it's probably not going to work as is. Changing this to a feature request.
Comment #3
JohnG-1 commentedThanks Arto
These references might be useful to anyone clever enough to understand the code:
theme_date_display_combination.function calendar_build_field_queryhas a section dealing with fromto formatted date fields ... around line 1083; wordsearch string: "handling for from and to date ranges".Comment #4
jmiccolis commentedJohnG, this is on my list to take a look at. Hopefully I'll be able to take a crack at this soon, it should be reasonably straight forward to implement.
Comment #5
JohnG-1 commented@ jmiccolis
Great! :) Please let me know if I can help with testing / review ... or if I can help with anything for that matter :)
Comment #6
jmiccolis commentedAttached is a patch that provides date module end-date support. I would appreciate any feedback / testing.
Comment #7
JohnG-1 commented@ #6 timeline_daterange.patch
I've applied this on my test site (not a clean install... but all new views, date, cck, etc modules) but I'm having problems :(
I'm using a single D-ranged datestamp field for the daterange. The order of the fields in the view seem to have a major effect ... but I can't find a combination that gives the desired result ... what should the view field order be ?
case 1
view field order = daterange / title / none / none
... timeline displays nothing at all.
case 2
view field order = daterange / daterange / title / none
... timeline displays correct title
... timeline displays only $start-date as a point (not a block) perhaps because $start_field & $end_field have the same value ?
case 3
view field order = title / daterange / none / none
... timeline displays correct title
... timeline displays a block representing the period from Wed, 31 Dec 1969 23:59:59 GMT to $start-date.
case 4
view field order = title / daterange / daterange / none
... timeline displays the $start-date as title
... timeline displays a block representing the period from Wed, 31 Dec 1969 23:59:59 GMT to $start-date.
for reference: README.txt says
Comment #8
jmiccolis commentedJohnG - I realize I should have posted a couple more details with my patch. Because the end date is included in the field the date module provides the other stuff is bumped up, i.e. field 1 is the date-range, field 2 (if available) is the title & field 3 (if available) is the body. I realize that this is different than what is in the readme, but it seems to make the most sense.
Getting to you real issues - it's troubling that the timeline doesn't show up with your first & second case - can you try removing the title (so you just have one field that is the date module field) and see if that works?
Also what version of the date module are you using?
The last two cases you posted behave as I would expect them to. In both cases the timeline is trying to use the title as a start date (and failing so you get the item starting at unix 0 time) and because of way the date module field works it's using the date module from as the end time. The third and fourth field are behaving correctly.
Comment #9
JohnG-1 commentedthanks for clarification jmiccolis
date.module // $Id: date.module,v 1.32.2.40 2007/04/19 20:35:25 karens Exp $ ... that's the 5.x-1.x-dev downloaded today
case 5
view field order = daterange / none / none / none
... timeline displays correct title
... timeline displays only $start-date as a point (not a block)
Comment #10
jmiccolis commentedI think I know whats going on here - I was testing with a content type that used the date module supplied "date" field, as opposed to the "datestamp" which you are using. I've just tested with a "datestamp" field and I can confim that it doesn't work.
I'll need to update the patch to provide support for that field type.
Comment #11
JohnG-1 commentedI'm having the same problem with iso date fields ...
Comment #12
karens commentedI worked up a patch to get this all working since I needed a timeline with historical CCK dates. I changed the way things are done a bit so that you just use 3 fields in the view -- the date field, the title, and the body. For both Events and CCK dates, you can get both the start and end date from the same field, so there is no need to enter 2 date fields. This reduces the number of joins and the size of the query which should help efficiency.
In addition to that, I changed the logic a bit to check 'isset' instead of '!empty' on the item values, since I ran into problems on queries that had empty date fields in the first item returned by the query. The original method would use the node created date instead of my date field if the first item had an empty value. By checking isset instead, you can be sure the module is pulling the right data from the query results, and empty date fields just get thrown out.
I also changed the README text to reflect the new method.
I tested this with event fields and CCK date fields. I didn't test CCK datestamp fields, but only saw one place a change would be needed to get that working (use adodb to convert the timestamp value so historical timestamp fields are converted correctly) so they *should* work.
Comment #13
karens commentedDid some more testing and found something interesting I never realized before. If you use a CCK datestamp field and try to create a very old date (before 1901) the value you create is too big to be stored as an INT field and will be truncated to a date in 1901. To store that old date you need a BIGINT field instead. The Date module doesn't use the BIGINT field now, and I'm not sure it should, so if you want to do very old historical dates using the Date module, you should use the ISO format instead.
Comment #14
karens commentedIf anyone is interested, I have a live working 5.x version of Timeline using CCK Date fields embedded in a book page at http://www.elderweb.com/home/node/9672.
Comment #15
jmiccolis commented@Karen, Thanks for the patch!
@JohnG, as you reported this - please confim that Karen's patch works for you, and I'll commit it.
Comment #16
JohnG-1 commentedYay! this works for me on ISO date-range fields (but not UNIX datestamp ranges).
As Karen points out, datestamps can be a bit restrictive anyway; so I'm happy enough to use ISOs and leave datestamps un-supported.
... I vote commit this patch and put datestamp-ranges on the To Do list ;-)
Many thanks to both of you
:-J
Comment #17
jmiccolis commentedKaren, I really do want to see date module support in timeline, however it seems like your patch removes support for event module end dates. People, including myself, are using the event module with timeline, so I can't commit this patch if it removes event module support.
Comment #18
karens commentedIt does not remove support for event module end dates, it just removes the need to add both the start and end dates which makes the query simpler and faster. Both the start and end dates are available from either the start or end date, so you only need to add one of them and the code will pick up the other.
Comment #19
jmiccolis commentedThanks for the clarification, this has been committed.
Comment #20
(not verified) commented