Implement supported fields as plugins

Grayside - October 13, 2009 - 04:31
Project:Timeline
Version:HEAD
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

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.

#1

xamanu - October 15, 2009 - 11:36
Status:active» postponed (maintainer needs more info)

I'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.

#2

Grayside - October 16, 2009 - 03:45
Title:Geologic Time» Interpreting Arbitrary Numbers as Parts of a Date

I'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 with selector widget

#3

Grayside - October 15, 2009 - 21:31
Status:postponed (maintainer needs more info)» active

More information provided.

#4

xamanu - October 19, 2009 - 12:30
Status:active» postponed (maintainer needs more info)

1. 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.

#5

Grayside - October 20, 2009 - 16:35

1. 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?

#6

xamanu - October 22, 2009 - 10:10
Title:Interpreting Arbitrary Numbers as Parts of a Date» Supported fields as plugins
Version:6.x-2.0-beta4» HEAD
Category:support request» task
Status:postponed (maintainer needs more info)» active

I 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.

#7

Grayside - October 24, 2009 - 07:59

I 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?

#8

ricklawson - October 28, 2009 - 15:06

There 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)

#9

SocialNicheGuru - October 28, 2009 - 17:06

can 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

#10

xamanu - November 17, 2009 - 22:38

@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.

#11

xamanu - November 17, 2009 - 00:26
Title:Supported fields as plugins» Implement supported fields as plugins

The 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! :-) )

 
 

Drupal is a registered trademark of Dries Buytaert.