X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/903213e63fd6c409046f66e73881aba33c3926de..0d406010ff8ffb8d891318bbaf6b6de1e2cb2578:/IkiWiki/Plugin/googlecalendar.pm diff --git a/IkiWiki/Plugin/googlecalendar.pm b/IkiWiki/Plugin/googlecalendar.pm index 81a3ad677..24c2e1527 100644 --- a/IkiWiki/Plugin/googlecalendar.pm +++ b/IkiWiki/Plugin/googlecalendar.pm @@ -5,24 +5,26 @@ use warnings; use strict; use IkiWiki 2.00; -sub import { #{{{ +print STDERR "warning: the googlecalendar plugin is deprecated and will be removed in ikiwiki 3.0 (use the embed plugin instead)\n"; + +sub import { hook(type => "getsetup", id => "googlecalendar", call => \&getsetup); hook(type => "preprocess", id => "googlecalendar", call => \&preprocess); hook(type => "format", id => "googlecalendar", call => \&format); -} # }}} +} -sub getsetup () { #{{{ +sub getsetup () { return plugin => { safe => 1, rebuild => undef, }, -} #}}} +} -sub preprocess (@) { #{{{ +sub preprocess (@) { my %params=@_; # Parse the html, looking for the url to embed for the calendar. @@ -35,21 +37,21 @@ sub preprocess (@) { #{{{ my ($width)=$params{html}=~m#width="(\d+)"#; return "
"; -} # }}} +} -sub format (@) { #{{{ +sub format (@) { my %params=@_; $params{content}=~s/
<\/div>/gencal($1,$2,$3)/eg; return $params{content}; -} # }}} +} -sub gencal ($$$) { #{{{ +sub gencal ($$$) { my $url=shift; my $height=shift; my $width=shift; return qq{}; -} #}}} +} 1