]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - IkiWiki/Plugin/skeleton.pm
web commit from 129.27.232.128: poll vote
[git.ikiwiki.info.git] / IkiWiki / Plugin / skeleton.pm
1 #!/usr/bin/perl
2 # Ikiwiki skeleton plugin. Replace "skeleton" with the name of your plugin
3 # in the lines below, remove hooks you don't use, and flesh out the code to
4 # make it do something.
5 package IkiWiki::Plugin::skeleton;
7 use warnings;
8 use strict;
9 use IkiWiki '1.00';
11 sub import { #{{{
12         hook(type => "getopt", id => "skeleton",  call => \&getopt);
13         hook(type => "checkconfig", id => "skeleton", call => \&checkconfig);
14         hook(type => "preprocess", id => "skeleton", call => \&preprocess);
15         hook(type => "filter", id => "skeleton", call => \&filter);
16         hook(type => "htmlize", id => "skeleton", call => \&htmlize);
17         hook(type => "sanitize", id => "skeleton", call => \&sanitize);
18         hook(type => "format", id => "skeleton", call => \&format);
19         hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
20         hook(type => "delete", id => "skeleton", call => \&delete);
21         hook(type => "change", id => "skeleton", call => \&change);
22         hook(type => "cgi", id => "skeleton", call => \&cgi);
23         hook(type => "auth", id => "skeleton", call => \&auth);
24         hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
25         hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
26         hook(type => "savestate", id => "savestate", call => \&savestate);
27 } # }}}
29 sub getopt () { #{{{
30         debug("skeleton plugin getopt");
31 } #}}}
33 sub checkconfig () { #{{{
34         debug("skeleton plugin checkconfig");
35 } #}}}
37 sub preprocess (@) { #{{{
38         my %params=@_;
40         return "skeleton plugin result";
41 } # }}}
43 sub filter (@) { #{{{
44         my %params=@_;
45         
46         debug("skeleton plugin running as filter");
48         return $params{content};
49 } # }}}
51 sub htmlize (@) { #{{{
52         my %params=@_;
54         debug("skeleton plugin running as htmlize");
56         return $params{content};
57 } # }}}
59 sub sanitize (@) { #{{{
60         my %params=@_;
61         
62         debug("skeleton plugin running as a sanitizer");
64         return $params{content};
65 } # }}}
67 sub format (@) { #{{{
68         my %params=@_;
69         
70         debug("skeleton plugin running as a formatter");
72         return $params{content};
73 } # }}}
75 sub pagetemplate (@) { #{{{
76         my %params=@_;
77         my $page=$params{page};
78         my $template=$params{template};
79         
80         debug("skeleton plugin running as a pagetemplate hook");
81 } # }}}
83 sub delete (@) { #{{{
84         my @files=@_;
86         debug("skeleton plugin told that files were deleted: @files");
87 } #}}}
89 sub change (@) { #{{{
90         my @files=@_;
92         debug("skeleton plugin told that changed files were rendered: @files");
93 } #}}}
95 sub cgi ($) { #{{{
96         my $cgi=shift;
98         debug("skeleton plugin running in cgi");
99 } #}}}
101 sub auth ($$) { #{{{
102         my $cgi=shift;
103         my $session=shift;
105         debug("skeleton plugin running in auth");
106 } #}}}
108 sub formbuilder_setup (@) { #{{{
109         my %params=@_;
110         
111         debug("skeleton plugin running in formbuilder_setup");
112 } # }}}
114 sub formbuilder (@) { #{{{
115         my %params=@_;
116         
117         debug("skeleton plugin running in formbuilder");
118 } # }}}
120 sub savestate () { #{{{
121         debug("skeleton plugin running in savestate");
122 } #}}}