Events

  • November
  • 27

# Google Calendar Extension
#
# Purpose:
# Embed a Google Calendar in a MediaWiki page
# Tag/Wikitext :
# docid
# Example :
# from
# Instructions :
# set $input to the Google Account that owns the calendar you want to embed
# set $width & $height to the proportions appropriate for your wiki page
#
# Credits
# This code is adapted from Kasper Souren’s original extension, sometimes available at
# http://wiki.couchsurfing.com/wiki/index.php?title=Google_Calendar_MediaWiki_plugin
# License
# GNU Public

$wgExtensionFunctions[] = ‘wfGoogleCalendar’;
$wgExtensionCredits[’parserhook’][] = array(
‘name’ => ‘Google Calendar’,
‘description’ => ‘Display Google Calendar’,
‘author’ => ‘Club City Records’,
‘url’ => ‘http://www.google.com/calendar/embed?title=Club%20City%20Events&mode=AGENDA&height=600&wkst=1&bgcolor=%23ffffff&src=psb4m1cgerlnj801ebki0v8nbs%40group.calendar.google.com&color=%2328754E&ctz=America%2FNew_York’
);

function wfGoogleCalendar() {
global $wgParser;
$wgParser->setHook(’googlecalendar’, ‘renderGoogleCalendar’);
}

# The callback function for converting the input text to HTML output
function renderGoogleCalendar($input) {
$input = htmlspecialchars($input);
//$input = “jamestheiv@gmail.com”
$width = 425;
$height = 350;

$output = ‘‘;

return $output;
}
?>

© 2007 Club City Records. Blog theme by blogstheme.com, debt consolidation.