DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:wikicalendar

This is an old revision of the document!


WikiCalendar Plugin

Compatible with DokuWiki

2013-05-10 and 2012-10-13 and 2012-01-25 and 2011-05-25

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

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 calendoku, minical, monthcal, noticeboard, yearbox

Tagged with calendar

Installation

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

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

test

Screenshot

Bugs

Please report bugs at the designated bug tracker.

Changelog

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

—-

I was able to use this plugin with the new version of dokuwiki. I pasted the style.css of the plugin in to the design.css of the theam.

Don't know that this is “difficult” but it would be really handy: Could the plugin have a simple config parm that tells it that, when a new page is created, to insert the related calendar date (from the page name) as an H1/H2/H3/H4/comment at the top of the new page?


How can you define the content of the abstract ? At the moment, the full page is displayed inside the day block in the calendar… Tried with description and meta plugin, but still no solution

Thanks Antonio

solution: in syntax.php edit the line:

$out .= '<div class="abstract">' . p_get_metadata($wp, 'title') . '</div>' . DOKU_LF;

- as you see I use the first header/title as shown content. The list of available stuff is found here: data structure tim 25.01.2014

1)
pages
plugin/wikicalendar.1391651668.txt.gz · Last modified: 2014-02-06 02:54 by 71.39.210.137

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki