* Make auth methods pluggable.
[ikiwiki] / 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;
6
7 use warnings;
8 use strict;
9 use IkiWiki '1.00';
10
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 => "savestate", id => "savestate", call => \&savestate);
25 } # }}}
26
27 sub getopt () { #{{{
28         debug("skeleton plugin getopt");
29 } #}}}
30
31 sub checkconfig () { #{{{
32         debug("skeleton plugin checkconfig");
33 } #}}}
34
35 sub preprocess (@) { #{{{
36         my %params=@_;
37
38         return "skeleton plugin result";
39 } # }}}
40
41 sub filter (@) { #{{{
42         my %params=@_;
43         
44         debug("skeleton plugin running as filter");
45
46         return $params{content};
47 } # }}}
48
49 sub htmlize (@) { #{{{
50         my %params=@_;
51
52         debug("skeleton plugin running as htmlize");
53
54         return $params{content};
55 } # }}}
56
57 sub sanitize (@) { #{{{
58         my %params=@_;
59         
60         debug("skeleton plugin running as a sanitizer");
61
62         return $params{content};
63 } # }}}
64
65 sub format (@) { #{{{
66         my %params=@_;
67         
68         debug("skeleton plugin running as a formatter");
69
70         return $params{content};
71 } # }}}
72
73 sub pagetemplate (@) { #{{{
74         my %params=@_;
75         my $page=$params{page};
76         my $template=$params{template};
77         
78         debug("skeleton plugin running as a pagetemplate hook");
79 } # }}}
80
81 sub delete (@) { #{{{
82         my @files=@_;
83
84         debug("skeleton plugin told that files were deleted: @files");
85 } #}}}
86
87 sub change (@) { #{{{
88         my @files=@_;
89
90         debug("skeleton plugin told that changed files were rendered: @files");
91 } #}}}
92
93 sub cgi ($) { #{{{
94         my $cgi=shift;
95
96         debug("skeleton plugin running in cgi");
97 } #}}}
98
99 sub auth ($$) { #{{{
100         my $cgi=shift;
101         my $session=shift;
102
103         debug("skeleton plugin running in auth");
104 } #}}}
105
106 sub savestate () { #{{{
107         debug("skeleton plugin running in savestate");
108 } #}}}
109
110 1