DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:wikicalendar

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 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

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 possible to make a RSS-feed to an external source? I would like to be able to show the calendar on my other website.

Thanks,

Nero


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

Spanish language for Wikicalendar

I tried sent you the files with Spanish language for Wikicalendar, but I received an error message about non exist email.

Can you send them to anyone email? Thanks!

Unable to create new entries

Hi I have installed the plugin and can see the calendar on my page but I am unable to create an entry for a particular date? What syntax should I use?

Thanks in advance for your help. Marcel.

You're not seeing the create button because it references an image that doesn't exist. To fix edit button not showing - in syntax.php:

  • Edit _calendar_day function to replace image lib/images/edit.gif with another in the lib/images folder on lines 307 and 315. The example code below shows using lib/images/info.png.
     $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/info.png" alt="' . $lang['edit_btn'] . '" /></a>' . DOKU_LF;

To fix namespace creation - in syntax.php:

  • Edit variable on line 126 to the following
    $this->calendar_ns = $INFO['namespace'];
1)
pages
plugin/wikicalendar.txt · Last modified: 2016-02-20 20:32 by Aleksandr