Closed (fixed)
Project:
Timeline
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2009 at 22:35 UTC
Updated:
18 Aug 2009 at 02:16 UTC
I'm trying out Timeline 6.x-1.x-dev under Drupal 6.13 and the latest dev version of date. I do not have Events module installed, nor do I want it. I'm a beginner to views, so may have done something wrong, but here's what I did:
Created a new content type for Timeline nodes
Added a Date field with type "Datetime"
Created a new view
Under Basic Settings, I set Style to "Timeline"
Added the following fields:
the Date field
the node title
the node body
Added filter: "Published"
Added page view and saved
In the Live Preview section, I'm getting the following errors:
* warning: date_format() expects parameter 1 to be DateTime, null given in mysite/public_html/drupal/sites/all/modules/timeline/timeline.module on line 443.
* warning: date_format() expects parameter 1 to be DateTime, null given in mysite/public_html/drupal/sites/all/modules/timeline/timeline.module on line 443.Is this, perhaps, a bug?
Comments
Comment #1
legion80 commentedI'm seeing the same error. I was using a different field, which uses datetime. The data uses historical dates (in the 1800's).
Comment #2
jfmoore commentedI think this error, for me anyway, was because I hadn't filtered the view to timeline content only, and it was trying, therefore, to render all content and was not, naturally, seeing the date field in all nodes. I have it working, now (I think), and will post a little toot when I can — hopefully later today.
I LOVE this module!!! My thanks to the author.
Comment #3
jfmoore commentedSorry for not posting the tutorial before now. I did it the next day and thought I had posted it. Apparently not, though, so here it is. If anyone sees any errors please post here.
Please note that I installed the July 8 dev version of Timeline which required SIMILE Timeline 1.2. I see that the module was updated on July 28 to use SIMILE Timeline 2.3, but I have not yet updated my installation.
--------------------------------------------------------------------------
Timeline and Views Tutorial
Install Timeline per instructions, and activate. I do not use the "Event" module. It is not necessary.
====================
New Content Type
====================
Create new content type to hold event nodes for your timeline. You may choose to not have these published if they are to only be used for your timeline. Remember, on the timeline display page, each event will have a popup which shows the body field contents.
Add field of type datetime with "select list" form element.
On field configuration page,
Years back/forward: whatever you want
Time increment: whatever you want
Required: Yes
To date: Optional
Granularity: I set to year, month, day
(if do not use hour granularity, change timezone handling to "no conversion")
Save
Back on the "manage fields" page, I like to rearrange the fields so that date, title, and body are at the top, but this is not necessary
(if you make any changes, save them)
Add nodes
----------------
Now, add 3 or more test nodes of the content type you just created. You will enter date, title, and body for each.
====================
View
====================
On Views page, click "add"
Give your view a name, like tl_whatever
Add description if you like
View type should be "node"
Click "next"
Under Basic Settings, click "unformatted"
Change radio button to "Timeline" and click "Update"
That takes you to the Timeline settings page
Here are the settings I used:
Type: Horizontal
Width: 100%
Height: 350px
Initial focus: First event
Main band unit: month
Summary band unit: year
Controls: disabled
Click "Update"
Also under "Basic Settings", change the "Items to display" to whatever you want.
Click "Update"
Add fields
-----------------
Must add in order of date, title, body. If you get them out of order, you can always rearrange them
Click + beside "Fields"
Change group to "Content" to show only those fields
Find your date field and check it
Click "Add"
Now, you are on the field config page. I'm not sure what any of this does, so the only thing I changed was label to "none"
Click "Update"
Probably see error msgs here, since have not filtered content yet. Most content will not have the date field module is looking for.
Click field + again
Change group to "Node"
Check "Node title"
Click "Add"
On config page, I didn't change anything
Click "Update"
Click field + again
Group to "Node"
Check "Node body"
Click "Add" and then "Update"
Filters
----------------
Add filter to show only your timeline content type:
Check "Node type" and click "Add"
Settings:
Operator: "Is one of"
Node type: "Your timeline content type"
Click "Update"
Errors should go away
Click "Save" to save all of the changes to your new view
While "Page" is showing in the select box, click "Add Display" to add a page display containing all the settings you just made.
Under "Page Settings" click "none" to give your page a path name
Give your page a name like "timeline-whatever"
Click "Update"
Click "Save" to save your view again
Now, you can click on "View 'Page' " to (hopefully) see your new timeline, and, if everything has gone as planned (does it ever?), then you should see a pretty chart with your events showing.
NOTE: If you later change your view, pay attention to whether you are in the default view or the page view. Don't know enough about Views, though, to know what to change in which and when, so you're on your own there.
Comment #4
xamanu commentedthanks for the tutorial. I'm going to use it for the future documentation.
closing.