]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - IkiWiki/Plugin/skeleton.pm
17a2162ffc240728f17ec44f149e79c65597705d
[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 2.00;
11 sub import { #{{{
12         hook(type => "getopt", id => "skeleton",  call => \&getopt);
13         hook(type => "checkconfig", id => "skeleton", call => \&checkconfig);
14         hook(type => "needsbuild", id => "skeleton", call => \&needsbuild);
15         hook(type => "preprocess", id => "skeleton", call => \&preprocess);
16         hook(type => "filter", id => "skeleton", call => \&filter);
17         hook(type => "linkify", id => "skeleton", call => \&linkify);
18         hook(type => "scan", id => "skeleton", call => \&scan);
19         hook(type => "htmlize", id => "skeleton", call => \&htmlize);
20         hook(type => "sanitize", id => "skeleton", call => \&sanitize);
21         hook(type => "format", id => "skeleton", call => \&format);
22         hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
23         hook(type => "templatefile", id => "skeleton", call => \&templatefile);
24         hook(type => "delete", id => "skeleton", call => \&delete);
25         hook(type => "change", id => "skeleton", call => \&change);
26         hook(type => "cgi", id => "skeleton", call => \&cgi);
27         hook(type => "auth", id => "skeleton", call => \&auth);
28         hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
29         hook(type => "canedit", id => "skeleton", call => \&canedit);
30         hook(type => "editcontent", id => "skeleton", call => \&editcontent);
31         hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
32         hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
33         hook(type => "savestate", id => "skeleton", call => \&savestate);
34 } # }}}
36 sub getopt () { #{{{
37         debug("skeleton plugin getopt");
38 } #}}}
40 sub checkconfig () { #{{{
41         debug("skeleton plugin checkconfig");
42 } #}}}
44 sub needsbuild () { #{{{
45         debug("skeleton plugin needsbuild");
46 } #}}}
48 sub preprocess (@) { #{{{
49         my %params=@_;
51         return "skeleton plugin result";
52 } # }}}
54 sub filter (@) { #{{{
55         my %params=@_;
56         
57         debug("skeleton plugin running as filter");
59         return $params{content};
60 } # }}}
62 sub linkify (@) { #{{{
63         my %params=@_;
64         
65         debug("skeleton plugin running as linkify");
67         return $params{content};
68 } # }}}
70 sub scan (@) { #{{{a
71         my %params=@_;
73         debug("skeleton plugin running as scan");
74 } # }}}
76 sub htmlize (@) { #{{{
77         my %params=@_;
79         debug("skeleton plugin running as htmlize");
81         return $params{content};
82 } # }}}
84 sub sanitize (@) { #{{{
85         my %params=@_;
86         
87         debug("skeleton plugin running as a sanitizer");
89         return $params{content};
90 } # }}}
92 sub format (@) { #{{{
93         my %params=@_;
94         
95         debug("skeleton plugin running as a formatter");
97         return $params{content};
98 } # }}}
100 sub pagetemplate (@) { #{{{
101         my %params=@_;
102         my $page=$params{page};
103         my $template=$params{template};
104         
105         debug("skeleton plugin running as a pagetemplate hook");
106 } # }}}
108 sub templatefile (@) { #{{{
109         my %params=@_;
110         my $page=$params{page};
111         
112         debug("skeleton plugin running as a templatefile hook");
113 } # }}}
115 sub delete (@) { #{{{
116         my @files=@_;
118         debug("skeleton plugin told that files were deleted: @files");
119 } #}}}
121 sub change (@) { #{{{
122         my @files=@_;
124         debug("skeleton plugin told that changed files were rendered: @files");
125 } #}}}
127 sub cgi ($) { #{{{
128         my $cgi=shift;
130         debug("skeleton plugin running in cgi");
131 } #}}}
133 sub auth ($$) { #{{{
134         my $cgi=shift;
135         my $session=shift;
137         debug("skeleton plugin running in auth");
138 } #}}}
140 sub sessionncgi ($$) { #{{{
141         my $cgi=shift;
142         my $session=shift;
144         debug("skeleton plugin running in sessioncgi");
145 } #}}}
147 sub canedit ($$$) { #{{{
148         my $page=shift;
149         my $cgi=shift;
150         my $session=shift;
152         debug("skeleton plugin running in canedit");
153 } #}}}
155 sub editcontent ($$$) { #{{{
156         my %params=@_;
158         debug("skeleton plugin running in editcontent");
160         return $params{content};
161 } #}}}
163 sub formbuilder_setup (@) { #{{{
164         my %params=@_;
165         
166         debug("skeleton plugin running in formbuilder_setup");
167 } # }}}
169 sub formbuilder (@) { #{{{
170         my %params=@_;
171         
172         debug("skeleton plugin running in formbuilder");
173 } # }}}
175 sub savestate () { #{{{
176         debug("skeleton plugin running in savestate");
177 } #}}}