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