]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' into htmlify
authorDavid Bremner <bremner@unb.ca>
Mon, 1 Sep 2008 15:12:51 +0000 (12:12 -0300)
committerDavid Bremner <bremner@unb.ca>
Mon, 1 Sep 2008 15:12:51 +0000 (12:12 -0300)
1  2 
IkiWiki/Plugin/mailbox.pm

index e619eb35fc3c12b89088bb42b60c5daa14cdc1d2,8e91bc4cb1157e3888c618089cca5a0b8e5883c3..bf626030bb69a3f78a7fa443a6fe5838b0b3a1bd
@@@ -28,16 -28,17 +28,18 @@@ sub import { #{{
        hook(type => "preprocess", id => "mailbox", call => \&preprocess);
        hook(type => "scan", id => "mailbox", call => \&scan);
        hook(type => "pagetemplate", id=>"mailbox", call => \&pagetemplate);
 +      hook(type => "htmlize",id=>"mbox",call => \&mbox_htmlize);
        IkiWiki::loadplugin("filecheck");
  } # }}}
  
  sub scan(@){
        my %params=@_;
        my $page=$params{page};
+       
+       my $linktext=$config{url}.'/mailbox.css';
  
        push @{$metaheaders{$page}}, 
-              '<link rel="stylesheet" href="mailbox.css" type="text/css"/>'
+              '<link rel="stylesheet" href="'.$linktext.'" type="text/css"/>'
  }
  
  sub preprocess (@) { #{{{
  
  } # }}}
  
 +sub mbox_htmlize(@){
 +    my %params=@_;
 +    
 +    my $path=$config{srcdir} . '/' . $params{page}.".mbox";
 +    return format_mailbox(path=>$path,type=>'Mbox',destpage=>$params{page});
 +}
  
  ### The guts of the plugin
  ### parameters