WikiCalendar Plugin

Compatible with DokuWiki

  • 2012-01-25 "Angua" unknown
  • 2011-05-25 "Rincewind" unknown
  • 2010-11-07 "Anteater" yes

plugin Implements a simple calendar where each day is represented by a wiki page.

Last updated on
2010-09-02
Provides
Syntax, Action
Repository
Source

Similar to yearbox

Tagged with calendar

Installation

Download the tarball and unpack it into <dokuwiki>/lib/plugins. The folder will contain:

  • .tgz Plugin Manager

You can install the plugin via git.

% cd <dokuwiki>/lib/plugins
% git clone git://github.com/chimeric/dokuwiki-plugin-wikicalendar.git wikicalendar

Configuration

weekstart Determines the day the week starts (Monday/Sunday)

Syntax

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.

Demo

Screenshot

Bugs

Please report bugs at the designated bug tracker.

Changelog

A complete changelog is available here

Discussion

First, do NOT post bug reports here! Use the bug tracker instead.

About Feature Requests

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:

  • reoccurring events
  • any AJAX stuff
  • notification systems
  • or any other advanced calendar stuff
  • well … unless you provide patches of course ;-)

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">&nbsp;</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);
    }
  • Reason for empty configuration list: I am running PHP < 5.2 which means that timezone_identifiers_list (used in conf/metadata.php) is not available. akerbos 2010/10/25 15:05
1) pages
plugin/wikicalendar.txt · Last modified: 2012/01/29 09:56 by 203.95.109.149
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate