add plugin safe/rebuild info (part 3 of 3)
parent
210b9ba2f3
commit
3905645342
|
@ -18,13 +18,6 @@ sub getsetup () { #{{{
|
|||
safe => 1,
|
||||
rebuild => 0,
|
||||
},
|
||||
virus_checker => {
|
||||
type => "string",
|
||||
example => "clamdscan -",
|
||||
description => "virus checker program (reads STDIN, returns nonzero if virus found)",
|
||||
safe => 0, # executed
|
||||
rebuild => 0,
|
||||
},
|
||||
allowed_attachments => {
|
||||
type => "pagespec",
|
||||
example => "virusfree() and mimetype(image/*) and maxsize(50kb)",
|
||||
|
@ -33,6 +26,13 @@ sub getsetup () { #{{{
|
|||
safe => 1,
|
||||
rebuild => 0,
|
||||
},
|
||||
virus_checker => {
|
||||
type => "string",
|
||||
example => "clamdscan -",
|
||||
description => "virus checker program (reads STDIN, returns nonzero if virus found)",
|
||||
safe => 0, # executed
|
||||
rebuild => 0,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub check_canattach ($$;$) { #{{{
|
||||
|
|
|
@ -6,10 +6,19 @@ use strict;
|
|||
use IkiWiki 2.00;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "shortcut", call => \&getsetup);
|
||||
hook(type => "refresh", id => "shortcut", call => \&refresh);
|
||||
hook(type => "preprocess", id => "shortcut", call => \&preprocess_shortcut);
|
||||
} #}}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub refresh () { #{{{
|
||||
# Preprocess the shortcuts page to get all the available shortcuts
|
||||
# defined before other pages are rendered.
|
||||
|
|
|
@ -9,9 +9,18 @@ use strict;
|
|||
use IkiWiki 2.00;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "sidebar", call => \&getsetup);
|
||||
hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => 1,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub sidebar_content ($) { #{{{
|
||||
my $page=shift;
|
||||
|
||||
|
|
|
@ -6,10 +6,19 @@ use strict;
|
|||
use IkiWiki 2.00;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "signinedit", call => \&getsetup);
|
||||
hook(type => "canedit", id => "signinedit", call => \&canedit,
|
||||
last => 1);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => 0,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub canedit ($$$) { #{{{
|
||||
my $page=shift;
|
||||
my $cgi=shift;
|
||||
|
|
|
@ -42,6 +42,10 @@ sub getopt () { #{{{
|
|||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
skeleton => {
|
||||
type => "boolean",
|
||||
example => 0,
|
||||
|
|
|
@ -10,9 +10,20 @@ my $smiley_regexp;
|
|||
|
||||
sub import { #{{{
|
||||
add_underlay("smiley");
|
||||
hook(type => "getsetup", id => "smiley", call => \&getsetup);
|
||||
hook(type => "sanitize", id => "smiley", call => \&sanitize);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
# force a rebuild because turning it off
|
||||
# removes the smileys, which would break links
|
||||
rebuild => 1,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub build_regexp () { #{{{
|
||||
my $list=readfile(srcfile("smileys.mdwn"));
|
||||
while ($list =~ m/^\s*\*\s+\\\\([^\s]+)\s+\[\[([^]]+)\]\]/mg) {
|
||||
|
|
|
@ -15,9 +15,18 @@ my %locmap=(
|
|||
);
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "sparkline", call => \&getsetup);
|
||||
hook(type => "preprocess", id => "sparkline", call => \&preprocess);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub preprocess (@) { #{{{
|
||||
my %params=@_;
|
||||
|
||||
|
|
|
@ -41,6 +41,10 @@ sub checkconfig () { #{{{
|
|||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 0, # rcs plugin
|
||||
rebuild => undef,
|
||||
},
|
||||
svnrepo => {
|
||||
type => "string",
|
||||
example => "/svn/wiki",
|
||||
|
|
|
@ -7,9 +7,18 @@ use Encode;
|
|||
use IkiWiki 2.00;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "table", call => \&getsetup);
|
||||
hook(type => "preprocess", id => "table", call => \&preprocess);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub preprocess (@) { #{{{
|
||||
my %params =(
|
||||
format => 'auto',
|
||||
|
|
|
@ -25,6 +25,10 @@ sub getopt () { #{{{
|
|||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
tagbase => {
|
||||
type => "string",
|
||||
example => "tag",
|
||||
|
|
|
@ -9,9 +9,18 @@ use HTML::Template;
|
|||
use Encode;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "template", call => \&getsetup);
|
||||
hook(type => "preprocess", id => "template", call => \&preprocess);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub preprocess (@) { #{{{
|
||||
my %params=@_;
|
||||
|
||||
|
|
|
@ -6,9 +6,18 @@ use strict;
|
|||
use IkiWiki 2.00;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "testpagespec", call => \&getsetup);
|
||||
hook(type => "preprocess", id => "testpagespec", call => \&preprocess);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub preprocess (@) { #{{{
|
||||
my %params=@_;
|
||||
|
||||
|
|
|
@ -11,9 +11,18 @@ use HTML::Entities;
|
|||
use IkiWiki 2.00;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "teximg", call => \&getsetup);
|
||||
hook(type => "preprocess", id => "teximg", call => \&preprocess);
|
||||
} #}}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub preprocess (@) { #{{{
|
||||
my %params = @_;
|
||||
|
||||
|
|
|
@ -10,9 +10,18 @@ use IkiWiki 2.00;
|
|||
use Encode;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "textile", call => \&getsetup);
|
||||
hook(type => "htmlize", id => "txtl", call => \&htmlize);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => 1, # format plugin
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub htmlize (@) { #{{{
|
||||
my %params=@_;
|
||||
my $content = decode_utf8(encode_utf8($params{content}));
|
||||
|
|
|
@ -31,6 +31,10 @@ sub checkconfig () { #{{{
|
|||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 0, # rcs plugin
|
||||
rebuild => undef,
|
||||
},
|
||||
tla_wrapper => {
|
||||
type => "string",
|
||||
#example => "", # TODO example
|
||||
|
|
|
@ -8,10 +8,19 @@ use IkiWiki 2.00;
|
|||
use HTML::Parser;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "toc", call => \&getsetup);
|
||||
hook(type => "preprocess", id => "toc", call => \&preprocess);
|
||||
hook(type => "format", id => "toc", call => \&format);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
my %tocpages;
|
||||
|
||||
sub preprocess (@) { #{{{
|
||||
|
|
|
@ -60,6 +60,7 @@ function getElementsByClass(cls, node, tag) {
|
|||
EOF
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "toggle", call => \&getsetup);
|
||||
hook(type => "preprocess", id => "toggle",
|
||||
call => \&preprocess_toggle);
|
||||
hook(type => "preprocess", id => "toggleable",
|
||||
|
@ -67,6 +68,14 @@ sub import { #{{{
|
|||
hook(type => "format", id => "toggle", call => \&format);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub genid ($$) { #{{{
|
||||
my $page=shift;
|
||||
my $id=shift;
|
||||
|
|
|
@ -14,7 +14,8 @@ use HTML::Entities;
|
|||
my $findurl=0;
|
||||
|
||||
sub import {
|
||||
hook(type => "filter", id => "txt", call => \&filter);
|
||||
hook(type => "getsetup", id => "txt", call => \&getsetup);
|
||||
hook(type => "filter", id => "txt", call => \&filter);
|
||||
hook(type => "htmlize", id => "txt", call => \&htmlize);
|
||||
|
||||
eval q{use URI::Find};
|
||||
|
@ -23,6 +24,14 @@ sub import {
|
|||
}
|
||||
}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => 1, # format plugin
|
||||
},
|
||||
} #}}}
|
||||
|
||||
# We use filter to convert raw text to HTML
|
||||
# (htmlize is called after other plugins insert HTML)
|
||||
sub filter (@) {
|
||||
|
|
|
@ -24,6 +24,10 @@ sub getsetup () { #{{{
|
|||
error($@) if $@;
|
||||
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => 1,
|
||||
},
|
||||
typographyattributes => {
|
||||
type => "string",
|
||||
example => "3",
|
||||
|
|
|
@ -7,10 +7,19 @@ use strict;
|
|||
use IkiWiki 2.00;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "version", call => \&getsetup);
|
||||
hook(type => "needsbuild", id => "version", call => \&needsbuild);
|
||||
hook(type => "preprocess", id => "version", call => \&preprocess);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
sub needsbuild (@) { #{{{
|
||||
my $needsbuild=shift;
|
||||
foreach my $page (keys %pagestate) {
|
||||
|
|
|
@ -15,6 +15,10 @@ sub import { #{{{
|
|||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 1,
|
||||
rebuild => 0,
|
||||
},
|
||||
websetup_force_plugins => {
|
||||
type => "string",
|
||||
example => [],
|
||||
|
|
|
@ -7,9 +7,19 @@ use strict;
|
|||
use IkiWiki 2.00;
|
||||
|
||||
sub import { #{{{
|
||||
hook(type => "getsetup", id => "wiki", call => \&getsetup);
|
||||
hook(type => "htmlize", id => "wiki", call => \&htmlize);
|
||||
} # }}}
|
||||
|
||||
sub getsetup () { #{{{
|
||||
return
|
||||
plugin => {
|
||||
safe => 0, # format plugin
|
||||
rebuild => undef,
|
||||
},
|
||||
} #}}}
|
||||
|
||||
|
||||
sub htmlize (@) { #{{{
|
||||
my %params=@_;
|
||||
my $content = $params{content};
|
||||
|
|
Loading…
Reference in New Issue