aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2008-12-24 16:22:35 -0500
committerJoey Hess <joey@gnu.kitenet.net>2008-12-24 16:22:35 -0500
commit3fbe2569ff39c8e280a48c7623e325ef42ebedce (patch)
tree137bebce5fa41787d7330321f0fb5e15c0846e47
parent7ba65e7f4bd53c4cbd865fa35a515ef12c183757 (diff)
downloadikiwiki-3fbe2569ff39c8e280a48c7623e325ef42ebedce.tar
ikiwiki-3fbe2569ff39c8e280a48c7623e325ef42ebedce.tar.gz
remove deprecated googlecalendar plugin
-rw-r--r--IkiWiki/Plugin/googlecalendar.pm55
-rw-r--r--doc/plugins/discussion.mdwn9
-rw-r--r--doc/plugins/googlecalendar.mdwn20
-rw-r--r--doc/tips/upgrade_to_3.0.mdwn5
4 files changed, 5 insertions, 84 deletions
diff --git a/IkiWiki/Plugin/googlecalendar.pm b/IkiWiki/Plugin/googlecalendar.pm
deleted file mode 100644
index fad2ad78f..000000000
--- a/IkiWiki/Plugin/googlecalendar.pm
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/perl
-package IkiWiki::Plugin::googlecalendar;
-
-use warnings;
-use strict;
-use IkiWiki 3.00;
-
-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 () {
- return
- plugin => {
- safe => 1,
- rebuild => undef,
- },
-}
-
-sub preprocess (@) {
- my %params=@_;
-
- # Parse the html, looking for the url to embed for the calendar.
- # Avoid XSS attacks..
- my ($url)=$params{html}=~m#iframe\s+src="http://www\.google\.com/calendar/embed\?([^"<>]+)"#;
- if (! defined $url || ! length $url) {
- error gettext("failed to find url in html")
- }
- my ($height)=$params{html}=~m#height="(\d+)"#;
- my ($width)=$params{html}=~m#width="(\d+)"#;
-
- return "<div class=\"googlecalendar\" src=\"$url\" height=\"$height\" width=\"$width\"></div>";
-}
-
-sub format (@) {
- my %params=@_;
-
- $params{content}=~s/<div class=\"googlecalendar" src="([^"]+)" height="([^"]+)" width="([^"]+)"><\/div>/gencal($1,$2,$3)/eg;
-
- return $params{content};
-}
-
-sub gencal ($$$) {
- my $url=shift;
- my $height=shift;
- my $width=shift;
- return qq{<iframe src="http://www.google.com/calendar/embed?$url" style=" border-width:0 " width="$width" frameborder="0" height="$height"></iframe>};
-}
-
-1
diff --git a/doc/plugins/discussion.mdwn b/doc/plugins/discussion.mdwn
index 70157f1e2..854307a98 100644
--- a/doc/plugins/discussion.mdwn
+++ b/doc/plugins/discussion.mdwn
@@ -34,12 +34,3 @@ Any objections to listing plugins alphabetically rather than by creation date?
>> "recently changed" list with the 10 most recently changed plugins
>> at the top. That would allow what you suggested, but still allow
>> the main list to be alphabetical. -- [[Will]]
-
-How about adding a deprecated tag in order to clean up the plugin list?
-
-> AFAIK it's currently the only one. --[[Joey]]
-
-For instance [[googlecalendar]] is listed as plugin but should probably be removed from Ikiwiki in a future major version (v3?).
-
--- [[AlexandreDupas]]
-
diff --git a/doc/plugins/googlecalendar.mdwn b/doc/plugins/googlecalendar.mdwn
deleted file mode 100644
index bca2ae74f..000000000
--- a/doc/plugins/googlecalendar.mdwn
+++ /dev/null
@@ -1,20 +0,0 @@
-[[!template id=plugin name=googlecalendar author="[[Joey]]"]]
-[[!tag type/special-purpose]]
-
-*Note*: This plugin is deprecated. Please switch to the [[embed]] plugin.
-
-This plugin allows embedding a google calendar iframe in the wiki.
-Normally, if the [[htmlscrubber]] is enabled, such iframes are scrubbed out
-of the wiki content since they're not very safe if created by malicious
-users. But some iframes are legitimate, and safe, if you trust the embedded
-content. This plugin is an example of how to deal with this in ikiwiki.
-
-Example use:
-
- \[[!googlecalendar html="""
- <iframe src="http://www.google.com/calendar/embed?src=adkrdken8mupngh13jshlbenoc%40group.calendar.google.com&title=OSEL%20Calendar&chrome=NAVIGATION&bgcolor=%2371d873&height=588" style=" border-width:0 " width="480" frameborder="0" height="588"></iframe>
- """]]
-
-The iframe should be the one provided by google. Note that it's used in a
-way that avoids cross-site scripting attacks, assuming you trust google's
-content.
diff --git a/doc/tips/upgrade_to_3.0.mdwn b/doc/tips/upgrade_to_3.0.mdwn
index ef9933583..50c420103 100644
--- a/doc/tips/upgrade_to_3.0.mdwn
+++ b/doc/tips/upgrade_to_3.0.mdwn
@@ -86,3 +86,8 @@ Otherwise, follow this procedure to upgrade a wiki using the aggregate plugin:
files in the srcdir. The command to run is
`ikiwiki-transition aggregateinternal your.setup`,
3. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)
+
+## googlecalendar
+
+This plugin has been deprecated for a long time, and is removed in 3.0. If
+your wiki used it, you should enable the [[plugins/embed]] plugin, instead.