WordPress.org

Ready to get started?Download WordPress

Forums

WP SIMILE Timeline
[resolved] using fields other than "postdate" to drive simile timeline (6 posts)

  1. nicholasthorpe
    Member
    Posted 1 year ago #

    Hi there,
    I am using the timeline in a family history, where there are plenty of pre-1970 dates. Simile Timeline seems to look at the post date to get the date which it uses in placing the post on the timeline.

    Can I configure Simile to look at another field - say, a custom date field? Currently most of my family history looks like it happened in 1970!

    I love your plugin.

    Nicholas

    http://wordpress.org/extend/plugins/wp-simile-timeline/

  2. freshlabs
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, there is a custom date panel in every post interface. Just scroll to the bottom of your post edit screen. There should be a box titled "SIMILE Timeline" where you can define start and end dates (useful for events with a duration).

    If at least a start date is set here, these setting will override the default publish date to which the post is drawn onto the timeline (You'll have to activate the checkbox "Edit date" when you want to change the start/end date. Otherwise the values are ignored on post save/publish).

  3. nicholasthorpe
    Member
    Posted 1 year ago #

    Thanks for the quick response. Sorry, I didn't explain in enough detail. The metadata for this project exists in an excel spreadsheet. There are 1800+ posts. I am importing the metadata (and creating the posts) into WordPress using csv importer. I have been assigning the actual date of the historical event to the "post_date" field in wordpress.

    This import process works well, and all post 1970 dates are displaying well - but during the import process the older ones get changed to "1970". So the suggestion from others has been to put the historical date into another field, and sort the posts by this custom field.

    However, this wont work for the timeline. So I was wondering if I could ask Simile somehow to look at a field other than "post_date" to pick up the date - and that way I could get around the problem. Is this possible.

  4. freshlabs
    Member
    Plugin Author

    Posted 1 year ago #

    Of course this is possible with a little tweaking. To be precise, there are two options:

    #1. You modify the data source (/data/timeline.xml.php) around line 146 where the start date is read. Instead of get_the_time() you can put in the according post meta field here e.g. get_post_meta($post->ID, 'post_date', true). Of course, if you're using this approach, the file will get replaced the next time you're updating the plugin.

    #2. You copy the timestamp within the database (via mySQL) from the post_date meta entry and insert it into the stl_timeline_event_start field in wp_posts. This should be possible to implement in the csv importer you're using.

  5. nicholasthorpe
    Member
    Posted 1 year ago #

    Thanks! I will give one of those a try.

    Nick

  6. baluo
    Member
    Posted 1 year ago #

    (You'll have to activate the checkbox "Edit date" when you want to change the start/end date. Otherwise the values are ignored on post save/publish).

    I have just discovered your program and try to find my way around it. I have found and edited the "Event Start/End" box, but

    1. I can not find the check box mentioned above and thus have the dates reset to present day

    2. don't know what the difference is between "Start/End Date" and "Latest Start/Ende Date".

    Many thanks for any advice.
    Gerhard

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic