X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/5666c43494064f07229b70cdf30a299aa2ba6e60..e112b8f385992ec4b3056d397802abe092547bb5:/doc/plugins/contrib/jscalendar.mdwn diff --git a/doc/plugins/contrib/jscalendar.mdwn b/doc/plugins/contrib/jscalendar.mdwn index 1b6eee4cf..8123b3132 100644 --- a/doc/plugins/contrib/jscalendar.mdwn +++ b/doc/plugins/contrib/jscalendar.mdwn @@ -1,28 +1,50 @@ -[[!meta title="Javascript equivalent of plugin 'calendar'"]] -[[!tag patch]] +[[!meta author="spalax"]] +[[!template id=plugin name=jscalendar author="[[Louis|spalax]]"]] -Hello, -we ([[Grésille|http://www.gresille.org]]) have a calendar (built using the [[calendar|plugins/calendar]] plugin) in the sidebar of our website. This caused the whole website to be rebuilded each night, and we did not like it. So I wrote a javascript equivalent of the calendar plugin. +# Jscalendar -Here are the differences compared to the [[calendar|plugins/calendar]] plugin. +Jscalendar is a javascript equivalent to the [[calendar|plugins/calendar]] plugin. + +## Description + +Here are some differences compared to this latter plugin. * Pros * No need to rebuild the page containing the calendar each time day changes, or a page (indexed by the calendar) is added, changed or deleted. This is particularly useful if you want to have this calendar in the sidebar. - * Handles the case where several pages appear the same day: a popup appear to let user choose the day he wants. * Smooth navigation among months. -* Neutral - * Most of options are defined in Ikiwiki's setup files instead of the options - of the directive. * Cons - * As a consequence, every calendar of the wiki must index the same set of pages. * Javascript :( . -You can see this plugin in action on [[our website|http://www.gresille.org]]. To see what happens when several pages happens on the same day, check the 15th of March 2012. +## Usage + +### Examples of directive + + \[[!jscalendar type="month" ]] + + \[[!jscalendar type="month" archivebase="calendar"]] + + \[[!jscalendar type="month" year=2014 month=08 pages="posts/* and !posts/*"]] + + \[[!jscalendar type="month" year=-1 month=08]] + +### Setup file + +This plugin uses the options used by the [[plugins/calendar]] plugin: + + 'archivebase' => "archive", + 'archive_pagespec' => "posts/* and ! posts/*/*", + 'week_start_day' => 1, + 'month_link' => 1, + +The `archivebase` and `archive_pagespec` can be overloaded by the very same +options of the directive. + +## Example -I do not know how contributions are processed, but if you want to include this plugin in Ikiwiki, I made a copy of Ikiwiki repository, with this new plugin (as well as the documentation for the plugin and the directive). +You can see this plugin in action on [[our website|http://www.gresille.org]]. - git clone http://spalax.homedns.org/git/ikiwiki +Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Jscalendar]] --- Spalax +-- Louis