Timeline TWiki Plugin

timeline.jpg

Timeline is a DHTML-based AJAXy widget for visualizing time-based events.

I use it to show a WebChanges timeline with the query below.

Syntax Rules

the
variable has the following parmeters:
  • DEFAULT - the url of the datasource
  • urltype - XML or JSON (defaults to JSON)
  • interval - (DAY, MONTH, YEAR, DECADE)
  • date - the initial date that the timeline will be centered on
  • height - height in pixels that the timeline area will use
  • width - width in pixels that the timeline area will use
  • orientation - horizontal or vertical (horizontal by default)

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %_%, i.e. Show a scrolling Timeline from a TWiki SEARCH

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Show a scrolling Timeline from a TWiki SEARCH

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Example (shows when Plugin is installed and running successfully)

Note that the JSON based output is much more reliable cross browsers, so only use xml is you really need to.

static file

The first example shows a timeline based on a pre-existing JSON file (http://home.org.au/pub/TWiki/TimelinePlugin/cubism.js)

To use data from a twiki topic, you need to set the SKIN=text and add ?contenttype=text/xml (to trick IE's XHTTPRequest into working) to the url

"http://10.10.10.20/trunk/bin/view/TWiki/TimeLineSearchJSON?contenttype=text/xml"
urltype="JSON"

TWiki SEARCH based timeline

This example uses the TimeLineSearchJSON topic to show the last 10 modified topics in all webs.

%!TIMELINE{ urltype="JSON" "http://home.org.au/cgi-bin/view/TWiki/TimeLineSearchJSON?contenttype=text/xml" interval="YEAR" height="450px" width="700px" date="29 Aug 2008" }% The example is made up of the the

variable that is converted into the client side javascript, and a TWiki statement that formats the results into the XML data format that the javascript requires.

%TIMELINE{
urltype="JSON"
"%SCRIPTURL{view}%/%SYSTEMWEB%/TimeLineSearchJSON?contenttype=text/xml"
interval="YEAR"
height="450px"
width="700px"
date="%DISPLAYTIME{"$day $month $year"}%"
}%

where TimeLineSearch contains

<data>
<!--
   * Set !SKIN = xml

the format of and event:  
   start="May 28 2006 09:00:00 GMT"
   end="Jun 15 2006 09:00:00 GMT"
   isDuration="true" 
   title="Writing Timeline documentation" 
   image="http://simile.mit.edu/images/csail-logo.gif" 
-->
%SEARCH{
".*" web="all" regex="on" nototal="on" noheader="on" nosearch="on" order="modified" reverse="on" limit="10"
format="<event start='$date' title='$topic' link='%SCRIPTURL{"view"}%/$web/$topic' >$summary(noheader)</event>"}%
</data>

Plugin Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running.

Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the BuildContrib.

  • If you have TWiki 4.2 or later, you can install from the configure interface (Go to Plugins->Find More Extensions)
  • If you have any problems, then you can still install manually from the command-line:
    1. Download one of the .zip or .tgz archives
    2. Unpack the archive in the root directory of your TWiki installation.
    3. Run the installer script ( perl _installer )
    4. Run configure and enable the module, if it is a plugin.
    5. Repeat for any missing dependencies.
  • If you are still having problems, then instead of running the installer script:
    1. Make sure that the file permissions allow the webserver user to access all files.
    2. Check in any installed files that have existing ,v files in your existing install (take care not to lock the files when you check in)
    3. Manually edit LocalSite.cfg to set any configuration variables.

%IF{"defined 'SYSTEMWEB'" else="

ALERT! WARNING: SYSTEMWEB is not defined in this TWiki. Please add these definitions to your TWikiPreferences, if they are not already there:
I Attachment Action Size Date Who Comment
elseEXT ajax manage 4.0 K 19 Mar 2008 - 08:48 UnknownUser  
jsjs cubism.js manage 3.7 K 19 Mar 2008 - 08:48 UnknownUser  
elseEXT ext manage 4.0 K 19 Mar 2008 - 08:38 UnknownUser  
elseEXT images manage 4.0 K 19 Mar 2008 - 08:48 UnknownUser  
xmlxml monet.xml manage 10.4 K 19 Mar 2008 - 08:48 UnknownUser  
elsebak monet.xml.bak manage 10.4 K 19 Mar 2008 - 08:38 UnknownUser  
elseEXT scripts manage 4.0 K 19 Mar 2008 - 08:48 UnknownUser  
elseEXT styles manage 4.0 K 19 Mar 2008 - 08:48 UnknownUser  
jsjs timeline-api.js manage 8.1 K 19 Mar 2008 - 08:48 UnknownUser  
elsebak timeline-api.js.bak manage 8.1 K 19 Mar 2008 - 08:38 UnknownUser  
elsecss timeline-bundle.css manage 3.2 K 19 Mar 2008 - 08:48 UnknownUser  
elsebak timeline-bundle.css.bak manage 3.2 K 19 Mar 2008 - 08:38 UnknownUser  
jsjs timeline-bundle.js manage 85.1 K 19 Mar 2008 - 08:48 UnknownUser  
elsebak timeline-bundle.js.bak manage 85.1 K 19 Mar 2008 - 08:38 UnknownUser  
jpgjpg timeline.jpg manage 34.5 K 19 Mar 2008 - 08:48 UnknownUser  
elsebak timeline.jpg.bak manage 34.5 K 19 Mar 2008 - 08:38 UnknownUser  
pngpng wikiringlogo20x20.png manage 1.3 K 19 Mar 2008 - 08:48 UnknownUser  
elsebak wikiringlogo20x20.png.bak manage 1.3 K 19 Mar 2008 - 08:38 UnknownUser  


EditAttachPrint versionHistory: r2 < r1BacklinksRaw ViewRaw editMore topic actions