]> sipb.mit.edu Git - ikiwiki.git/commitdiff
more links
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 29 Jul 2006 20:14:07 +0000 (20:14 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 29 Jul 2006 20:14:07 +0000 (20:14 +0000)
IkiWiki/Plugin/pagestats.pm
doc/plugins/pagestats.mdwn

index 86ebbe1d5f7732b1c8ab554535395bc74569072b..1d4d5ecdfa3569ca4268c1e11bd9b068e82d3aac 100644 (file)
@@ -42,8 +42,14 @@ sub preprocess (@) { #{{{
        }
 
        if ($style eq 'table') {
-               return "<table class='pageStats'>\n".join("\n", map { "<tr><td>$_</td><td>".$counts{$_}."</td></tr>" }
-                     sort { $counts{$b} <=> $counts{$a} } keys %counts)."\n</table>\n" ;
+               return "<table class='pageStats'>\n".
+                       join("\n", map {
+                               "<tr><td>".
+                               IkiWiki::htmllink($params{page}, $params{destpage}, $_, 1).
+                               "</td><td>".$counts{$_}."</td></tr>"
+                       }
+                       sort { $counts{$b} <=> $counts{$a} } keys %counts).
+                       "\n</table>\n" ;
        } else {
                # In case of misspelling, default to a page cloud
 
index f750e3cb119bceeca5f5dbd75fc981846b3694b8..e37f804a30918ad7f5672791386d4d31ebd9bfef 100644 (file)
@@ -13,3 +13,5 @@ And here's how to create a table of all the pages on the wiki:
 This plugin is included in ikiwiki, but is not enabled by default. If it is
 enabled, here's a link cloud for this entire wiki:
 [[pagestats ]]
+And here's a table:
+[[pagestats style="table"]]