[pmwiki-users] timeline integration

J. Meijer commentgg at hotmail.com
Fri May 4 20:25:00 CDT 2007



Hi Knut, long time no see. 

________________________________
> From: Knut Alboldt <pmwiki at alboldt.de>
> Hi !
> Still working on how to use PMWIKi for project management with nice
> gantt-output.
> My first attempt with jpgraph got stuck (it's getting rather complex).
> I now discovered "timeline" which also looks quite good.
> Has anybody already got some experiences with timeline ?

I don't even know it. 


> The implementation doesn't seem to be to hard, cause it all could be put
> into javascript-files and HTMLStyles or pmwiki generated HTML. But often
> the problem lies in the details ...

> I'll try to get the data input from the wiki-page using markups ( e.g.
> (:entry start=yyyy-mm-dd description=... :) which will be renders as
> javascript-code on the fly when the wiki-page is browsed. Possibly those
> data entries could be entered within forms - would be easer for the users.
> I still got some problem parsing date information, e.g. a line or markup
> with different date formats like:
> date: yy/mm/dd
> or
> date: tt.mm. - tt.mm.yyyy
> or
> date: from tt.mm. to tt.mm.
> and so on. Is there already a (php-)solution to parse that kind of data
> flexible which can be used (included) in other functions ? could this be
> done using regex intensively ?

Did you look at the new markupexpr.php recipy to see how Pm did it?

I think regexes can do it, but I didn't fully understand your date formats, could you give some examples? 


> Another question concerning the processing of markups:
> if I got some markups like:
> (:what text1:)
> (:date dateinformation1:)
> (:who person1:)
> (:what text2:)
> (:date dateinformation2:)
> (:who person2:)
> (:what text3:)
> (:date dateinformation3:)
> (:who person3:)
> how would the parsing be done: line by line or by varnames (first all
> "what", next all "date" etc) ? I need this to decide how to implement
> the data collection (first collect all data for one entry, then
> generating html when the next "whot" occurs)

Regular markups are processed line by line, so you can store the data with each line. The hard part is to decide when to output. The last record does not have a (:what:). Then again, a single blank line may indicate the end of a record? 

You may consider tagging the record with (:newrecord 1:) .. (:newrecord 2:) .. (:endrecord:), this way it is easier to find the end of a record and you can also specify the record name just once. 

In order to process the text before it is broken into lines, put in the markup near the beginning of the sequence. (Maybe) use Markup('name','fulltext',etc). 


> Or is it better to use pagetextvariables ? 

You should name them to have different names. Fe:

  what1: text1
  date1: dateinfo1
  who1: person1

  what2: etc

It would certainly be easier on the eyes. Probably a good idea. 

Maybe this would be best for you:

 (:record1:
  what: text1
  date: dateinfo1
  who: person1
 :)

You could then dissect the what/who/date fields with markup expressions from {$:record1}. 

  
> Can I use one name twice in a page ?

If I remember correctly pmwiki picks the last "value". 

> Knut

Hope this helps,

/jm


_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline


More information about the pmwiki-users mailing list