====== yearbox Plugin ====== ---- plugin ---- description: [PHP 7.2 - 8.0] Create simple year or recent month(s) calendars, with a new page link for each day author : Michael Große (formerly: Symon Bent) email : mic.grosse+dokuwiki@googlemail.com type : Syntax lastupdate : 2021-03-19 compatible : Hogfather depends : conflicts : similar : wikicalendar tags : calendar, diary downloadurl: https://github.com/micgro42/yearbox/zipball/master bugtracker : https://github.com/micgro42/yearbox/issues sourcerepo : https://github.com/micgro42/yearbox donationurl: https://paypal.me/GrosseM ---- :!: :!: **This Plugin needs at least PHP 7.2!** :!: :!: (If you absolutely have to run a PHP version that is End of Life since long ago, you can install the last [[https://github.com/micgro42/yearbox/zipball/3d1075d384f31c6893bc0571f5998927f9ac3853|PHP 7.0 compatible version]].) ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. As per [[https://github.com/micgro42/yearbox/zipball/master|development version]] on GitHub: {{rss>https://github.com/micgro42/yearbox/commits/master.atom date}} ===== 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 [[plugin:include|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. {{ https://trello.com/1/cards/6368e98436ccad001ca1efa4/attachments/6368ea1fa25bdd0058b26d3c/download/sample-of-yearbox.png?recache |Yearbox Example Screenshot}} The namespace/page-name is automatically created as follows: * * * --- **Tip:** The [[plugin: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((''[]'' = optional)) ^Explanation ^Default | |''ns='' |root namespace in which to create the linked calendar pages | current ns | |''recent='' |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)\\ :!: year must be ≥ 1902 | current year | |''months=''((csv = comma separated values)) |which months should be visible, 1=Jan, 2=Feb,..., e.g. months=6,7 (Jun,Jul) | all | |''weekdays='' |which weekdays should have links, 1=Mon, 2=Tue,... e.g. weekdays=1,2,3,4,5 (Mon to Fri)((useful for school calendars, etc..)) | all | |''name='' |prefix for new page name, e.g diary, journal, day | day | |''size='' |font size to use; this controls the width/height of the calendar table((fontsize= also works)) | 12px | |''align='' |align the year table left or right | centre | 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. A few languages are already available. Feel free to add your language on [[https://translate.dokuwiki.org/plugin/yearbox|yearbox translation page]]. ===== Development ===== **Releases:** {{rss>https://github.com/micgro42/yearbox/releases.atom description author}} === Change Log === See [[https://github.com/micgro42/yearbox/blob/master/CHANGELOG.md|CHANGELOG.md]]. ===== FAQ ===== :!: MAKE SURE YOU USE **%%~~NOCACHE~~%%** ON THE PAGE! ===== Discussion ===== Please use the [[plugin:yearbox:discussion|discussion]] page.