Closed (fixed)
Project:
Timeline
Version:
6.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2009 at 04:31 UTC
Updated:
3 Jun 2011 at 20:51 UTC
I wish to use Timeline to display events that occur across a geologic timescale. Unfortunately, the Date module does not readily provide that.
I have already mocked up the content type using a pair of Number fields to substitute for the Date field, but, of course, Timeline does not support CCK types other than a Date field.
I am willing to put development time into this, but I'm not sure where to start. Any pointers would be very appreciated.
Comments
Comment #1
xamanu commentedI'm not really sure what exactly you want to implement. And what is exactly the thing that the date module is not providing.
Please give more information. I'm open to help you to jump on it. And I'd appreciate new input and help on this module's development.
Comment #2
Grayside commentedI've done additional digging to clarifying my thoughts, and it comes to this: Date does not support negative years or years with more than four digits. (As far as I can tell.)
The options are to enhance Date to deal with this, but it seems like a significant corner-case for it's goals, or to expand the methods by which Timeline can get its information. It seems to me that expanding on the "data sourcing" of the Timeline module would be of better use to it than the ability to put Rome's original birthday on a Calendar.
Thus, I am asking how to go about telling the Timeline module to interpret a given Views field as a Year, Month, etcetera, and thereby do an end run around Date's helpful limitations.
#273251: BCE dates in the cck date field
Comment #3
Grayside commentedMore information provided.
Comment #4
xamanu commented1. Wouldn't it be better to change the date module in order to support negative and more than 4 digit year specifications? I think this is the correct place for handling all kinds of date problems.
Have you already filed a ticket in the date module and got some responds?
2. If there isn't anybody responding or they negate to implement it we could have a look together on how to integrate your request into the timeline module. You could write a patch and I would be open to include it.
Comment #5
Grayside commented1. I looked closer at the existing discussion, and the Date API code. The issue I linked to above seems dead in the water, and I would not be surprised if it was left for a future, major reworking of Date that folds in support for alternate calendar systems.
Peering at the Date API code, this looks like a major change, tinkering with fundamental assumptions the Date API makes to protect users from break the limitations of storing a date in 32 bits.
2. The last response from a Date developer was June 2008. Supporting dates before 100 AD is the subject of that ticket. If that much is not doable, I don't expect -10,000 to be on the table.
It looks like the Exhibit module might be better suited for this kind of flexibility. It looks kind of dead as well, so I'm not sure where to pitch my effort. Is this functionality that you'd like to see here?
Comment #6
xamanu commentedI would like to see an abstraction layer in the module so that different supported fields could live in "plugins". In general, I'm really open to add your desired functionality but I'd like to do it well. This means that it is more and deeper work that you might expect. You are really welcome to support this.
I'm tagging it HEAD. It would be great to work on it for a 2.1 release of the module.
We would have to redesign some of the code. As I can see, one important thing is that the date conversion must happen inside of the plugins.
Comment #7
Grayside commentedI suspect that would be your take on it. I like this idea. I imagine you mean plugins to Timeline rather than to Views.
I'd like to help, so I've looked over Timeline-6.x-2.x trying to understand the necessary changes.
Files to Touch
views_views_plugin_style_timeline.inc: The code starting at Line 26 related to $field_names/$date_field_names needs to be replaced with Plugin System.
timeline.module: timeline_date_conversion needs to be fed prepared dates.
Technical Conundrums
There remains a number of points where my specific issue with date limitations comes up. The technical limitations of Unix Time/date() are 32 bits of signed integer. It is not possible to cover ancient history in that range. Do you have some idea of how you want to approach this?
Comment #8
rachel_norfolkThere might be a lot of sense in this plugin idea. I'm trying to think how to use this module to represent a timeline that is not tied to a particular calendar date but one where events are tied to +/- days around a target date (like T-2 days to launch of a rocket for example).
No idea yet as to whether the SIMILIE widget will even support this but willing to learn (and contribute where I can)
Comment #9
socialnicheguru commentedcan timeline work with:
node: posted date
node: updated date
node: commented date
This would be great addition if it not already part of the module.
Chris
Comment #10
xamanu commented@Grayside
When the date conversion would be part of the plugins you could do date conversions without going through the unix time stamp format. So this shouldn't be an issue, as I can see right now.
@ricklawson
Unfortunately your idea is not supported by the SIMILE timeline libraries. So you would have to contribute to them.
@activelyOUT
The timeline module works with, node: posted date node: updated date but not with the node: commented date. We should consider the integration of the latest one when building the plugin support.
Comment #11
xamanu commentedThe beautiful Chaos Tools module provides an API to create plugins based on .inc files. This should probably be the way to go. The feeds module has implemented the ctools' plugin API and could be a good help to look at (since there is not much documentation, yet).
I'm working experimentally on this issue on my github account. You are welcome to join the work (fork it! :-) )
Comment #12
dedalu commentedSubscribing.
Comment #13
KrisBulman commentedSubscribing
Comment #14
KrisBulman commented...
Comment #15
xamanu commentedI'll post here when it is done! Please notice that I'm working in my leisure time on this module and right now I'm pretty busy. I'd say within 4-8 weeks it should be done. Some contribution would be nice, rather than unnecessary questions (sorry for clear words).
Comment #16
pkej commented@Grayside:
For historical dates julian days would be the best storage option. For geological timescale it seems that days isn't something of interest at all, instead you would just keep track of years.
Personally I've found that the Date API doesn't allow for a lot of stuff, just the year, just the month, fuzzy dates (sometime between january 1001 and and february 1001) and all the grubby stuff that is involved in dating historical stuff. For a lot of historical figures we might not even know the exact year of a birth/death.
All in all a plugin system might help out with the timeline, as for the particulars of replacing date api, there would be a need to create a completely new date library.
Storage for years would probably be a float for your needs.
Some resources:
#259308: Allow "fuzzy" granularity There is a patch at: #114 in that issue for date-6.x-2.x-dev
http://www.csgnetwork.com/juliandaydate.html?dayofweek=Tuesday&MonthList...
http://www.mail-archive.com/mysql@lists.mysql.com/msg115265.html
Comment #17
pkej commentedThere is a timeline example (I went hunting for examples) at hominin.net, where I guess the timescale is "million years".
The timescale uses something like 4.4ma (million years ago?), thus it seems that it might be possible to create a T-2 days like system.
Also if you move the top band on this timeline you will be able to scroll further back than 10 millenia bc.
It seems the library for the timeline is quite flexible. I do wonder if a computed field in your data could be used to represent dates to the module?
Comment #18
Grayside commented@pkej Quite right, I am fine with year granularity for purposes of the timeline display. (Events with more granularity would have other displays in any case.)
Timeline just needs to support those alternate mechanisms. This piece of my project went on hold, as I haven't had time to dig into this module.
Comment #19
xamanu commentedThe new, experimental, timeline 3.x branch has basic support for ctools plugins, views 3.x and the newest timeline libs.
Programmers could check it out to see how to implement support for other date types. Users and site builders are welcome to test the new branch by installing it.
Comment #20
xamanu commentedThe ctools plugin implementation has been simplified a lot with the newest commit on master. You can easily download the snapshot.
You are welcome to check out the existing plugins and you can provide new plugins to timeline in Order to provide other date sources (such as f.e. a normal text field, that could work, with some validation, to use historical - BC - dates). You also can provide plugins for supported image sources for the icon used by the timeline and nevertheless new timeline themes can be included through plugins.
Be advised that the code is still very unstable. But I really could need some testing and feedback. Thank you.
Comment #21
xamanu commentedThe newest timeline 6.x-3.x-dev version should work by now and allows extending supported fields by other modules.
This needs documentation now, which should be done implementing an example: #722282: Timeline with BC Dates