add plugin safe/rebuild info (part 2 of 3)

(brain.. melting..)
master
Joey Hess 2008-08-03 17:20:21 -04:00
parent 1230e914b1
commit 39195de96e
21 changed files with 161 additions and 1 deletions

View File

@ -6,9 +6,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
hook(type => "getsetup", id => "opendiscussion", call => \&getsetup);
hook(type => "canedit", id => "opendiscussion", call => \&canedit);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 0,
},
} #}}}
sub canedit ($$) { #{{{
my $page=shift;
my $cgi=shift;

View File

@ -23,6 +23,10 @@ sub getopt () { #{{{
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 0,
},
openidsignup => {
type => "string",
example => "http://myopenid.com/",

View File

@ -7,9 +7,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
hook(type => "getsetup", id => "orphans", call => \&getsetup);
hook(type => "preprocess", id => "orphans", call => \&preprocess);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => undef,
},
} #}}}
sub preprocess (@) { #{{{
my %params=@_;
$params{pages}="*" unless defined $params{pages};

View File

@ -8,11 +8,20 @@ use IkiWiki 2.00;
use open qw{:utf8 :std};
sub import { #{{{
hook(type => "getsetup", id => "otl", call => \&getsetup);
hook(type => "filter", id => "otl", call => \&filter);
hook(type => "htmlize", id => "otl", call => \&htmlize);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 1, # format plugin
},
} #}}}
sub filter (@) { #{{{
my %params=@_;

View File

@ -6,9 +6,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
hook(type => "getsetup", id => "pagecount", call => \&getsetup);
hook(type => "preprocess", id => "pagecount", call => \&preprocess);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => undef,
},
} #}}}
sub preprocess (@) { #{{{
my %params=@_;
$params{pages}="*" unless defined $params{pages};

View File

@ -18,9 +18,18 @@ use IkiWiki 2.00;
our @classes = ('smallestPC', 'smallPC', 'normalPC', 'bigPC', 'biggestPC' );
sub import { #{{{
hook(type => "getsetup", id => "pagestats", call => \&getsetup);
hook(type => "preprocess", id => "pagestats", call => \&preprocess);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => undef,
},
} #}}}
sub preprocess (@) { #{{{
my %params=@_;
$params{pages}="*" unless defined $params{pages};

View File

@ -8,10 +8,19 @@ use IkiWiki 2.00;
my %templates;
sub import { #{{{
hook(type => "getsetup", id => "pagetemplate", call => \&getsetup);
hook(type => "preprocess", id => "pagetemplate", call => \&preprocess);
hook(type => "templatefile", id => "pagetemplate", call => \&templatefile);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => undef,
},
} #}}}
sub preprocess (@) { #{{{
my %params=@_;

View File

@ -7,9 +7,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
hook(type => "parentlinks", id => "parentlinks", call => \&parentlinks);
hook(type => "pagetemplate", id => "parentlinks", call => \&pagetemplate);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 1,
},
} #}}}
sub parentlinks ($) { #{{{
my $page=shift;

View File

@ -15,6 +15,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 0,
},
account_creation_password => {
type => "string",
example => "s3cr1t",

View File

@ -6,9 +6,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
hook(type => "cgi", id => "aggregate", call => \&cgi);
hook(type => "getsetup", id => "pingee", call => \&getsetup);
hook(type => "cgi", id => "pingee", call => \&cgi);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => undef,
},
} #}}}
sub cgi ($) { #{{{
my $cgi=shift;

View File

@ -18,6 +18,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 0,
},
pinger_timeout => {
type => "integer",
example => 15,

View File

@ -7,10 +7,19 @@ use IkiWiki 2.00;
use Encode;
sub import { #{{{
hook(type => "getsetup", id => "poll", call => \&getsetup);
hook(type => "preprocess", id => "poll", call => \&preprocess);
hook(type => "sessioncgi", id => "poll", call => \&sessioncgi);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => undef,
},
} #}}}
my %pagenum;
sub preprocess (@) { #{{{
my %params=(open => "yes", total => "yes", percent => "yes", @_);

View File

@ -11,9 +11,18 @@ use IkiWiki 2.00;
use File::Find;
sub import { #{{{
hook(type => "getsetup", id => "polygen", call => \&getsetup);
hook(type => "preprocess", id => "polygen", call => \&preprocess);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => undef,
},
} #}}}
sub preprocess (@) { #{{{
my %params=@_;
my $grammar = ($params{grammar} or 'polygen');

View File

@ -7,9 +7,18 @@ use IkiWiki 2.00;
sub import { #{{{
IkiWiki::loadplugin('sparkline');
hook(type => "getsetup", id => "postsparkline", call => \&getsetup);
hook(type => "preprocess", id => "postsparkline", call => \&preprocess);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => undef,
},
} #}}}
sub preprocess (@) { #{{{
my %params=@_;

View File

@ -46,6 +46,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 1,
},
prettydateformat => {
type => "string",
example => '%X, %B %o, %Y',

View File

@ -7,7 +7,16 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
hook(type => "getsetup", id => "rawhtml", call => \&getsetup);
$config{wiki_file_prune_regexps} = [ grep { !m/\\\.x\?html\?\$/ } @{$config{wiki_file_prune_regexps}} ];
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 1, # changes file types
},
} #}}}
1

View File

@ -16,6 +16,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 1,
},
recentchangespage => {
type => "string",
example => "recentchanges",

View File

@ -8,10 +8,20 @@ use IkiWiki 2.00;
my $maxlines=200;
sub import { #{{{
hook(type => "getsetup", id => "recentchangesdiff",
call => \&getsetup);
hook(type => "pagetemplate", id => "recentchangesdiff",
call => \&pagetemplate);
} #}}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 1,
},
} #}}}
sub pagetemplate (@) { #{{{
my %params=@_;
my $template=$params{template};

View File

@ -6,12 +6,21 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
hook(type => "getsetup", id => "remove", call => \&getsetup);
hook(type => "formbuilder_setup", id => "remove", call => \&formbuilder_setup);
hook(type => "formbuilder", id => "remove", call => \&formbuilder);
hook(type => "sessioncgi", id => "remove", call => \&sessioncgi);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 0,
},
} #}}}
sub check_canremove ($$$$) { #{{{
my $page=shift;
my $q=shift;

View File

@ -6,12 +6,21 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
hook(type => "getsetup", id => "rename", call => \&getsetup);
hook(type => "formbuilder_setup", id => "rename", call => \&formbuilder_setup);
hook(type => "formbuilder", id => "rename", call => \&formbuilder);
hook(type => "sessioncgi", id => "rename", call => \&sessioncgi);
} # }}}
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 0,
},
} #}}}
sub check_canrename ($$$$$$$) { #{{{
my $src=shift;
my $srcfile=shift;

View File

@ -17,6 +17,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
plugin => {
safe => 1,
rebuild => 1,
},
omega_cgi => {
type => "string",
example => "/usr/lib/cgi-bin/omega/omega",