Uncategorized

What’s That Google Calender Doing in My MediaWiki?

Like Duvall’s Kilgore, who said “there’s nothing like napalm in the morning”, for a web geek, there’s nothing like a bit of curious fiddling with code to make something work. Today’s feat was finagling a MediaWiki extension to display a Google Calendar in our sites.

I’ve been using GCal for a year to manage our Second Life events, and Google provides the cut and past code to put in other sides, like our WordPress blog – but MediaWiki is not going to be happy with some <iframe> code, so on some searching I found reference to one on the CouchSurfing Wiki – yet was discouraged that their demo was busted:

gcal-wiki-demo.jpg

Going back to the Google search well, I came on the listing of same code in the MediaWiki collection

and it suggested that the calendar ID entered in the tags had changed. So there was hope.

Setting up MediaWiki extensions is not nuclear physics, but it is a far cry from “plug-in” or “widgets”. You have to copy some PHP code, upload it to the server, hand edit the MW settings file (and hope you did not chop a semi colon- a blank page is a sure sign of a typo in an extension).

The next tricky part was getting the right ID for our calendar. It looks like an email address, but at first it seemed like it had to be the primary calendar on an account, and the one I set up was actually a secondary calendar. It is there in the Calendar settings, under details- the text where it declares the calender ID:

gcal-id.jpg

Ahhh, but there is more subtlety- in the tags you (hand code) in MediaWii, you have to swap the “@” for its url encoded entity, “%40”, so adding it to my mediawiki page is as intuitive as:


um25dbsm7uuis774tb5ualldmk%40group.calendar.google.com

But wait there is more– the default layout was rather.. pinched, so to make it wider, I had to go into the extension source code, and bump up the height and width for the iframe tags.

But in the end, and now that I know, it is easy… well, sort of. I have an embedded calendar now for two different SL events, one is ours from NMC, and the other is one maintained by Bruce Summerville in Sydney, who hand adds them to a public calendar when people advertise them on the SL Educators listserv.

http://sl.nmc.org/wiki/NMC_Campus_Calender
http://sl.nmc.org/wiki/SLED_Calender

Smell the napalm!

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

Comments

  1. Cool. But riddle me this – why can’t I seem to find any good wiki-like Calendar apps? Am I missing something? Doesn’t it seem like the having the ability to add and annotate entries in a wiki-like way to a Calendar is both desireable and kind of obvious. And yet everytime the idea comes to me and I look, and I don’t find it. Everyone always mumbles ‘jotspot’ but that’s like the app that google ate and never burped back up. Sorry if this is off topic, your post just jarred it lose.

  2. Hey Scott-

    While I was searching I found something that on the surface might be what you were after- WikiCalendar (I forgot to do the for: tag to you!)

    “WikiCalendars.com is a wiki-based approach to creating and maintaining calendars. Many calendars on the Web are outdated because they are no longer maintained by their original author. By leveraging the power of the most popular wiki software on the Web, we hope to create a repository of up-to-date calendars whose events can be annotated and searched.”
    http://www.wikicalendars.com/

    I foun it via
    http://www.bolinfest.com/changeblog/2006/11/10/did-i-mention-mitcalendarscom/

    and have no idea how I got there.

  3. Hey, thanks, I had seen this in my searches and it isn’t quite what I am thinking of; while it calls itself a Calendar it seems to my eye to basically be big lists. Probably just me being picky, but I wanted something that actually laid things out on a calendar interface but let others edit and add to them. The Google Calendars in mediawiki would work great if you could make them world editable or have them use the same accounts as the mediawiki install itself. Cheers, Scott

Leave a Reply

Your email address will not be published. Required fields are marked *