Implements a simple calendar where each day is represented by a wiki page.
Compatible with DokuWiki
Similar to yearbox
Download the tarball and unpack it into <dokuwiki>/lib/plugins. The folder will contain:
You can install the plugin via git.
% cd <dokuwiki>/lib/plugins % git clone git://github.com/chimeric/dokuwiki-plugin-wikicalendar.git wikicalendar
| weekstart | Determines the day the week starts (Monday/Sunday) |
|---|
The syntax is as follows.
{{cal>namespace}}
New calendar events1) are created inside the given namespace in the form of yyyy:mm:dd. If you mouseover a day in the calendar view for which a corresponding page exists a small pop-up will show a short abstract of the whole page.
Please report bugs at the designated bug tracker.
A complete changelog is available here
First, do NOT post bug reports here! Use the bug tracker instead.
I'd like to make clear that the intention of this plugin is to keep it as easy as possible, to me, that's its current state. I will not implement:
Why? Because working with dates is a bitch and hundreds of other smart people on this rock already turned their brains into pudding while developing real calendar applications
. If you need something advanced I recommend to use the google cal plugin. — chi 2009/10/16 15:20
Is it posible to resize the calendar? Maybe any css file? Could you explain how I could make the calendar smaller?
Thanks,
Alex
If choost start from Sunday, you should add this code to the /dokuwiki/lib/plugins/wikicalendar/Syntax.php to fix blank fields bug. example: August 2010
// create blank fields up to the first day of the month $offset = ($this->getConf('weekstart') == 'Sunday') ? 0 : 1; if(!$this->firstWeek) { if(($offset != 0) or ($this->MonthStart != 7)) //Add by Achilles 00248 行 while($wd < ($this->MonthStart - $offset)) { $out .= '<td class="blank"> </td>'; $wd++; } // ok - first week is printet $this->firstWeek = true; }
resize the calendar. /dokuwiki/lib/plugins/wikicalendar/style.css
/* Modifed by Achilles 2010.9.19 */ div.dokuwiki div.plugin_wikicalendar { width: 94%; } div.dokuwiki table.plugin_wikicalendar{ width: 100%; } div.dokuwiki table.plugin_wikicalendar td { width:14%; } div.dokuwiki table.plugin_wikicalendar div.noevent, div.dokuwiki table.plugin_wikicalendar div.isevent { width: 3em;/* 7em; */ } div.dokuwiki table.plugin_wikicalendar td.day:hover div.abstract, div.dokuwiki table.plugin_wikicalendar td.today:hover div.abstract { left: 10px;/* 70px; */ width: 8em;/* auto; */ }
for dokuwiki-rc2010-10-07.tgz you should edit /dokuwiki/lib/plugins/wikicalendar/Syntax.php
function _calendar_day($wp, $day) { global $lang; global $ID; if(file_exists(wikiFN($wp))) { $out .= '<div class="isevent">'; if(auth_quickaclcheck($wp) >= AUTH_READ) { $out .= '<a href="' . wl($wp, array('do' => 'edit', 'plugin_wikicalendar_redirect_id' => $ID, 'plugin_wikicalendar_month' => $this->showMonth, 'plugin_wikicalendar_year' => $this->showYear)) . '" class="plugin_wikicalendar_btn" title="' . $lang['btn_edit'] . '"><img src="' . DOKU_BASE . 'lib/images/edit.gif" alt="' . $lang['edit_btn'] . '"/></a>' . DOKU_LF; } $out .= '<div class="day_num"><a href="' . wl($wp) . '" class="wikilink1" title="' . $wp . '">'.$day.'</a></div>'; //Modifed by Achilles 00310 行 p_get_metadata(...ture) $out .= '<div class="abstract">' . p_get_metadata($wp, 'description abstract', ture) . '</div>' . DOKU_LF; } else { $out .= '<div class="noevent">'; if(auth_quickaclcheck($wp) >= AUTH_CREATE) { //$out .= $this->_btn_add_day($wp); $out .= '<a href="' . wl($wp, array('do' => 'edit', 'plugin_wikicalendar_redirect_id' => $ID, 'plugin_wikicalendar_month' => $this->showMonth, 'plugin_wikicalendar_year' => $this->showYear)) . '" class="plugin_wikicalendar_btn" title="' . $lang['btn_create'] . '"><img src="' . DOKU_BASE . 'lib/images/edit.gif" alt="' . $lang['edit_btn'] . '" /></a>' . DOKU_LF; } $out .= '<div class="day_num">'.$day.'</div>'; } $out .= '</div>'; return ($out); }
timezone_identifiers_list (used in conf/metadata.php) is not available. akerbos 2010/10/25 15:05