]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/skeleton.pm.example
add mising hooks and fix syntax error
[ikiwiki.git] / IkiWiki / Plugin / skeleton.pm.example
index ea7500a70fb96b3494bc58f6b7cbbf7673d08e21..f5e401c050198329ce1269befc05db7f44e9d3fd 100644 (file)
@@ -6,7 +6,7 @@ package IkiWiki::Plugin::skeleton;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 sub import {
        hook(type => "getopt", id => "skeleton",  call => \&getopt);
@@ -30,7 +30,9 @@ sub import {
        hook(type => "auth", id => "skeleton", call => \&auth);
        hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
        hook(type => "canedit", id => "skeleton", call => \&canedit);
-       hook(type => "cansave", id => "skeleton", call => \&cansave);
+       hook(type => "canremove", id => "skeleton", call => \&canremove);
+       hook(type => "canrename", id => "skeleton", call => \&canrename);
+       hook(type => "checkcontent", id => "skeleton", call => \&checkcontent);
        hook(type => "editcontent", id => "skeleton", call => \&editcontent);
        hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
        hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
@@ -90,7 +92,7 @@ sub linkify (@) {
        return $params{content};
 }
 
-sub scan (@) { #{{{a
+sub scan (@) {
        my %params=@_;
 
        debug("skeleton plugin running as scan");
@@ -181,15 +183,6 @@ sub canedit ($$$) {
        debug("skeleton plugin running in canedit");
 }
 
-sub cansave ($$$$) {
-       my $page=shift;
-       my $content=shift;
-       my $cgi=shift;
-       my $session=shift;
-
-       debug("skeleton plugin running in cansave");
-}
-
 sub canremove ($$$) {
        my $page=shift;
        my $cgi=shift;
@@ -206,6 +199,12 @@ sub canrename ($$$) {
        debug("skeleton plugin running in canrename");
 }
 
+sub checkcontent (@) {
+       my %params=@_;
+
+       debug("skeleton plugin running in checkcontent");
+}
+
 sub editcontent ($$$) {
        my %params=@_;