« Another day, another website | Main | Using OpenPGP subkeys in Mutt »

A blosxom plugin to allow links to a kwiki

I've done away with the writebacks plugin on my blosxom installs, and have instead written a plugin that uses the Kwiki module to insert links to new pages based on the filename of the post.

Needs to be pointed at a basic kwiki config file with the "script_name" and "database_directory" settings defined.

package kwikilink;
use strict;
use warnings;
use Kwiki;

#-------------------
# Begin Local Config

my $configdir = "/home/heillingr/blosxom/plugins";

# End Local Config
#-------------------

our $hub = Kwiki->new->load_hub("$configdir/kwikilink.yaml");
$hub->load_class('pages');
our $kwikilink;

sub start {
return(1);
}

sub story {
my ($path, $file) = @_[1,2];
my $fullname = "$path/$file";
$fullname =~ s{(?:^|/)([a-z])}{\U$1}g;
my $page = $hub->pages->new_from_name($fullname);
$kwikilink = $page->kwiki_link;
}

1;

TrackBack

TrackBack URL for this entry:
http://blog.s8n.net/mt/mt-tb.cgi/968

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on September 22, 2004 10:03 PM.

The previous post in this blog was Another day, another website.

The next post in this blog is Using OpenPGP subkeys in Mutt.

Many more can be found on the main index page or by looking through the archives.