Recent Changes - Search:

A collection of useful facts by Joel Williams. Adelaide denizen. Computer tinkerer. Former terrestrial ecology student of Flinders University. PhD candidate at ANU. Editor for freshmeat.net. Adelaide University Mountain Club member and outdoor enthusiast. Occasional networking go-to guy.

Contact me by email at joel at this domain.

Kwiki Mod

Wiki-style page titles don't seem to be Google-able so I made some modifications to expand them into space-separated words. I accidentally blew this away after a dist-upgrade so here's now I figured out how to do it, again.

In /usr/share/perl5/Kwiki/CGI.pm

 sub spaced_page_name {
    my $name = $self->{page_name};
    $name =~ s/([a-z])([A-Z])/$1 $2/g;
    return $name;
 }

In template/tt2/kwiki_begin.html change

  [% hub.cgi.page_name %] -

to

  [% hub.cgi.spaced_page_name %] -

In kwiki_screen.html change

 <div id="title_pane">
  <h1>[% screen_title || self.class_title %]</h1>
 </div>

to

 <div id="title_pane">
  <h1>[% hub.cgi.spaced_page_name || screen_title || self.class_title %]</h1>
 </div>

Add Google Analytics code in template/tt2/kwiki_end.html.

I managed to nuke it again in another dist-upgrade and couldn't resurrect it quickly, so I've since ditched kwiki.

Edit - History - Print - Recent Changes - Search
Page last modified on January 05, 2010, at 08:59 PM