This is an old revision of the document!
Table of Contents
yearbox Plugin
By the same author
Compatible with DokuWiki
Anteater, Rincewind, Angua
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to monthcal, wikicalendar
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
As per development version on GitHub:
- Merge pull request #6 from micgro42/improveStyles (2018-09-09 14:21)
- Merge pull request #5 from micgro42/pageNameStrategy (2018-09-09 14:21)
- 🐛 Fix styles missing on templates with .dokuwiki on body (2018-09-08 15:56)
- ♻️ Refactor style code into .less syntax (2018-09-08 15:53)
- 🚚 Rename style.css to style.less (2018-09-08 15:30)
- 💡 Adding some more php doc-blocks (2018-08-27 21:45)
- ✨ Add config for multiple naming schemes (2018-08-27 21:36)
- ♻️ Extract several methods to make code clearer (2018-08-08 22:28)
- ✅ Add basic tests (2018-08-08 22:12)
- 🎨 More whitespace and style changes by idea autoformat (2018-08-08 22:02)
Examples/Usage
This plugin builds a HTML calendar for the given year, with a link to create a new page for each day of the year. Existing pages will have a tool-tip showing a preview of the page content. You can also use the recent= option to show only recent months, which is useful on the bottom of diary pages.
The purpose of the plugin is to easily create and manage diary, journal, and event pages. If you want to include a recent months calendar at the bottom of each of your diary pages then the include plugin is very helpful.
For example the following markup on your wiki page:
====== Yearbox test page ====== {{yearbox>recent=10;align=left}} {{yearbox>recent=200;align=left}} {{yearbox>year=2011,2013;months=5,6;weekdays=1,2,3,4,5}} {{yearbox>recent=1;ns=diary;name=day;size=15}} {{yearbox>recent=15;ns=journal;size=11}} {{yearbox>recent=45;size=10}} {{yearbox>year=2011;size=10;ns=events;name=jour}} ~~NOCACHE~~
…will result in these calendars.
As you can perhaps infer from the link tool-tip, the namespace/page-name is automatically created as follows:
- <ns>
- <year-month>
- <name>-<year>-<month>-<day>
Tip: The pagequery plugin can be quite useful if you want to display a list of recent entries, perhaps for use in a simple blog.
Syntax
Parameters:
Syntax | Explanation | Default |
---|---|---|
ns=<namespace> | root namespace in which to create the linked calendar pages | current ns |
recent=<num> | build calendar based on recent days, i.e. how many days should be visible before today (rounded up to whole months)—take precedence over other options! | 21 days |
year=yyyy[,yyyy] | build calendar for the given year, or range of years (inclusive) | current year |
months=<csv>1) | which months should be visible, 1=Jan, 2=Feb,…, e.g. months=6,7 (Jun,Jul) | all |
weekdays=<csv> | which weekdays should have links, 1=Mon, 2=Tue,… e.g. weekdays=1,2,3,4,5 (Mon to Fri)2) | all |
name=<name> | prefix for new page name, e.g diary, journal, day | day |
size=<num> | font size to use; this controls the width/height of the calendar table3) | 12px |
align=<direction> | align the year table left or right | centre |
* [] = optional
E.g.: {{yearbox>year=2010,2012;name=journal;size=12;ns=diary}}
Configuration and Settings
The month and day abbreviations can be changed in the language files. Currently only English is available.
Development
Nothing yet.
Change Log
- 2011-04-09: [0.1]
- Initial release
- 2011-05-02: [0.2]
- Bugfix release: incorrect dates for November/December (year was wrong); problems with URL Rewriting on
- 2011-05-08: [0.3]
- NEW: months and weekdays options, you can now make certain months and weekdays invisible (removes links in case of weekdays)
- FIX: bug with wikis where URL rewrite is on (? vs & at end of url)
- FIX: date logic problems: November and December were using wrong years!
- CSS: improved colour scheme and layout
- 2011-07-14: [0.4]
- NEW: align option, left, right [centered is default]
- CHG: internal rewrite for future flexibility
FAQ
Nothing here yet.
Discussion
Please use the discussion page.