Extension:Calendar (Cdamian)

A few people have asked me for the calendar I use on krass.com

I couldn't release it earlier, because the CalendarClass I used didn't have a GPL friendly license (in fact, it didn't have any license and I wasn't able to contact the author). Now I have written my own primitive class and can release the whole thing under GPL.

It's just tested on http://krass.com/ and not tested in any other environment. '''Please use http://krass.com/wiki/Sandbox/Calendar for testing. Not the main one!'''

You can find the code here: http://krass.com/software/

Users

 * krass.com a techno music wiki
 * The TV IV, the online compendium of television knowledge that anyone can edit.
 * WikiLou.com A wiki for the St. Louis, Missouri community
 * wikEvent A wiki for collecting any and all public events, and publishing them using semantic markup, RDF, and any other standard that comes along.
 * WikiCU, a wiki about Columbia University

Readme File
check here: http://krass.com/software/wikicalendar.README

Here is the setting for skipempty. It is confusing in the readme file.

name=Calendar view=week skipempty=1

Changes

 * 1.13
 * fix for mediawiki 1.7
 * 1.12
 * fix for '' display when merging and main calendar entry is empty
 * fix for including more than one calendar
 * simple ical format, which I use on krass.com
 * 1.11
 * two bugs fixed
 * 1.10
 * fixed weekformat=list
 * xml style parameters
 * 1.9
 * weekformat is in php classes now
 * 10.3.2006 version 1.8 (The Amador Release)
 * "weekformat" option for different layouts
 * "showempty" to supplress "add entry" msgs
 * localized calendar from user preferences
 * fix merge function to pass calendar name
 * 1.3.2006 version 1.7
 * released 1.7
 * another fix for the cache (thanks to Austin Che)
 * "skipempty" option
 * "rdays" reverse order of days
 * 17.11.2005 version 1.6
 * released 1.6
 * replaced &lt;h3&gt; in week display, to remove TOC in mediawiki 1.5
 * first go at merging calendars
 * add extension credits
 * 12.10.2005 version 1.5
 * fixed month display again
 * included some tests for CalendarClass using PHPUnit2
 * fix weeks not starting on monday
 * fix padding after month ending in end of the week
 * new DaysInMonth and DayOfWeek not using the php calendar extensions anymore
 * 4.10.2005
 * new clearCache function by DanielSimon
 * 29.9.2005
 * new option "weekstart" parameter is 1-7 for Monday-Sunday, default is 1 (Monday)
 * small fixes
 * 16.9.2005
 * new option "formattitle" for the titles in the week/day views
 * format & formattitle both accept php date parameters now, prefixed with '%'. like this: "%d.%m.%Y".
 * 15.9.2005
 * enable double quoted options
 * "date" option, this takes a php strtotime string
 * disable cache for 1.5 (untested)
 * 6.9.2005 new view="days" with parameter days="#" to display a sequence of days; I also changed the view="today" option again
 * 6.9.2005 new view="today" option, by Dexter Samida
 * 29.8.2005 fixed the "format" option
 * 25.8.2005 new "day","month","year" options

Requests
Make sure you are not asking to show "weeks" and "skipempty". Select displaying a year first, and then work on the settings.
 * It doesn't work for wiki-1.8.2 and cyrillic (ru,uk). Simply doesn't print anything.
 * Does anyone have a problem with   being displayed before and after the calendar today function?
 * Yes. The problem appears to be the closure of the  and  . These are not required (see http://www.w3.org/TR/html401/struct/lists.html#h-10.3). Editing out the tag closures in WikiCalendarFormatList.php resolves the problem. Just found this extension, very useful. --Paulwarwicker 23:10, 16 November 2006 (UTC)
 * Does anyone know how to add a calendar to the left navigation? I think this involves editing Monobook.php (my default skin), but I don't know how to get the calendar tag to render on load of the skin.
 * It would be great to have a way to add the entire calendar to my watchlist so I could be emailed when users add date pages. As it is, I can only use Related changes to see this manually.
 * I have customers that would like to be able to overlay other calendars into there calendars, someting to the effect of names=MyCalendar+Holidays+GroupEvents+HomeEvents
 * There is something like that in the current version, but only for week/days view. I don't know how it should work in the month view. And even in the week view, edits will go to the first calendar listed. --Cdamian 14:53, 1 March 2006 (UTC)
 * If there is something like that in the current version, how can I use it? What I would like to do is have a "master" calendar which has the items for all the other calendars. For example when I go to 10_26_2006 it will show the data from 10_26_2006/calendar2 and 10_26_2006/calendar3 (which is how I have it setup.) 71.231.182.82 07:10, 26 October 2006 (UTC)


 * I'd love to see a list of upcoming events for the next week/month/year, without the blank pages.
 * this is in the 1.7 version --Cdamian 14:53, 1 March 2006 (UTC)
 * it would be nice to have a way to flick forward/back like buttons on a wiki page in/decrementing a counter which is used to call the calendar the usual style (like:date= +$counter week). In this way a week by week overview can flick through a range of the year (good for planning ahead:-) 28 June 2006
 * It would be nice to have multi-language support for day- and monthnames. The preferred language could be detected by the $_SERVER['HTTP_ACCEPT_LANGUAGE'] variable. Generating day- and monthnames should work by using the setlocale function. --DanielSimon 11:50, 29 October 2005 (UTC)
 * I don't want to use the HTTP_ACCEPT_LANGUAGE, but the user preferences instead. There is some code in mediawiki to format dates, but I don't think I can use that. --Cdamian 16:36, 3 November 2005 (UTC)
 * Why don't you use the -Function instead of the  -function. This function should allow   to choose localized day-/monthnames... --213.168.102.97 09:14, 8 March 2006 (UTC)
 * there are tranlations now in the 1.8 release --Cdamian 11:33, 10 March 2006 (UTC)
 * This extension would be even more usefull when it offered the possibility of adding a title to dayevents like 6.4.2006_party. In that way the script could output a list of titles instead of only dates ]. Maybe it could also be done by taking each date-page and substracting the headings from it. (Under each heading would be an event.) The script could then output these headings ordered by date. This would make a list of events instead of a list of dates, which is much more informative. The list could be put into the sidebar, for example.
 * Hi - is 1.8 or 1.10 production? 1.10 has a missing ) on line 94   should be   - I'm about to upgrade to 1.6.3 and wanted to upgrade wikicalendar in the process.
 * sorry about 1.10, that was my mistake. I have uploaded 1.11 now, which fixes that bug and another one --Cdamian 09:34, 18 April 2006 (UTC)
 * It would be nice if each month's calendar had an option for a border around it.
 * To add borders you need to edit the CalendarClass.php file. There are three places in the file where it says "border = 0".  If you change the 0 to a 1 you will have borders for all calendars you make with this extension.  Its worth noting that these are in a 'table' designation and other attributes such as background color can be added as well.  Refer to a HTML reference for what parameters there are for 'table' to see what else is possible.

Sample calendar style (needs to be added to MediaWiki:Common.css page) /* Calendar extension */ table.calendar { } td.calendarToday { background-color: yellow; } span.calendarToday { } td.calendarHeader { background-color: lightgray; } dl.calendar { } -- Fix

Bugfix
In Calendar.php, the disabling of the 1.5 cache doesn't work...I think it's because it's not doing a return ""; at the very end. Don't know how you want to accept contributions for the code...I also hacked in a sloppy monthly calendar with each event listed in the cell for the day.
 * strange thing about the cache. best thing for contributions is to send them to me ( christof@damian.net ), I'll answer much faster than too. --Cdamian 16:34, 3 November 2005 (UTC)


 * there is a new fix for the cache in version 1.7 now, please have another go --Cdamian 14:52, 1 March 2006 (UTC)


 * I am still having problems with caching in version 1.11 Nobody had edited any calendar entries for  over a month, I went to check the calendar and it still was showing the date I last looked at (about 7/4) for my month, week, and year calendars.  Even when I held shift and hit the reload button in firefox I kept getting the old one.  I edited the calendar php files to add some debug messages and sure enough it showed the proper date.  I did just upgrade to firefox 1.5.0.4 from a 1.0 version...not sure if this has something to do with it. --Ej Wed Aug 16 11:00:00 EDT 2006


 * Very strangely, I'm seeing 29 october twice, causeing my calendar to go totally nuts. Anything sensible I can do about that? This also happens after an upgrade to 1.13. Apart from that, I totally love your calendar plugin :-) --RubenV 19:21, 3 November 2006 (UTC)