]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/inline.pm
* Patch from Tuomov to link to the directory in feeds when usedirs is in
[ikiwiki.git] / IkiWiki / Plugin / inline.pm
index d0cfbf873c93d45c74684d221d96b324fc739f3d..452fdd267eab2d0b3b2e3fc182171f76ffa60dde 100644 (file)
@@ -137,6 +137,14 @@ sub preprocess_inline (@) { #{{{
                        exists $params{rootpage} ? $params{rootpage} : $params{page});
                $formtemplate->param(rssurl => $rssurl) if $feeds && $rss;
                $formtemplate->param(atomurl => $atomurl) if $feeds && $atom;
+               if (exists $params{postformtext}) {
+                       $formtemplate->param(postformtext =>
+                               $params{postformtext});
+               }
+               else {
+                       $formtemplate->param(postformtext =>
+                               gettext("Add a new post titled:"));
+               }
                $ret.=$formtemplate->output;
        }
        elsif ($feeds) {
@@ -312,14 +320,13 @@ sub genfeed ($$$$@) { #{{{
        my $page=shift;
        my @pages=@_;
        
-       my $url=URI->new(encode_utf8($config{url}."/".htmlpage($page)));
+       my $url=URI->new(encode_utf8($config{url}."/".urlto($page,"")));
        
        my $itemtemplate=template($feedtype."item.tmpl", blind_cache => 1);
        my $content="";
        my $lasttime = 0;
        foreach my $p (@pages) {
-               my $u=URI->new(encode_utf8($config{url}."/".htmlpage($p)));
-               
+               my $u=URI->new(encode_utf8($config{url}."/".urlto($p, "")));
                my $pcontent = absolute_urls(get_inline_content($p, $page), $url);
 
                $itemtemplate->param(
@@ -407,7 +414,7 @@ sub pingurl (@) { #{{{
 
        foreach my $page (keys %toping) {
                my $title=pagetitle(basename($page), 0);
-               my $url="$config{url}/".htmlpage($page);
+               my $url="$config{url}/".urlto($page, "");
                foreach my $pingurl (@{$config{pingurl}}) {
                        debug("Pinging $pingurl for $page");
                        eval {