Merge commit 'upstream/master' into prv/po

master
intrigeri 2009-01-01 13:34:00 +01:00
commit 5c2f6cb893
131 changed files with 1252 additions and 959 deletions

View File

@ -24,7 +24,7 @@ our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match
inject inject
%config %links %pagestate %wikistate %renderedfiles %config %links %pagestate %wikistate %renderedfiles
%pagesources %destsources); %pagesources %destsources);
our $VERSION = 2.00; # plugin interface version, next is ikiwiki version our $VERSION = 3.00; # plugin interface version, next is ikiwiki version
our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
@ -194,7 +194,7 @@ sub getsetup () {
}, },
prefix_directives => { prefix_directives => {
type => "boolean", type => "boolean",
default => 0, default => 1,
description => "use '!'-prefixed preprocessor directives?", description => "use '!'-prefixed preprocessor directives?",
safe => 0, # changing requires manual transition safe => 0, # changing requires manual transition
rebuild => 1, rebuild => 1,
@ -1600,40 +1600,6 @@ sub rcs_receive () {
$hooks{rcs}{rcs_receive}{call}->(); $hooks{rcs}{rcs_receive}{call}->();
} }
sub globlist_to_pagespec ($) {
my @globlist=split(' ', shift);
my (@spec, @skip);
foreach my $glob (@globlist) {
if ($glob=~/^!(.*)/) {
push @skip, $glob;
}
else {
push @spec, $glob;
}
}
my $spec=join(' or ', @spec);
if (@skip) {
my $skip=join(' and ', @skip);
if (length $spec) {
$spec="$skip and ($spec)";
}
else {
$spec=$skip;
}
}
return $spec;
}
sub is_globlist ($) {
my $s=shift;
my $ret= ( $s =~ /[^\s]+\s+([^\s]+)/ && $1 ne "and" && $1 ne "or" );
print STDERR "warning: deprecated GlobList style PageSpec \"$s\" will stop working in ikiwiki version 3.0\n"
if $ret && $s !~ /TMPL_VAR/; # hack alert
return $ret;
}
sub safequote ($) { sub safequote ($) {
my $s=shift; my $s=shift;
$s=~s/[{}]//g; $s=~s/[{}]//g;
@ -1725,26 +1691,12 @@ sub pagespec_merge ($$) {
my $b=shift; my $b=shift;
return $a if $a eq $b; return $a if $a eq $b;
# Support for old-style GlobLists.
if (is_globlist($a)) {
$a=globlist_to_pagespec($a);
}
if (is_globlist($b)) {
$b=globlist_to_pagespec($b);
}
return "($a) or ($b)"; return "($a) or ($b)";
} }
sub pagespec_translate ($) { sub pagespec_translate ($) {
my $spec=shift; my $spec=shift;
# Support for old-style GlobLists.
if (is_globlist($spec)) {
$spec=globlist_to_pagespec($spec);
}
# Convert spec to perl code. # Convert spec to perl code.
my $code=""; my $code="";
while ($spec=~m{ while ($spec=~m{

View File

@ -203,25 +203,9 @@ sub cgi_prefs ($$) {
my $user_name=$session->param("name"); my $user_name=$session->param("name");
# XXX deprecated, should be removed eventually
$form->field(name => "banned_users", size => 50, fieldset => "admin");
if (! is_admin($user_name)) {
$form->field(name => "banned_users", type => "hidden");
}
if (! $form->submitted) { if (! $form->submitted) {
$form->field(name => "email", force => 1, $form->field(name => "email", force => 1,
value => userinfo_get($user_name, "email")); value => userinfo_get($user_name, "email"));
if (is_admin($user_name)) {
my $value=join(" ", get_banned_users());
if (length $value) {
$form->field(name => "banned_users", force => 1,
value => join(" ", get_banned_users()),
comment => "deprecated; please move to banned_users in setup file");
}
else {
$form->field(name => "banned_users", type => "hidden");
}
}
} }
if ($form->submitted eq 'Logout') { if ($form->submitted eq 'Logout') {
@ -239,17 +223,6 @@ sub cgi_prefs ($$) {
error("failed to set email"); error("failed to set email");
} }
# XXX deprecated, should be removed eventually
if (is_admin($user_name)) {
set_banned_users(grep { ! is_admin($_) }
split(' ',
$form->field("banned_users"))) ||
error("failed saving changes");
if (! length $form->field("banned_users")) {
$form->field(name => "banned_users", type => "hidden");
}
}
$form->text(gettext("Preferences saved.")); $form->text(gettext("Preferences saved."));
} }
@ -262,10 +235,7 @@ sub check_banned ($$) {
my $name=$session->param("name"); my $name=$session->param("name");
if (defined $name) { if (defined $name) {
# XXX banned in userinfo is deprecated, should be removed if (grep { $name eq $_ } @{$config{banned_users}}) {
# eventually, and only banned_users be checked.
if (userinfo_get($session->param("name"), "banned") ||
grep { $name eq $_ } @{$config{banned_users}}) {
print $q->header(-status => "403 Forbidden"); print $q->header(-status => "403 Forbidden");
$session->delete(); $session->delete();
print gettext("You are banned."); print gettext("You are banned.");

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::aggregate;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Parser; use HTML::Parser;
use HTML::Tagset; use HTML::Tagset;
use HTML::Entities; use HTML::Entities;
@ -46,7 +46,7 @@ sub getsetup () {
}, },
aggregateinternal => { aggregateinternal => {
type => "boolean", type => "boolean",
example => 0, example => 1,
description => "enable aggregation to internal pages?", description => "enable aggregation to internal pages?",
safe => 0, # enabling needs manual transition safe => 0, # enabling needs manual transition
rebuild => 0, rebuild => 0,
@ -61,6 +61,10 @@ sub getsetup () {
} }
sub checkconfig () { sub checkconfig () {
if (! defined $config{aggregateinternal}) {
$config{aggregateinternal}=1;
}
if ($config{aggregate} && ! ($config{post_commit} && if ($config{aggregate} && ! ($config{post_commit} &&
IkiWiki::commit_hook_enabled())) { IkiWiki::commit_hook_enabled())) {
launchaggregation(); launchaggregation();

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::amazon_s3;
use warnings; use warnings;
no warnings 'redefine'; no warnings 'redefine';
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IkiWiki::Render; use IkiWiki::Render;
use Net::Amazon::S3; use Net::Amazon::S3;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::anonok;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "anonok", call => \&getsetup); hook(type => "getsetup", id => "anonok", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::attachment;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
add_underlay("javascript"); add_underlay("javascript");
@ -61,23 +61,6 @@ sub check_canattach ($$;$) {
); );
} }
# XXX deprecated, should be removed eventually
if ($allowed) {
foreach my $admin (@{$config{adminuser}}) {
my $allowed_attachments=IkiWiki::userinfo_get($admin, "allowed_attachments");
if (defined $allowed_attachments &&
length $allowed_attachments) {
$allowed=pagespec_match($dest,
$allowed_attachments,
file => $file,
user => $session->param("name"),
ip => $ENV{REMOTE_ADDR},
);
last if $allowed;
}
}
}
if (! $allowed) { if (! $allowed) {
error(gettext("prohibited by allowed_attachments")." ($allowed)"); error(gettext("prohibited by allowed_attachments")." ($allowed)");
} }
@ -120,39 +103,6 @@ sub formbuilder_setup (@) {
$form->tmpl_param("attachments-class" => "toggleable-open"); $form->tmpl_param("attachments-class" => "toggleable-open");
} }
} }
elsif ($form->title eq "preferences") {
# XXX deprecated, should remove eventually
my $session=$params{session};
my $user_name=$session->param("name");
$form->field(name => "allowed_attachments", size => 50,
fieldset => "admin",
comment => "deprecated; please move to allowed_attachments in setup file",
);
if (! IkiWiki::is_admin($user_name)) {
$form->field(name => "allowed_attachments", type => "hidden");
}
if (! $form->submitted) {
my $value=IkiWiki::userinfo_get($user_name, "allowed_attachments");
if (length $value) {
$form->field(name => "allowed_attachments", force => 1,
value => IkiWiki::userinfo_get($user_name, "allowed_attachments"));
}
else {
$form->field(name => "allowed_attachments", type => "hidden");
}
}
if ($form->submitted && $form->submitted eq 'Save Preferences') {
if (defined $form->field("allowed_attachments")) {
IkiWiki::userinfo_set($user_name, "allowed_attachments",
$form->field("allowed_attachments")) ||
error("failed to set allowed_attachments");
if (! length $form->field("allowed_attachments")) {
$form->field(name => "allowed_attachments", type => "hidden");
}
}
}
}
} }
sub formbuilder (@) { sub formbuilder (@) {

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::autoindex;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::brokenlinks;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "brokenlinks", call => \&getsetup); hook(type => "getsetup", id => "brokenlinks", call => \&getsetup);

View File

@ -20,7 +20,7 @@ package IkiWiki::Plugin::calendar;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Time::Local; use Time::Local;
use POSIX; use POSIX;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::camelcase;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
# This regexp is based on the one in Text::WikiFormat. # This regexp is based on the one in Text::WikiFormat.
my $link_regexp=qr{ my $link_regexp=qr{

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::color;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "preprocess", id => "color", call => \&preprocess); hook(type => "preprocess", id => "color", call => \&preprocess);

View File

@ -7,7 +7,7 @@ package IkiWiki::Plugin::comments;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
use POSIX qw(strftime); use POSIX qw(strftime);
@ -506,7 +506,10 @@ sub sessioncgi ($$) {
error($conflict) if defined $conflict; error($conflict) if defined $conflict;
# Jump to the new comment on the page. # Jump to the new comment on the page.
IkiWiki::redirect($cgi, urlto($page, undef, 1)."#$location"); # The trailing question mark tries to avoid broken
# caches and get the most recent version of the page.
IkiWiki::redirect($cgi, urlto($page, undef, 1)."#$location?updated");
} }
else { else {
IkiWiki::showform ($form, \@buttons, $session, $cgi, IkiWiki::showform ($form, \@buttons, $session, $cgi,

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::conditional;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use UNIVERSAL; use UNIVERSAL;
sub import { sub import {

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::creole;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "creole", call => \&getsetup); hook(type => "getsetup", id => "creole", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::cutpaste;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %savedtext; my %savedtext;

View File

@ -2,7 +2,7 @@
# Discordian date support fnord ikiwiki. # Discordian date support fnord ikiwiki.
package IkiWiki::Plugin::ddate; package IkiWiki::Plugin::ddate;
use IkiWiki 2.00; use IkiWiki 3.00;
no warnings; no warnings;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::editdiff;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Entities; use HTML::Entities;
use IPC::Open2; use IPC::Open2;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::edittemplate;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Template; use HTML::Template;
use Encode; use Encode;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::embed;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my $attribr=qr/[^<>"]+/; my $attribr=qr/[^<>"]+/;

View File

@ -6,7 +6,7 @@ package IkiWiki::Plugin::external;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use RPC::XML; use RPC::XML;
use RPC::XML::Parser; use RPC::XML::Parser;
use IPC::Open2; use IPC::Open2;

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::favicon;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "favicon", call => \&getsetup); hook(type => "getsetup", id => "favicon", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::filecheck;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %units=( #{{{ # size in bytes my %units=( #{{{ # size in bytes
B => 1, B => 1,

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::format;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "preprocess", id => "format", call => \&preprocess); hook(type => "preprocess", id => "format", call => \&preprocess);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::fortune;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "fortune", call => \&getsetup); hook(type => "getsetup", id => "fortune", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::goodstuff;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my @bundle=qw{ my @bundle=qw{
brokenlinks brokenlinks

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::google;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use URI; use URI;
my $host; my $host;

View File

@ -1,57 +0,0 @@
#!/usr/bin/perl
package IkiWiki::Plugin::googlecalendar;
use warnings;
use strict;
use IkiWiki 2.00;
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 () {
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

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::graphviz;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IPC::Open2; use IPC::Open2;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::haiku;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "haiku", call => \&getsetup); hook(type => "getsetup", id => "haiku", call => \&getsetup);

View File

@ -10,7 +10,7 @@ package IkiWiki::Plugin::hnb;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use File::Temp qw(:mktemp); use File::Temp qw(:mktemp);
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::html;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "html", call => \&getsetup); hook(type => "getsetup", id => "html", call => \&getsetup);

View File

@ -9,8 +9,7 @@ package IkiWiki::Plugin::htmlbalance;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::TreeBuilder;
use HTML::Entities; use HTML::Entities;
sub import { sub import {
@ -30,6 +29,8 @@ sub sanitize (@) {
my %params=@_; my %params=@_;
my $ret = ''; my $ret = '';
eval q{use HTML::TreeBuilder};
error $@ if $@;
my $tree = HTML::TreeBuilder->new(); my $tree = HTML::TreeBuilder->new();
$tree->ignore_unknown(0); $tree->ignore_unknown(0);
$tree->ignore_ignorable_whitespace(0); $tree->ignore_ignorable_whitespace(0);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::htmlscrubber;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
# This regexp matches urls that are in a known safe scheme. # This regexp matches urls that are in a known safe scheme.
# Feel free to use it from other plugins. # Feel free to use it from other plugins.

View File

@ -9,7 +9,7 @@ package IkiWiki::Plugin::htmltidy;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IPC::Open2; use IPC::Open2;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::httpauth;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "httpauth", call => \&getsetup); hook(type => "getsetup", id => "httpauth", call => \&getsetup);

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::img;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %imgdefaults; my %imgdefaults;

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::inline;
use warnings; use warnings;
use strict; use strict;
use Encode; use Encode;
use IkiWiki 2.00; use IkiWiki 3.00;
use URI; use URI;
my %knownfeeds; my %knownfeeds;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::link;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my $link_regexp; my $link_regexp;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::linkmap;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IPC::Open2; use IPC::Open2;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::listdirectives;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
add_underlay("directives"); add_underlay("directives");

View File

@ -3,13 +3,11 @@ package IkiWiki::Plugin::lockedit;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "lockedit", call => \&getsetup); hook(type => "getsetup", id => "lockedit", call => \&getsetup);
hook(type => "canedit", id => "lockedit", call => \&canedit); hook(type => "canedit", id => "lockedit", call => \&canedit);
hook(type => "formbuilder_setup", id => "lockedit",
call => \&formbuilder_setup);
} }
sub getsetup () { sub getsetup () {
@ -52,63 +50,7 @@ sub canedit ($$) {
} }
} }
# XXX deprecated, should be removed eventually
foreach my $admin (@{$config{adminuser}}) {
if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"),
user => $session->param("name"),
ip => $ENV{REMOTE_ADDR},
)) {
if (! defined $user ||
! IkiWiki::userinfo_get($session->param("name"), "regdate")) {
return sub { IkiWiki::needsignin($cgi, $session) };
}
else {
return sprintf(gettext("%s is locked and cannot be edited"),
htmllink("", "", $page, noimageinline => 1));
}
}
}
return undef; return undef;
} }
sub formbuilder_setup (@) {
my %params=@_;
# XXX deprecated, should be removed eventually
my $form=$params{form};
if ($form->title eq "preferences") {
my $session=$params{session};
my $cgi=$params{cgi};
my $user_name=$session->param("name");
$form->field(name => "locked_pages", size => 50,
fieldset => "admin",
comment => "deprecated; please move to locked_pages in setup file"
);
if (! IkiWiki::is_admin($user_name)) {
$form->field(name => "locked_pages", type => "hidden");
}
if (! $form->submitted) {
my $value=IkiWiki::userinfo_get($user_name, "locked_pages");
if (length $value) {
$form->field(name => "locked_pages", force => 1, value => $value);
}
else {
$form->field(name => "locked_pages", type => "hidden");
}
}
if ($form->submitted && $form->submitted eq 'Save Preferences') {
if (defined $form->field("locked_pages")) {
IkiWiki::userinfo_set($user_name, "locked_pages",
$form->field("locked_pages")) ||
error("failed to set locked_pages");
if (! length $form->field("locked_pages")) {
$form->field(name => "locked_pages", type => "hidden");
}
}
}
}
}
1 1

View File

@ -9,7 +9,7 @@ package IkiWiki::Plugin::map;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "map", call => \&getsetup); hook(type => "getsetup", id => "map", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::mdwn;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "mdwn", call => \&getsetup); hook(type => "getsetup", id => "mdwn", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::meta;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %metaheaders; my %metaheaders;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::mirrorlist;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "mirrorlist", call => \&getsetup); hook(type => "getsetup", id => "mirrorlist", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::more;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my $linktext = gettext("more"); my $linktext = gettext("more");

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::opendiscussion;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "opendiscussion", call => \&getsetup); hook(type => "getsetup", id => "opendiscussion", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::openid;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getopt", id => "openid", call => \&getopt); hook(type => "getopt", id => "openid", call => \&getopt);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::orphans;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "orphans", call => \&getsetup); hook(type => "getsetup", id => "orphans", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::otl;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use open qw{:utf8 :std}; use open qw{:utf8 :std};
sub import { sub import {

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::pagecount;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "pagecount", call => \&getsetup); hook(type => "getsetup", id => "pagecount", call => \&getsetup);

View File

@ -12,7 +12,7 @@ package IkiWiki::Plugin::pagestats;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
# Names of the HTML classes to use for the tag cloud # Names of the HTML classes to use for the tag cloud
our @classes = ('smallestPC', 'smallPC', 'normalPC', 'bigPC', 'biggestPC' ); our @classes = ('smallestPC', 'smallPC', 'normalPC', 'bigPC', 'biggestPC' );

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::pagetemplate;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %templates; my %templates;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::parentlinks;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "parentlinks", id => "parentlinks", call => \&parentlinks); hook(type => "parentlinks", id => "parentlinks", call => \&parentlinks);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::passwordauth;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup); hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::pingee;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "pingee", call => \&getsetup); hook(type => "getsetup", id => "pingee", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::pinger;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %pages; my %pages;
my $pinged=0; my $pinged=0;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::poll;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
sub import { sub import {

View File

@ -7,7 +7,7 @@ package IkiWiki::Plugin::polygen;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use File::Find; use File::Find;
sub import { sub import {

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::postsparkline;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
IkiWiki::loadplugin('sparkline'); IkiWiki::loadplugin('sparkline');

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl #!/usr/bin/perl
package IkiWiki::Plugin::prettydate; package IkiWiki::Plugin::prettydate;
use IkiWiki 2.00; use IkiWiki 3.00;
use warnings; use warnings;
no warnings 'redefine'; no warnings 'redefine';
use strict; use strict;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::progress;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my $percentage_pattern = qr/[0-9]+\%?/; # pattern to validate percentages my $percentage_pattern = qr/[0-9]+\%?/; # pattern to validate percentages

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::rawhtml;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "rawhtml", call => \&getsetup); hook(type => "getsetup", id => "rawhtml", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::recentchanges;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
use HTML::Entities; use HTML::Entities;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::recentchangesdiff;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Entities; use HTML::Entities;
my $maxlines=200; my $maxlines=200;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::relativedate;
use warnings; use warnings;
no warnings 'redefine'; no warnings 'redefine';
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use POSIX; use POSIX;
use Encode; use Encode;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::remove;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "remove", call => \&getsetup); hook(type => "getsetup", id => "remove", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::rename;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "rename", call => \&getsetup); hook(type => "getsetup", id => "rename", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::search;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "search", call => \&getsetup); hook(type => "getsetup", id => "search", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::shortcut;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "shortcut", call => \&getsetup); hook(type => "getsetup", id => "shortcut", call => \&getsetup);

View File

@ -6,7 +6,7 @@ package IkiWiki::Plugin::sidebar;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "sidebar", call => \&getsetup); hook(type => "getsetup", id => "sidebar", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::signinedit;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "signinedit", call => \&getsetup); hook(type => "getsetup", id => "signinedit", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::smiley;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %smileys; my %smileys;
my $smiley_regexp; my $smiley_regexp;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::sparkline;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IPC::Open2; use IPC::Open2;
my $match_num=qr/[-+]?[0-9]+(?:\.[0-9]+)?/; my $match_num=qr/[-+]?[0-9]+(?:\.[0-9]+)?/;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::table;
use warnings; use warnings;
use strict; use strict;
use Encode; use Encode;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "table", call => \&getsetup); hook(type => "getsetup", id => "table", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::tag;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %tags; my %tags;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::template;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Template; use HTML::Template;
use Encode; use Encode;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::testpagespec;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "testpagespec", call => \&getsetup); hook(type => "getsetup", id => "testpagespec", call => \&getsetup);

View File

@ -8,7 +8,7 @@ use strict;
use Digest::MD5 qw(md5_hex); use Digest::MD5 qw(md5_hex);
use File::Temp qw(tempdir); use File::Temp qw(tempdir);
use HTML::Entities; use HTML::Entities;
use IkiWiki 2.00; use IkiWiki 3.00;
my $default_prefix = <<EOPREFIX; my $default_prefix = <<EOPREFIX;
\\documentclass{article} \\documentclass{article}

View File

@ -6,7 +6,7 @@ package IkiWiki::Plugin::textile;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::toc;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Parser; use HTML::Parser;
sub import { sub import {

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::toggle;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
add_underlay("javascript"); add_underlay("javascript");

View File

@ -8,7 +8,7 @@ package IkiWiki::Plugin::txt;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Entities; use HTML::Entities;
my $findurl=0; my $findurl=0;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::typography;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getopt", id => "typography", call => \&getopt); hook(type => "getopt", id => "typography", call => \&getopt);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::version;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "version", call => \&getsetup); hook(type => "getsetup", id => "version", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::websetup;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "websetup", call => \&getsetup); hook(type => "getsetup", id => "websetup", call => \&getsetup);
@ -139,7 +139,7 @@ sub showfields ($$$@) {
my $value=$config{$key}; my $value=$config{$key};
if ($info{safe} && (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY')) { if ($info{safe} && (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY')) {
$value=[@{$value}, "", ""]; # blank items for expansion $value=[(ref $value eq 'ARRAY' ? @{$value} : ""), "", ""]; # blank items for expansion
} }
if ($info{type} eq "string") { if ($info{type} eq "string") {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::wikitext;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "wiki", call => \&getsetup); hook(type => "getsetup", id => "wiki", call => \&getsetup);

View File

@ -74,24 +74,4 @@ sub is_admin ($) {
return grep { $_ eq $user_name } @{$config{adminuser}}; return grep { $_ eq $user_name } @{$config{adminuser}};
} }
# XXX deprecated, should be removed eventually
sub get_banned_users () {
my @ret;
my $userinfo=userinfo_retrieve();
foreach my $user (keys %{$userinfo}) {
push @ret, $user if $userinfo->{$user}->{banned};
}
return @ret;
}
# XXX deprecated, should be removed eventually
sub set_banned_users (@) {
my %banned=map { $_ => 1 } @_;
my $userinfo=userinfo_retrieve();
foreach my $user (keys %{$userinfo}) {
$userinfo->{$user}->{banned} = $banned{$user};
}
return userinfo_store($userinfo);
}
1 1

View File

@ -40,6 +40,5 @@ IkiWiki::Setup::Automator->import(
rss => 1, rss => 1,
atom => 1, atom => 1,
syslog => 1, syslog => 1,
prefix_directives => 1,
hardlink => 1, hardlink => 1,
) )

14
debian/NEWS vendored
View File

@ -1,3 +1,12 @@
ikiwiki (3.00) unstable; urgency=low
The 3.0 release of ikiwiki changes several defaults and finishes
some transitions. You will need to modify your wikis to work with
ikiwiki 3.0. A document explaining the process is available
in </usr/share/doc/ikiwiki/html/tips/upgrade_to_3.0.html>
-- Joey Hess <joeyh@debian.org> Tue, 23 Dec 2008 16:14:18 -0500
ikiwiki (2.62) unstable; urgency=low ikiwiki (2.62) unstable; urgency=low
TexImg standard preamble changed TexImg standard preamble changed
@ -101,10 +110,7 @@ ikiwiki (2.40) unstable; urgency=low
in their setup files. in their setup files.
To convert your wiki to the new syntax, ikiwiki provides a new script To convert your wiki to the new syntax, ikiwiki provides a new script
ikiwiki-transition. It will convert preprocessor directives in ikiwiki-transition.
all files given on the command line. To convert an entire wiki:
find wikidir/ -type f -name '*.mdwn' -print0 | xargs -0 ikiwiki-transition prefix_directives
Even with prefix_directives disabled, ikiwiki now allows an optional '!' Even with prefix_directives disabled, ikiwiki now allows an optional '!'
prefix on preprocessor directives (but still requires a space). Thus, a prefix on preprocessor directives (but still requires a space). Thus, a

27
debian/changelog vendored
View File

@ -1,3 +1,30 @@
ikiwiki (3.00) unstable; urgency=low
* Remove support for GlobLists.
* Remove support for configuring allowed attachments, locked pages,
and banned users from the admin preferences page. These can only be
controlled via the setup file now.
* ikiwiki-transition moveprefs can be used to move the above
admin preferences into a setup file.
* prefix_directives and aggregate_internal are now turned on by default.
* ikiwiki-transition prefix_directives syntax changed
* googlecalendar: removed this deprecated plugin. Use htmlscrubber_skip
instead.
* embed: This plugin is deprecated, use htmlscrubber_skip instead.
Closes: ##462970.
* Version 3.00 of the plugin API.
* Replace blank OpenID placeholder logo with an unofficial OpenID
logo developed by Anna Hess. The official logo does not seem destined to
be free.
* comments: Add cache avoidance.
* htmlbalance: Demand-load HTML::TreeBuilder to avoid failing test suite
if it is not present.
* French translation update from Philippe Batailler. Closes: #510216
* websetup: Avoid a crash when a new array setup item has been added in
a new ikiwiki release, and is thus not present in the setup file yet.
-- Joey Hess <joeyh@debian.org> Wed, 31 Dec 2008 15:17:47 -0500
ikiwiki (2.72) unstable; urgency=low ikiwiki (2.72) unstable; urgency=low
* Avoid comments in recentchanges being broken links (smcv) * Avoid comments in recentchanges being broken links (smcv)

View File

@ -26,7 +26,7 @@ There is a backport of a recent version of ikiwiki for Debian 4.0 at
Fedora versions 8 and newer have RPMs of ikiwiki available. Fedora versions 8 and newer have RPMs of ikiwiki available.
There is also an unofficial backport of ikiwiki for Ubuntu Hardy, provided by There is also an unofficial backport of ikiwiki for Ubuntu Intrepid, provided by
[[Paweł_Tęcza|users/ptecza]], [[Paweł_Tęcza|users/ptecza]],
at [http://gpa.net.icm.edu.pl/ubuntu/](http://gpa.net.icm.edu.pl/ubuntu/index-en.html). at [http://gpa.net.icm.edu.pl/ubuntu/](http://gpa.net.icm.edu.pl/ubuntu/index-en.html).

View File

@ -8,24 +8,23 @@ ikiwiki-transition type ...
# DESCRIPTION # DESCRIPTION
`ikiwiki-transition` aids in converting wiki pages when `ikiwiki-transition` aids in converting wiki pages when there's a major
there's a major change in ikiwiki syntax. It also handles other transitions change in ikiwiki syntax. It also handles other transitions not involving
not involving wiki pages. wiki pages.
# prefix_directives # prefix_directives your.setup
The `prefix_directives` mode converts the specified ikiwiki page from The `prefix_directives` mode converts all pages from the old preprocessor
the old preprocessor directive syntax, requiring a space, to the new directive syntax, requiring a space, to the new syntax, prefixed by '!'.
syntax, prefixed by '!'.
Preprocessor directives which already use the new syntax will remain Preprocessor directives which already use the new syntax will remain
unchanged. unchanged.
Note that if the page contains wiki links with spaces, which some Note that if a page contains wiki links with spaces, which some
older versions of ikiwiki accepted, the prefix_directives transition will older versions of ikiwiki accepted, the prefix_directives transition will
treat these as preprocessor directives and convert them. treat these as preprocessor directives and convert them.
# setupformat # setupformat your.setup
The `setupformat` mode converts a setup file from using a single `wrappers` block The `setupformat` mode converts a setup file from using a single `wrappers` block
to using `cgi_wrapper`, `git_wrapper`, etc. to using `cgi_wrapper`, `git_wrapper`, etc.
@ -33,25 +32,30 @@ to using `cgi_wrapper`, `git_wrapper`, etc.
Note that all comments and any unusual stuff like perl code in the setup Note that all comments and any unusual stuff like perl code in the setup
file will be lost, as it is entirely rewritten by the transition. file will be lost, as it is entirely rewritten by the transition.
# aggregateinternal # aggregateinternal your.setup
The `aggregateinternal` mode moves pages aggregated by the aggregate plugin The `aggregateinternal` mode moves pages aggregated by the aggregate plugin
so that the `aggregateinternal` option can be enabled. so that the `aggregateinternal` option can be enabled.
# indexdb # moveprefs your.setup
Moves values that used to be admin preferences into the setup file.
Note that all comments and any unusual stuff like perl code in the setup
file will be lost, as it is entirely rewritten by the move.
# indexdb srcdir
The `indexdb` mode handles converting a plain text `.ikiwiki/index` file to The `indexdb` mode handles converting a plain text `.ikiwiki/index` file to
a binary `.ikiwiki/indexdb`. In this mode, you should specify the srcdir of a binary `.ikiwiki/indexdb`. You do not normally need to run
the wiki as the second parameter. You do not normally need to run
`ikiwiki-transition indexdb`; ikiwiki will automatically run it as `ikiwiki-transition indexdb`; ikiwiki will automatically run it as
necessary. necessary.
# hashpassword # hashpassword srcdir
The `hashpassword` mode forces any plaintext passwords stored in the The `hashpassword` mode forces any plaintext passwords stored in the
`.ikiwiki/userdb` file to be replaced with password hashes. (The `.ikiwiki/userdb` file to be replaced with password hashes. (The
Authen::Passphrase perl module is needed to do this.) In this mode, you Authen::Passphrase perl module is needed to do this.)
should specify the srcdir of the wiki as the second parameter.
If this is not done explicitly, a user's plaintext password will be If this is not done explicitly, a user's plaintext password will be
automatically converted to a hash when a user logs in for the first time automatically converted to a hash when a user logs in for the first time

View File

@ -28,15 +28,13 @@ of text with triple-quotes:
3. "baz" 3. "baz"
"""]] """]]
ikiwiki also has an older syntax for directives, which requires a ikiwiki also has an older syntax for directives, which requires a space in
space in directives to distinguish them from [[wikilinks|ikiwiki/wikilink]]. directives to distinguish them from [[wikilinks|ikiwiki/wikilink]]. This
This syntax has several disadvantages: it requires a space after directives syntax has several disadvantages: it requires a space after directives with
with no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in
[[wikilinks|ikiwiki/wikilink]]. ikiwiki now provides the `!`-prefixed syntax [[wikilinks|ikiwiki/wikilink]]. ikiwiki now provides the `!`-prefixed
shown above as the preferred alternative. However, ikiwiki still supports syntax shown above as default. However, ikiwiki still supports wikis using
wikis using the older syntax, if the `prefix_directives` option is not enabled. the older syntax, if the `prefix_directives` option is disabled.
For backward compatibility with existing wikis, this option currently
defaults to off, so ikiwiki supports the old syntax.
[[!if test="enabled(listdirectives)" then=""" [[!if test="enabled(listdirectives)" then="""
Here is a list of currently available directives in this wiki: Here is a list of currently available directives in this wiki:

View File

@ -72,22 +72,3 @@ filenames of the pages in the wiki, so a pagespec "foo" used on page
"a/b" will not match a page named "a/foo" or "a/b/foo". To match "a/b" will not match a page named "a/foo" or "a/b/foo". To match
relative to the directory of the page containing the pagespec, you can relative to the directory of the page containing the pagespec, you can
use "./". For example, "./foo" on page "a/b" matches page "a/foo". use "./". For example, "./foo" on page "a/b" matches page "a/foo".
## Old syntax
The old PageSpec syntax was called a "GlobList", and worked differently in
two ways:
1. "and" and "or" were not used; any page matching any item from the list
matched.
2. If an item was prefixed with "`!`", then no page matching that item
matched, even if it matched an earlier list item.
For example, here is the old way to match all pages except for the SandBox
and Discussion pages:
* !SandBox !*/Discussion
Using this old syntax is still supported. However, the old syntax is
deprecated and will be removed at some point, and using the new syntax is
recommended.

View File

@ -0,0 +1,42 @@
Ikiwiki has reached version 3.0 and entered a new phase in its
[[development_cycle|roadmap]].
The 3.0 release of ikiwiki changes several defaults and finishes
some transitions. You will need to modify your wikis to work with
ikiwiki 3.0. A document explaining the process is available
in [[tips/upgrade_to_3.0]].
The highlights of the changes in version 3.0 include:
* Support for uploading [[attachments|plugins/attachment]].
* Can [[plugins/rename]] and [[plugins/remove]] pages and files via the web.
* [[Web_based_setup|plugins/websetup]].
* Blog-style [[plugins/comments]] as an alternative to Discussion pages.
* Many other new plugins including [[plugins/htmlbalance]], [[plugins/format]],
[[plugins/progress]], [[plugins/color]], [[plugins/autoindex]],
[[plugins/cutpaste]], [[plugins/hnb]], [[plugins/creole]], [[plugins/txt]],
[[plugins/amazon_s3]], [[plugins/pinger]], [[plugins/pingee]],
[[plugins/edittemplate]]
* The RecentChanges page is compiled statically, not generated from the CGI.
* Support for additional revision control systems: [[rcs/bzr]],
[[rcs/monotone]]
* Support for [[tips/untrusted_git_push]].
* A new version (3.00) of the plugin API, exporting additional
commonly used functions from `IkiWiki.pm`.
* Nearly everything in ikiwiki is now a plugin, from WikiLinks to
page editing, to RecentChanges.
* Far too many bug fixes, features, and enhancements to list here.
Thanks to the many contributors to ikiwiki 3.0, including:
Jelmer Vernooij, Recai Oktaş, William Uther, Simon McVittie, Axel Beckert,
Bernd Zeimetz, Gabriel McManus, Paweł Tęcza, Peter Simons, Manoj
Srivastava, Patrick Winnertz, Jeremie Koenig, Josh Triplett, thm, Michael
Gold, Jason Blevins, Alexandre Dupas, Henrik Brix Andersen, Thomas Keller,
Enrico Zini, intrigeri, Scott Bronson, Brian May, Adeodato Simó, Brian
Downing, Nis Martensen. (And anyone I missed.)
Also, thanks to the users, bug submitters, and documentation wiki editors.
Without you, ikiwiki would just be a little thing I use for my home page.
--[[Joey]]

View File

@ -5,10 +5,6 @@ This plugin allows content from other feeds to be aggregated into the
wiki. To specify feeds to aggregate, use the wiki. To specify feeds to aggregate, use the
[[ikiwiki/directive/aggregate]] [[ikiwiki/directive]]. [[ikiwiki/directive/aggregate]] [[ikiwiki/directive]].
New users of aggregate should enable the `aggregateinternal => 1` option in the
.setup file. If you don't do so, you will need to enable the [[html]] plugin
as well as aggregate itself, since feed entries will be stored as HTML.
The [[meta]] and [[tag]] plugins are also recommended. Either the The [[meta]] and [[tag]] plugins are also recommended. Either the
[[htmltidy]] or [[htmlbalance]] plugin is suggested, since feeds can easily [[htmltidy]] or [[htmlbalance]] plugin is suggested, since feeds can easily
contain html problems, some of which these plugins can fix. contain html problems, some of which these plugins can fix.
@ -27,37 +23,19 @@ visit is `http://whatever/ikiwiki.cgi?do=aggregate_webtrigger`. Anyone
can visit the url to trigger an aggregation run, but it will only check can visit the url to trigger an aggregation run, but it will only check
each feed if its `updateinterval` has passed. each feed if its `updateinterval` has passed.
## internal pages and `aggregateinternal` ## aggregated pages
This plugin creates a page for each aggregated item. This plugin creates a page for each aggregated item.
If the `aggregateinternal` option is enabled in the setup file (which is If the `aggregateinternal` option is enabled in the setup file (which is
recommended), aggregated pages are stored in the source directory with a the default), aggregated pages are stored in the source directory with a
"._aggregated" extension. These pages cannot be edited by web users, and "._aggregated" extension. These pages cannot be edited by web users, and
do not generate first-class wiki pages. They can still be inlined into a do not generate first-class wiki pages. They can still be inlined into a
blog, but you have to use `internal` in [[PageSpecs|IkiWiki/PageSpec]], blog, but you have to use `internal` in [[PageSpecs|IkiWiki/PageSpec]],
like `internal(blog/*)`. like `internal(blog/*)`.
For backward compatibility, the default is that these pages have the If `aggregateinternal` is disabled, you will need to enable the [[html]]
".html" extension, and are first-class wiki pages -- each one generates plugin as well as aggregate itself, since feed entries will be stored as
a separate HTML page in the output, and they can even be edited. HTML, and as first-class wiki pages -- each one generates
a separate HTML page in the output, and they can even be edited. This
That turns out to not be ideal for aggregated content, because publishing option is provided only for backwards compatability.
files for each of those pages is a waste of disk space and CPU, and you
probably don't want to allow them to be edited. So, there is an alternative
method that can be used (and is recommended), turned on by the
`aggregateinternal` option in the setup file.
If you are already using aggregate and want to enable `aggregateinternal`,
you should follow this process:
1. Update all [[PageSpecs|ikiwiki/PageSpec]] that refer to the aggregated
pages -- such as those in inlines. Put "internal()" around globs
in those PageSpecs. For example, if the PageSpec was `foo/*`, it should
be changed to `internal(foo/*)`. This has to be done because internal
pages are not matched by regular globs.
2. Turn on `aggregateinternal` in the setup file.
3. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
files in the srcdir. The command to run is
`ikiwiki-transition aggregateinternal $setupfile`,
4. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)

View File

@ -2,6 +2,6 @@ Contributed [[plugins]]:
(See [[install]] for installation help.) (See [[install]] for installation help.)
[[!inline pages="plugins/contrib/* !*/Discussion" [[!inline pages="plugins/contrib/* and !*/Discussion"
feedpages="created_after(plugins/contrib/navbar)" archive="yes" feedpages="created_after(plugins/contrib/navbar)" archive="yes"
rootpage="plugins/contrib" postformtext="Add a new plugin named:" show=0]] rootpage="plugins/contrib" postformtext="Add a new plugin named:" show=0]]

View File

@ -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 >> "recently changed" list with the 10 most recently changed plugins
>> at the top. That would allow what you suggested, but still allow >> at the top. That would allow what you suggested, but still allow
>> the main list to be alphabetical. -- [[Will]] >> 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]]

View File

@ -13,6 +13,14 @@ In the examples below, the parts of the html that you can change are denoted
with "XXX"; everything else must appear exactly as shown to be accepted by the with "XXX"; everything else must appear exactly as shown to be accepted by the
plugin. plugin.
**This plugin is deprecated.** Rather than relying on these complex lists
of safe content, which constantly fall out of date, you're recommended to
configure the [[htmlscrubber]] to not scrub some pages, which only trusted
users can edit. Then you can embed anything from anywhere on those pages.
See [[tips/embedding_content]] for details and examples.
This plugin's lists of safe embedded content will not be maintained, and
the plugin will be removed in a future release.
## google maps ## google maps
Use html like this to embed a map: Use html like this to embed a map:

Some files were not shown because too many files have changed in this diff Show More