Table of Contents
gCalendar Plugin
Compatible with DokuWiki
No compatibility info given!
This extension is marked as obsoleted. Therefore it is hidden in the Extension Manager and the extension listing. Furthermore, it is candidate for removal.
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
This plugin extends DokuWiki to show a monthly-calendar build up from one or more wiki-pages. I wrote this plugin to use it as a family-calendar and to coordinate my driving-community at work.
Download | gcalendar_20061219.zip |
---|
This plugin is not compatible to PHP 7.0 or higher
Development discontinued
At work we changed from DokuWiki to MediaWiki (it wasn't my decision!). I am sorry, but I can't continue the development of the gCalendar Plugin.
All the best, Frank.
TO-DO: Syndication from Google calendar would be the best instead of the separate calendar…
Ahmet Sacan's enhanced version http://sacan.biomed.drexel.edu/ahmet/index.php?id=software:dokuwiki:gcalendar
Syntax
Include a calendar to your wiki page by using the following command-syntax:
<gcal <parameter-1>=<value-1> <parameter-1>=<value-1> ... >
Description of the parameters
mode=<string>
<string> could be month
, week
or day
. month
is default.
pages=(<item-1>,<item-2>,...)
A comma-separated list of wiki-pages
or namespaces
or groups
. These are the source of the date data that will be used to populated the calendar. A group
is a list of wiki-pages/namespaces enclosed by round-parenthesis delimited by a pipe-symbol '|'. You can also add a name to a group. See examples below. You can use @USER@ and @ID@ as a macro for current-user and current-page. If the user is not logged in, @USER@ is expanded to the literal 'guest´.
Starting with release 2006-11-10 you can address a single section of a wikipage by using a “#”.
Attention:
You can select any internal wiki-pages you like to. But the pages and namespaces must not include spaces, because spaces are used to separate the parameters.
year=<number>
The year to display. Optional. Default is current year.
month=<number>
The month to display. Optional. Default is current month.
day=<number>
The day to display. Optional. Default is current day.
offset=<number>
Offset relative to given month, week or day. offset=1 means next month (when mode=month). A negative offset shifts backwards (e.g. -2 would be the day before yesterday)
days=<number>
Only applies to week- or day-mode. Overrides the default number of days to display (7=week-mode, 1=day-mode). You can set it to 5 to omit the week-end (Sat/Sun). Or set it to 10 to see a little more than one week.
pagelinks=<string>
<string> can be show
, hide
or auto
. auto
is default. Specify if you like to display the links from the calendar-entries to the origin-pages.
pagelinks= … | description |
---|---|
show | shows the links to the origin page after each date-entry |
hide | suppress the links to the origin-pages |
auto | default. Only shows the links if more than one page is the origin of a column |
debug
If this option is set, the complete gcal-command printed above the calendar in red color. For debugging and documentation purposes.
notoc
Disables the automatic table-of-contents (TOC).
cache
Enables page-caching. Must be set in the last gcal-command of a page.
nested
With this option set, namespaces are scanned recursively. I.e. with 'pages=(:calendar:*)' and option 'nested' the calendar shows up all events of the namespace ':calendar' and the events of all its subnamespaces.
dayshift=<number>
Positive or negative number of days to move the yellow today-marker.
lang=<string>
Specify the 2-digit language-code to switch the plugin to a different language than the current main language of your wiki.
compact
Smaller representation of dates with no events to save space. See dropempty.
dropempty
Works in conjunction with compact. Drops dates with no events.
noheader, nohead, nofoot, nonav
- “nonav” removes navigation part of the calendar
- “nohead” removes the columnheaders
- “nofoot” removes the columnfooters
- “noheader” removes all of the above mentioned parts
Event Types
Events appear in your source wiki pages as headings, see example below.
The following events headings are recognized by the default events.css and have an icon. To add your own, edit the user/events.css and place the related images in images directory.
- doctor
- Arzttermine
- dentist
- Zahnarzt
- Party
- Feiern
- birthday
- birthdays
- Geburtstagsliste
- Geburtstag
- Geburtstage
- Werkstatt
- repair
- Spielplan
- Spielfeste
- Punktspiele
- Fussball
- soccer
- Sport
- Pokalspiele
- bill
- Abrechnung
- Geld
- money
- Musik
- music
- CallCenter
Examples
Example 1
<gcal pages=(:calendar:maike,:calendar:frank,:calendar:annette,:calendar:family_events)> <gcal pages=(:calendar:maike,:calendar:frank,:calendar:annette,:calendar:family_events) offset=1>
Displays current and next month of the calendar build up by the data in the :calendar:xxxx pages.
Example 2
<gcal pages=(:calendar:frank,:calendar:*)>
Display current month in 3 columns. “day”, “Franks dates” and all dates in all pages of namespace “:calendar”.
Example 3
<gcal pages=(:calendar:frank#sports)>
This only picks the section named “sports” from franks page.
Example wiki-page
The wiki-pages you like the data to include can look like this:
====== Personal dates of Frank ===== ==== Sport ==== * 08.03.2009 Soccer-Tournament ==== Dentist ==== * 08.03.2009 08:00 Dentist * 08.03.2009 08:00 Dentist ==== Holiday ==== * 08.03.2009 - 08.03.2009 Note : no text needed here, because we mark this category with a background-picture ==== Birthday ==== * 01.08. Happy b-day Franky !
Sections are used to define the categories. Categories define the image and colour used for an individual event. (see conf/events.css)
Dates can be in the form
MM/DD/YYYY i.e. American-style
or
DD.MM.YYYY i.e. German-style
or
YY-MM-DD i.e. ISO-style
If YYYY
is omitted, the year of the displayed month is taken. You can define date-ranges by using a dash “-”.
Screenshot
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
In order to let the plugins create it style sheet from the ones in DOKU_GKAL/user
(DOKU_GKAL
being the base gcalendar directory), it is necessary that the web server user has write access to the DOKU_GCAL directory.
Current version: 12/19/2006 gcalendar_20061219
new-features:
- options “noheader”, “nohead”, “nofoot” and “nonav” added. See syntax.
changes:
- changed line-endings to UNIX style.
Changelog
11/29/2006 gcalendar_20061129
new-features:
- date-fetching is now more flexible. See inc/conf.php and section 'configuration' below. ISO-Date-Format (yyyy-mm-dd) is now supported. Thanks to Viktor for asking.
- moved
user/conf.php
toinc/conf.php
and introduced/user/local_conf.php
to separate user-data from plugin defaults.
11/10/2006 gcalendar_20061110
bug-fixes:
- fixed: category was reset in multi-date events
- order events by start-/end-time
- some css fixes
new-features:
- Italian, Danish, Finnish, French language profiles added
- section-access added. Now you can access wikipage-sections by using “#” to grab only the data of the given section.
- multi-categories added. multiple categories can be applied separated by space
- inline-categories added. Now categories can be defined inside the event. Even multiple categories.
- round-parens () specifies a visible category. See $conf['gCal_inline_Category_visible']
- square brackets [] specifies an invisible category. See $conf['gCal_inline_Category_hidden']
- configuration variable $conf['gCal_time'] added to change the display of times in the calendar. I.e. put the minutes in superscript
- option “compact” added. This adds the ability to show only days with events (with option dropempty) or show days with no events more compact to save space.
09/17/2006 gcalendar_20060917
- moved the user-specific CSS-styles into separate files “user/background.css”, “user/events.css” and “user/other.css”. This makes it easier to upgrade to a new version of the plugin.
- rendering for “\\” added. Generating newlines inside an event
09/12/2006
- the plugin now should be XHTML-conform. Thanks to Erik Tomlinson!
- rendering for “→”, “←”, “⇒” and “⇐” added
- more visible today marker (now frame the whole row with an orange border)
- minor bug fixes
09/03/2006
- added some options. See syntax.
- lang - to switch the plugin to an other language.
- dayshift - (mainly for debugging purposes).
- some css-related issues solved.
- minor change to regexp $conf['gCal_match_category'] to scan sections as categories, without whitespace.
09/01/2006
- added security-option which strips all non-allowed HTML- and PHP-tags from the calendar entries. See Configuration.
08/28/2006
- some bug-fixes (thanks again to Reinhold Kainhofer)
- include of file
base.php
removed. This generated error messages on other systems than mine, because I copied this file from an earlier installation. - preg-expression for matching the category doesn't excluded all trailing equal-signs.
- other minor bugfixes
08/27/2006
- some options are now user-configurable in the file “/user/conf.php”.
- more flexible reading of categories and events using user-configurable patterns. Now its possible to have more than one search pattern.
- basic DokuWiki-syntax like bold, italic, underlined,… is processed by the plugin.
- wikilinks, interwikilinks, external links, emails, windows shares… are processed by the plugin.
08/24/2006
- bug with daylight savings time fixed. I.e. Oct 29 showed up twice because it has 25 hours.
- some corrections enabling urlrewrite
- now tabs (not only spaces) are allowed to separate dates/times in the unordered lists.
Thanks to Reinhold Kainhofer for all these fixes !!!
08/18/2006
- macros @USER@ and @ID@ added to pages parameter. See syntax.
- options
debug
,notoc
,cache
andnested
added. See Syntax. - bug-fix when using a start-page inside a namespace like ':wiki:start'.
08/16/2006
- bug-fix: the latest 'code-review' broke the pagelinks (from event/task to wikipage).
08/15/2006a
- parameter
pagelinks
added. See syntax. - code-review
- bug-fixes
- added newline (“\n”) between events
08/14/2006
- week-view added (looks very similar to the month view yet, but shows only 7 days.
- whole namespaces are now allowed to include (see usage).
- some bug-fixes
08/08/2006
- first release of this plugin.
Configuration
You can add localizations in the lang-subfolder. Copy the “en” folder and rename the copy to the iso-shortform of your language. Localize the $lang[…]='…'; strings in the file lang.php
inside your localization folder. If you like, publish your language-file at the Localization section. I will publish them in future releases.
All user-configurable options are stored in the file user/conf.php
.
# match sections as categories. The first subpattern must contain the result $conf['gCal_match_category'][] = '#^\={2,}\s*(.*?)\s*\={2,}\s*$#s'; # match unordered lists as events. The first subpattern must contain the result $conf['gCal_match_event'][] = '#^\s*\*{2}([0-9]{1,2}\..*)\*{2}\s*$#s'; // " ** abc **" gets "abc" $conf['gCal_match_event'][] = '#^\s*\*\s*(.*)\s*$#s'; // " * abc " gets "abc" # match dates in american-style, i.e. 12/31/2006 $conf['gCal_date_mdy'] = '([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4}|[0-9]{2}|)'; # match european styled dates. i.e. 31.12.2006 $conf['gCal_date_dmy'] = '([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{4}|[0-9]{2}|)'; # match isodates. i.e. 2006-12-31 or 06-12-31 $conf['gCal_date_ymd'] = '([0-9]{2}|[0-9]{4}|)\-([0-9]{1,2})\-([0-9]{1,2})'; # security-option. only this tags are allowed in calendar-entries $conf['gCal_allowed_tags'] = '<a><b><br><br/><code><del><div><em><i><p><span><strong><sub><sup>'; # match inline-category in event string. # the inline-section has to be placed after the time (or date, if time is omitted) $conf['gCal_inline_Category_hidden'] = '^\s*\[([A-Za-z_ ]+)\]'; $conf['gCal_inline_Category_visible'] = '^\s*\(([A-Za-z_ ]+)\)'; # how to display times in events -> #h=hour ; #m=minutes ; #r=rest (am/pm) $conf['gCal_time'] = "#h<sup><em class='u'>#m</em></sup>#r"; // minutes superscript underlined #$conf['gCal_time'] = "#h:#m#r"; // use this, if you don't like the superscript-form
Discussion
Events
Has anyone gotten the Holiday event style working? It's mentioned above, and there are several images for it, but no mention of it in the events.css file. The example syntax shown above doesn't work, even after creating a .holiday style. — DGM2 2008/09/17 00:26
Yearly view or overview
Hi frank, really nice plugin and for our projects very useful! Only a small thing I miss but important to have would be something like a yearly overview. Where you can see long spaces of time (for example in different background colours for a calendar/project/team).
— bobbelsche 2007/04/24 10:02
Pages & Namespaces
the 'pages=(my:namespace:*)' format does not seem to work… I get an empty calendar from start.txt page instead of list of pages. 'pages=(my:namespace:a,my:namespace:b,my:namespace:c)' works just fine. any pointers? thanksMy tests on this feature worked fine. Can you try the option “nested”.Same problem here: <gcal pages=(:calendar:work,:calendar:home,:calendar:*)> yields a 3-column monthly overview with the 3rd column empty and labeled 'start'. Using or not using the “nested” option did not make a difference…
For me it seems to be that :calendar:* includes :calendar:work (and :calendar:home). As far as I tested it, this got wrong. — Heiko Studt 18.01.2007
Customization of style.css
Is it possible to keep the customization to the style.css in a subfolder? This way upgrades can be done without destroying the changes.Yes. Done this in the preview release as of 2006-09-17. See Installation.Unfortunately, the archive contains the conf/*.css files, so simply extracting the file will overwrite all your custom modifications… Maybe the files can be renamed to conf/*.css.example so that the user still sees how to customize gcalendar.It was a little confusing for me where the styles actually came from. I found after I made the plugin dir writable for the webserver a …/gcalendar/style.css was generated by the plugin, combining …/inc/standard.css and the css files from …/user/*css. These last files are the one you are supposed to customize. It's a nice system, but it might have a little notice in the “installation” paragraph.
Option to turn of the table head
Hi. Would it be possible to make an option to turn of the table head? This would come in handy for displaying only the current day events(mode=day). Right now the table head takes up most of the space. Cheers. Oh, and I love this plugin. Great work! — Drye Kindrew 2006-12-16 21:47Done this in the latest release.
Adding multiple events
Hi Frank. Am now using gcalendar exclusively for project planning activities. This works if the events are added by each team member individually;however its difficult for me to add planned/agreed events to each member of the team; takes some time to open each member's page and add events.
Two ways I could think of making this easy:
* AJAX. Add events directly on the calendar; like Google calendar
* A form with pull down menus which would allow selection of the member, the event category, date and time etc
I am no PHP programmer but would it be too difficult? Does this approach make sense at all?
Thanks again for the wonderful plugin.
— Shiva Shankar 2006-09-18Hi Shiva. I am happy that you find this plugin so useful. But I decided earlier that I don't want to make this plugin too complex. Sorry! (I can not promise that I will not change my decision in the future). — Frank 2006-09-18
Skipping Weekends in Date Range
Here's an easier one :) How about an option to skip events on weekends, when the date range includes them? For ex, I want to plan a event on all weekdays for the next 2 weeks, but not on weekends. Right now I have to break the event into two, one for each week. Else the event shows up on weekends also. — Shiva Shankar 2006-10-13It would be no problem to implement this, but I don't want to clutter the wiki source too much. Do you have any syntax suggestions ?
- 01.01.2007 – 20.01.2007 Practica at IBM ⇒ double minus
- 01.01.2007 -1111100- 20.01.2007 Practica at IBM ⇒ binary vector for each day (very ugly)
- 01.01.2007 - 20.01.2007 <!– 1111100 –> Practica at IBM ⇒ binary vector as hidden comment
Colour Coordination
On my wiki the user can change between templates. I've adjusted my standard.css [below] to use the current templates colour scheme instead of the static one defined as default.
The effect is that gcalendar looks acceptable regardless of which template you are using. perhaps this should be the default packaged with gCalendar?Nice idea, but it doesn't work out of the box with my preferred template “monobook for DokuWiki”.It seems to work with most other Template though. Template makers are encouraged to use colours like __background_alt__ defined in each template's style.ini. Perhaps the Monobook needs to be updated. — Viktor Söderqvist 2006-11-28 13:45To quickly update a template (like the the monobook template) to use your standard CSS as posted below, you need to add a few lines to lib/tpl/[yourtemplate]/style.ini. I've added it [below] your standard.css
ISO date
Possibility to use ISO style dates yyyy-mm-dd. This is the main format used in Sweden and probably other countries as well and on many other places such as this wiki. — Viktor Söderqvist 2006-11-28 13:45Done this in latest release (2006-11-29)
PHP Error
Hi, when using this plugin I get the following Error: “Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of preg_match_all(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/www/htdocs/dokuwiki/lib/plugins/gcalendar/inc/gcal_read.php on line 345”. As I am not a PHP-Coder I don't know how to fix this. (Well it could turn all errors of in php.ini but that's not a clean solution. Any Ideas=Just remove the ampersand “&” in line 345 before$wiki_links
. I will fix this in the next release.
I also received PHP errors on DokuWiki version 2006-03-09 and I had to add “DOKU_GCAL.” in front of all the require_once() paths in syntax.php and gcal_main.php. The include() calls already had the DOKU_GCAL but the require_once paths didn't. - GJH 2007-01-19
Monthly view extended
I've added some new features to gcalendar. You can now print a standard monthly calendar (weeks as rows and days of week as columns), and can specify number of forward/backward days a monthly calendar would show, rather than showing the whole month. I don't know if the author would find these features interesting enough to incorporate into his own maintained version. You can visit my webpage for details. — Ahmet Sacan
Hi Frank, great job on this plugin, it's very useful for my company. I've modified Ahmet's modified version (nice job on these features as well Ahmet) so that the weeks started on Sunday instead of Saturday (what we are used to in US). Are you interested in accepting patches, such as Ahmet's changes and mine? If so I'd be glad to clean these features up as options and submit them otherwise I won't bother. Thanks. — Nick 2007-01-03 20:19
I've added the option to specify which day of the week to start from. One can now specify the default startofday in the conf page, or override it in the gcalendar options in the wiki page. visit my webpage for details. Ahmet Sacan 2007-01-07 12:18
Naming Groups
Above, it reads “You can also add a name to a group. See examples below”. Well, here's how:
<gcal pages=(team(calendar:angel|calendar:pike),external(calendar:amro|calendar:luka))>
Recurring Events
Is there any way to create a recurring event? for example if I want something to happen every Monday, is there a simple way to do that? I tried to do it generating the proper date bullets using PHP code on my calendar page, but this plug-in seems to ignore that code.
I'm missing probably the same thing. I would try to add it myself, but I'm not so good in PHP and it would be good to have it in default. It would really be nice to put weekly and monthly events in the calendar like this:
- Monday 10:00 My English classes
- Friday 19:00 Go to pub with my friends
- 1st Pay the bills
- 15th Replace something somewhere
- 10.*. Download security updates
- 25.x. 13:00 Buy my favourite magazine
I'm not sure what to use for monthly events. I really like the #st/#nd/#rd/#th notation, but it can not be localized. The #.*. is more universal in this way. Anyway … I really would like this feature
Recurring Events - Bug Found and squashed
Lets pretend that it is Dec 30, and your significant others birthday is on Jan 2. You have the date sitting in your GCalendar, but for whatever reason today (Dec 30) the birthday is not showing up. Probably not a cool thing since MOST stores will be closed on Jan 1. ;)
I discovered this bug when I set my calendar ahead by 365 days to see what would happen. Low and behold my wifes birthday (As well as my kids) didn't show up. The fix is extremely simple.
Edit the lib/plugins/gcalendar/gcal_read.php file and do a search for
if(strlen($y)==0) $y=date('Y',$default_date);
and replace that entire line with the following:
if(strlen($y)==0) { $y=date('Y',$default_date); $wikidate=mktime(0,0,0,$m,$d,$y); if ($wikidate < time()) { $y=$y+1; } }
Your life shall be saved. ;) - Pontiac76
Problem changing date
I changed the local_conf.php file to use European settings and the calendar hasn't updated, it's trying to tell me it's yesterday and its still reading the dates as mm/dd/yyyy. I am sure it worked fine on a previous install.Please help?
Try adding ~~NOCACHE~~ somewhere in your document. - Pontiac76
Problem strftime contra date
Under DokuWiki-2009-02-14b the gCal_currentDate may not displayed correctly. Solution:
vim …/plugins/gcalendar/inc/gcal_show.php
Line 80 change:
echo "<br/><span class='gCal_currentDate'>".date($conf['dformat'])."</span>";
into
echo "<br/><span class='gCal_currentDate'>".strftime($conf['dformat'])."</span>";
Greetz, floodfill
Patched Version: Mix of Ahmet 20070107 and Original 20061219
Download: https://www.kvfg.net/wiki/lib/exe/fetch.php?media=web:gcalendar_2009_1011_v2.zip
I needed the options provided by Ahmet and the new “noheader” options provided by the newest release on this page. Without really knowing PHP all I did was to use MELD (a gnome diff tool) to synchronize the changes in the two packages. I also added the other.css file from this page to make it read and use style.ini.
(Comment on June 2012): This Version of gcal has been working for my sites using a variety of themes since November 2009 on all DokuWiki Versions up to the recent one … which is still true for Adora Belle!
Standard.css
So is this the modified CSS from the discussion above, using colours like __background_alt__ defined in each template's style.ini.
/* * standard.css is the main style-sheet for the DokuWiki plugin gCalendar * * you should not edit this file. modify this files: * * /user/background.css --> to set background-pictures for specific events * /user/events.css --> to set event-Pictures and text-styles for your events * /user/other.css --> to optionally overwrite the styles in the standard.css file */ /* main-table definition ----------------------------------------------------------------------- */ .gCal_table { width: 100%; border-collapse: collapse; border: 2px solid __border__; padding: 0px; margin: 0px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 1em; line-height: 1.25em; } /* current-date in table-header ---------------------------------------------------------------- */ .gCal_currentDate { padding:5px; font-size:0.8em; color : __text_alt__; } /* navi-table (header of main-table) ----------------------------------------------------------- */ .gCal_naviTable { width: 100%; border-collapse: collapse; background-color: __background_other__; padding: 0px; margin: 0px; font-size: 2em; line-height: 1em; border-bottom: 1px solid __border__; } .gCal_link_prev {text-align: left} .gCal_link_next {text-align: right} /* column-header ------------------------------------------------------------------------------- */ .gCal_columnHead { background-color: __background_other__; } .gCal_header a, .gCal_header a:visited, .gCal_columnHead a, .gCal_columnHead a:visited {color: blue} /* definition of event to page links ----------------------------------------------------------- */ .gCal_pagelink a, .gCal_pagelink a:visited { color: #888; font-size: 1em; font-weight: normal; text-transform: uppercase; border-top : 1px solid __border__; border-bottom : 1px solid __border__; } .gCal_pagelink a:hover { background: Blue; color: white; text-decoration: none; } /* hide some elements on printout -------------------------------------------------------------- */ @media print { .gCal_currentDate, .gCal_link_prev, .gCal_link_next, .gCal_pagelink a {display:none} } /* style of date and weekday in month-view */ .gCal_mv_day { font-size: 1.2em; font-weight: bold; } .gCal_mv_weekday { font-size: 0.8em; font-weight: bold; } /* Weekdays 0=sunday ... 6=saturday */ td.gCal_wd { border: 1px solid __border__; padding: 3px; } td.gCal_wd_datecell {text-align: center} .gCal_wd { background-color: none; font-size: 1em __text__; } .gCal_wd_6 { /* saturday */ background-color: __background_alt__; color: __text_alt__; } .gCal_wd_0 { /* sunday */ background-color: __background_neu__; color: __text_neu__; } td.gCal_wd_0 { /* sunday */ border-bottom: 2px solid __border__; } td.gCal_wd_6 { /* saturday */ border-top: 2px solid __border__; } @media screen { td.gCal_today { background-color: __extern__; border-top: 3px solid __existing__; border-bottom: 3px solid __existing__; color: __missing__; } td.gCal_todayFrame { border-top: 3px solid __existing__; border-bottom: 3px solid __existing__; } } /* category-styles for date entries. The category has to be capitalized ! ---------------------- */ .gCal_event { /* Standard definition of an event entry */ display: block; font-size: 0.9em; color:__text__; padding-left: 25px; padding-top: 3px; padding-bottom: 3px; background: url(images/date.gif) no-repeat center left; }
Other.css
I took the code from the author above, but rewrote it as an override, which is the proper way to override CSS in this plugin nowadays. paste the code below into …/user/other.css in your plugin, make sure the plugin dir is writable for the webserver, and press reload.
the exact style of your calendar plugin will now look different depending on the template you use. on the left, you see a preview of gcalendar with the other.css below in the monobook template. the default template looks quite the same, by the way… but it will look different in your favorite star-trek skin
/* * overridden from standard.css; using only __replacements__ * also less big, less bold, and less borders .. *-pike-splitbrain@kw.nl 200701 */ /* main-table definition ----------------------------------------------------------------------- */ .gCal_table { border: 1px solid __border__; font-family: sans-serif; } /* current-date in table-header ---------------------------------------------------------------- */ .gCal_currentDate { font-size:.8em; font-weight:normal; color : __text__; } /* navi-table (header of main-table) ----------------------------------------------------------- */ .gCal_naviTable { background-color: __background_alt__; font-size:1.2em; line-height: 1.2em; border-bottom: 0px solid __border__; } .gCal_naviTable td.gCal_header { font-size:1.2em;padding:.3em; } .gCal_link_prev {font-weight:normal; vertical-align:top;} .gCal_link_next {font-weight:normal; vertical-align:top;} /* column-header ------------------------------------------------------------------------------- */ .gCal_columnHead { background-color: __background_nue__; border:1px solid __border__; text-align:left; padding-left:.2em; } .gCal_header a, .gCal_header a:visited {color: __text__} .gCal_columnHead a, .gCal_columnHead a:visited {color: __text_alt__} /* definition of event to page links ----------------------------------------------------------- */ .gCal_pagelink a, .gCal_pagelink a:visited { color: __text_alt__; border-top : 0px; border-bottom : 0px; font-style:italic; padding-left:1em; text-transform:none; } .gCal_pagelink a:hover { background-color:white; color: __text_alt__; text-decoration:underline; } /* style of date and weekday in month-view */ .gCal_mv_day { font-size: 1em; font-weight: normal; } .gCal_mv_weekday { font-size: 0.8em; font-weight: normal; } /* Weekdays 0=sunday ... 6=saturday */ td.gCal_wd { border: 1px solid __border__; } td.gCal_wd_datecell { background-color: __background_neu__; text-align: left } .gCal_wd { font-size: 1em __text__; } .gCal_wd_6 { /* saturday */ background-color: __background_alt__; color: __text_alt__; } .gCal_wd_0 { /* sunday */ background-color: __background_alt__; color: __text_alt__; } td.gCal_wd_0 { /* sunday */ background-color: __background_alt__; border-bottom: 1px solid __border__; } td.gCal_wd_6 { /* saturday */ background-color: __background_alt__; border-top: 1px solid __border__; } @media screen { td.gCal_today { background-color: __highlight__; border-top: 1px solid __border__; border-bottom: 1px solid __border__; color: __text__; } td.gCal_todayFrame { background-color: __highlight__; border-top: 1px solid __border__; border-bottom: 1px solid __border__; } } /* category-styles for date entries. The category has to be capitalized ! ---------------------- */ .gCal_event { /* Standard definition of an event entry */ color:__text__; }
style.ini
In case you're using an older version of DokuWiki, or a template that doesn't recognize the replacements used above (like monobook), add the following lines to your …/lib/tpl/[yourtemplate]/style.ini:
; new DokuWiki styles as of 2006-08 ; see http://www.dokuwiki.org/devel:css#styleini __background__ = "#fff" __text__ = "#000" __background_alt__ = "#dee7ec" __text_alt__ = "#638c9c" __background_neu__ = "#f5f5f5" __text_neu__ = "#666" __border__ = "#8cacbb" __background_other__ = "#f7f9fa" __text_other__ = "#ccc" ;__extern__ = "#436976" ;__existing__ = "#090" ;__missing__ = "#f30" ;__highlight__ = "#ff9"
Localization
Japanese Language
<?php /** * Japanese language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Daniel Dupriest <kououken@gmail.com> */ $lang['gCal_day'] = '曜日'; $lang['gCal_weekday_0'] = '日'; $lang['gCal_weekday_1'] = '月'; $lang['gCal_weekday_2'] = '火'; $lang['gCal_weekday_3'] = '水'; $lang['gCal_weekday_4'] = '木'; $lang['gCal_weekday_5'] = '金'; $lang['gCal_weekday_6'] = '土'; $lang['gCal_month_1'] = '1月'; $lang['gCal_month_2'] = '2月'; $lang['gCal_month_3'] = '3月'; $lang['gCal_month_4'] = '4月'; $lang['gCal_month_5'] = '5月'; $lang['gCal_month_6'] = '6月'; $lang['gCal_month_7'] = '7月'; $lang['gCal_month_8'] = '8月'; $lang['gCal_month_9'] = '9月'; $lang['gCal_month_10'] = '10月'; $lang['gCal_month_11'] = '11月'; $lang['gCal_month_12'] = '12月'; # === Week-View : Label for Week of year === $lang['gCal_weekofyear'] = '週 '; # Date-Format (the leftmost column of the calendar) $lang['gCal_mv_day'] = 'j'; # date-format for day in month-view $lang['gCal_wv_day'] = 'm/d'; # date-format for day in week-view $lang['gCal_dv_day'] = 'Y/m/d'; # date-format for day in day-view
Slovak language
<?php /** * slovak language file *jayjay */ $lang['gCal_day'] = 'Deň'; $lang['gCal_weekday_0'] = 'Nedeľa'; $lang['gCal_weekday_1'] = 'Pondelok'; $lang['gCal_weekday_2'] = 'Uterok'; $lang['gCal_weekday_3'] = 'Streda'; $lang['gCal_weekday_4'] = 'Štvrtok'; $lang['gCal_weekday_5'] = 'Piatok'; $lang['gCal_weekday_6'] = 'Sobota'; $lang['gCal_month_1'] = 'Január'; $lang['gCal_month_2'] = 'Február'; $lang['gCal_month_3'] = 'Marec'; $lang['gCal_month_4'] = 'Apríl'; $lang['gCal_month_5'] = 'Máj'; $lang['gCal_month_6'] = 'Jún'; $lang['gCal_month_7'] = 'Júl'; $lang['gCal_month_8'] = 'August'; $lang['gCal_month_9'] = 'September'; $lang['gCal_month_10'] = 'Október'; $lang['gCal_month_11'] = 'November'; $lang['gCal_month_12'] = 'December'; # === Week-View : Label for Week of year === $lang['gCal_weekofyear'] = 'Týžden '; # Date-Format (the leftmost column of the calendar) $lang['gCal_mv_day'] = 'j'; # date-format for day in month-view $lang['gCal_wv_day'] = 'j. n.'; # date-format for day in week-view $lang['gCal_dv_day'] = 'j. n. Y'; # date-format for day in day-view
Norwegian language file
Make a subfolder named no
in the lang
folder. Put this text in a file named lang.php
in the no
folder:
<?php /** * Norwegian language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Thomas Nygreen <nygreen(a)gmail.com> */ $lang['gCal_day'] = 'Dato'; $lang['gCal_weekday_0'] = 'Søndag'; $lang['gCal_weekday_1'] = 'Mandag'; $lang['gCal_weekday_2'] = 'Tirsdag'; $lang['gCal_weekday_3'] = 'Onsdag'; $lang['gCal_weekday_4'] = 'Torsdag'; $lang['gCal_weekday_5'] = 'Fredag'; $lang['gCal_weekday_6'] = 'Lørdag'; $lang['gCal_month_1'] = 'Januar'; $lang['gCal_month_2'] = 'Februar'; $lang['gCal_month_3'] = 'Mars'; $lang['gCal_month_4'] = 'April'; $lang['gCal_month_5'] = 'Mai'; $lang['gCal_month_6'] = 'Juni'; $lang['gCal_month_7'] = 'Juli'; $lang['gCal_month_8'] = 'August'; $lang['gCal_month_9'] = 'September'; $lang['gCal_month_10'] = 'Oktober'; $lang['gCal_month_11'] = 'November'; $lang['gCal_month_12'] = 'Desember'; # === Week-View : Label for Week of year === $lang['gCal_weekofyear'] = 'Uke '; # Date-Format (the leftmost column of the calendar) $lang['gCal_mv_day'] = 'j'; # date-format for day in month-view $lang['gCal_wv_day'] = 'd.m.'; # date-format for day in week-view $lang['gCal_dv_day'] = 'd.m.Y'; # date-format for day in day-view
pt-br (Brazilian locale) for lang.php
This is my contribution for pt-br locale used by gcalendar:
Sorry, but I could not upload the file, so I had to put it here as a text.
<?php /** * brazilian language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Fábio Silva Carvalho <fabio.carvalho@usp.br> */ $lang['gCal_day'] = 'Dia'; $lang['gCal_weekday_0'] = 'Domingo'; $lang['gCal_weekday_1'] = 'Segunda'; $lang['gCal_weekday_2'] = 'Terça'; $lang['gCal_weekday_3'] = 'Quarta'; $lang['gCal_weekday_4'] = 'Quinta'; $lang['gCal_weekday_5'] = 'Sexta'; $lang['gCal_weekday_6'] = 'Sábado'; $lang['gCal_month_1'] = 'Janeiro'; $lang['gCal_month_2'] = 'Fevereiro'; $lang['gCal_month_3'] = 'Março'; $lang['gCal_month_4'] = 'Abril'; $lang['gCal_month_5'] = 'Maio'; $lang['gCal_month_6'] = 'Junho'; $lang['gCal_month_7'] = 'Julho'; $lang['gCal_month_8'] = 'Agosto'; $lang['gCal_month_9'] = 'Setembro'; $lang['gCal_month_10'] = 'Outubro'; $lang['gCal_month_11'] = 'Novembro'; $lang['gCal_month_12'] = 'Dezembro'; # === Week-View : Label for Week of year === $lang['gCal_weekofyear'] = 'Semana '; # Date-Format (the leftmost column of the calendar) $lang['gCal_mv_day'] = 'j'; # date-format for day in month-view $lang['gCal_wv_day'] = 'd/m'; # date-format for day in week-view $lang['gCal_dv_day'] = 'd/m/Y'; # date-format for day in day-view
Es (Spanish locale) for lang.php
Made an “es” directory and put this file. Then change the syntax.php file to use this new locale.
<?php /** * Spanish language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Jorge Cornejo (jorgecornejo@gmail.com) */ $lang['gCal_day'] = 'Día'; $lang['gCal_weekday_0'] = 'Domingo'; $lang['gCal_weekday_1'] = 'Lunes'; $lang['gCal_weekday_2'] = 'Martes'; $lang['gCal_weekday_3'] = 'Miercoles'; $lang['gCal_weekday_4'] = 'Jueves'; $lang['gCal_weekday_5'] = 'Viernes'; $lang['gCal_weekday_6'] = 'Sábado'; $lang['gCal_month_1'] = 'Enero'; $lang['gCal_month_2'] = 'Febrero'; $lang['gCal_month_3'] = 'Marzo'; $lang['gCal_month_4'] = 'Abril'; $lang['gCal_month_5'] = 'Mayo'; $lang['gCal_month_6'] = 'Junio'; $lang['gCal_month_7'] = 'Julio'; $lang['gCal_month_8'] = 'Agosto'; $lang['gCal_month_9'] = 'Septiembre'; $lang['gCal_month_10'] = 'Octubre'; $lang['gCal_month_11'] = 'Noviembre'; $lang['gCal_month_12'] = 'Diciembre'; # === Week-View : Label for Week of year === $lang['gCal_weekofyear'] = 'Semana '; # Date-Format (the leftmost column of the calendar) $lang['gCal_mv_day'] = 'j'; # date-format for day in month-view $lang['gCal_wv_day'] = 'd/m'; # date-format for day in week-view $lang['gCal_dv_day'] = 'd/m/Y'; # date-format for day in day-view
Polish language file
Make a subfolder named pl
in the lang
folder. Put this text in a file named lang.php
in the pl
folder:
<?php /** * polish language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Krzysztof Głaz <krzysztof [dot] glaz [at] gmail [dot] com> */ $lang['gCal_day'] = 'Dzień'; $lang['gCal_weekday_0'] = 'Niedziela'; $lang['gCal_weekday_1'] = 'Poniedziałek'; $lang['gCal_weekday_2'] = 'Wtorek'; $lang['gCal_weekday_3'] = 'Środa'; $lang['gCal_weekday_4'] = 'Czwartek'; $lang['gCal_weekday_5'] = 'Piątek'; $lang['gCal_weekday_6'] = 'Sobota'; $lang['gCal_month_1'] = 'Styczeń'; $lang['gCal_month_2'] = 'Luty'; $lang['gCal_month_3'] = 'Marzec'; $lang['gCal_month_4'] = 'Kwiecień'; $lang['gCal_month_5'] = 'Maj'; $lang['gCal_month_6'] = 'Czerwiec'; $lang['gCal_month_7'] = 'Lipiec'; $lang['gCal_month_8'] = 'Sierpień'; $lang['gCal_month_9'] = 'Wrzesień'; $lang['gCal_month_10'] = 'Październik'; $lang['gCal_month_11'] = 'Listopad'; $lang['gCal_month_12'] = 'Grudzień'; # === Week-View : Label for Week of year === $lang['gCal_weekofyear'] = 'Tydzień '; # Date-Format (the leftmost column of the calendar) $lang['gCal_mv_day'] = 'j'; # date-format for day in month-view $lang['gCal_wv_day'] = 'm-d'; # date-format for day in week-view $lang['gCal_dv_day'] = 'Y-m-d'; # date-format for day in day-view
Latvian language file
Make a subfolder named lv
in the lang
folder. Put this text in a file named lang.php
in the lv
folder:
?php /** * latvian language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Aivars Miška <allefm [at] gmail [dot] com> */ $lang['gCal_day'] = 'Diena'; $lang['gCal_weekday_0'] = 'Svētdiena'; $lang['gCal_weekday_1'] = 'Pirmdiena'; $lang['gCal_weekday_2'] = 'Otrdiena'; $lang['gCal_weekday_3'] = 'Trešdiena'; $lang['gCal_weekday_4'] = 'Ceturtdiena'; $lang['gCal_weekday_5'] = 'Piektdiena'; $lang['gCal_weekday_6'] = 'Sestdiena'; $lang['gCal_month_1'] = 'Janvāris'; $lang['gCal_month_2'] = 'Februāris'; $lang['gCal_month_3'] = 'Marts'; $lang['gCal_month_4'] = 'Aprīlis'; $lang['gCal_month_5'] = 'Maijs'; $lang['gCal_month_6'] = 'Jūnijs'; $lang['gCal_month_7'] = 'Jūlijs'; $lang['gCal_month_8'] = 'Augusts'; $lang['gCal_month_9'] = 'Septembris'; $lang['gCal_month_10'] = 'Oktobris'; $lang['gCal_month_11'] = 'Novembris'; $lang['gCal_month_12'] = 'Decembris'; # === Week-View : Label for Week of year === $lang['gCal_weekofyear'] = 'Nedēļa'; # Date-Format (the leftmost column of the calendar) $lang['gCal_mv_day'] = 'j'; # date-format for day in month-view $lang['gCal_wv_day'] = 'd.m.'; # date-format for day in week-view $lang['gCal_dv_day'] = 'd.m.Y.'; # date-format for day in day-view
Korean Language
<?php /** * Korean language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Hyunil Kim <hikim@mail.com> */ $lang['gCal_day'] = '요일'; $lang['gCal_weekday_0'] = '일'; $lang['gCal_weekday_1'] = '월'; $lang['gCal_weekday_2'] = '화'; $lang['gCal_weekday_3'] = '수'; $lang['gCal_weekday_4'] = '목'; $lang['gCal_weekday_5'] = '금'; $lang['gCal_weekday_6'] = '토'; $lang['gCal_month_1'] = '1월'; $lang['gCal_month_2'] = '2월'; $lang['gCal_month_3'] = '3월'; $lang['gCal_month_4'] = '4월'; $lang['gCal_month_5'] = '5월'; $lang['gCal_month_6'] = '6월'; $lang['gCal_month_7'] = '7월'; $lang['gCal_month_8'] = '8월'; $lang['gCal_month_9'] = '9월'; $lang['gCal_month_10'] = '10월'; $lang['gCal_month_11'] = '11월'; $lang['gCal_month_12'] = '12월'; # === Week-View : Label for Week of year === $lang['gCal_weekofyear'] = '주 '; # Date-Format (the leftmost column of the calendar) $lang['gCal_mv_day'] = 'j'; # date-format for day in month-view $lang['gCal_wv_day'] = 'm/d'; # date-format for day in week-view $lang['gCal_dv_day'] = 'Y/m/d'; # date-format for day in day-view