home news download install how-to [plug-in] links contact

. . .

plug-in for Blosxom

If you are using Blosxom 2.0 or higher as your blog engine, the Pollxn plug-in will let your blog display the number of comments available for each blog entry:

     Homer Simpson Gets Slow Haircut
In his feature film debut, Krusty the Clown spends 90 minutes
cutting Homer Simpson's hair with rusty toenail clippers.
Link | 43 comments

In the example above, "43 comments" is dynamically generated by the Pollxn plug-in. If you'd like to use the plug-in, follow the directions below to download and configure it.

0.   Before You Start

You should have already downloaded and installed Blosxom and the Pollxn engine. Both should be running O.K. Blosxom should be version 2.0 or higher.

Note: At the time of this writing Blosxom 2.x is in Beta. We recommend getting at least version 2_0_b4. Some earlier versions had a few bugs. Version 2_0_b4 seems stable.


1.   Download the Pollxn Plug-In

Download the Pollxn plug-in package from the download page. Unzip or untar it.


2.   Transfer Pollxn Plug-In to Blosxom's Plugins Folder on Server

Note: If you prefer to edit files on your own computer before uploading them to your web server, do step 3 below before doing this step.

Inside the plug-in package is a file called pollxn. This file is the Pollxn plug-in for Blosxom. FTP or copy the file to your Blosxom plugins folder.


3.   Configure the Pollxn Plug-In

Load the pollxn plug-in into your favorite text editor and modify its configuration variables:

      $datadir - The file system path to your Blosxom folder. This should be identical to the $datadir variable you set in Pollxn.cgi. If you're using Windows, be sure to use backslashes in your paths.

$addtext and addtexts - These let you define any word(s) that will appear immediately after each blog's comment count, like this:


You can use Comments, Posts, or whatever you like. Make addtext singular (i.e., 'Post') and addtexts plural ('Posts').

Save pollxn when you're done editing it.


4.   Enable Plugins in Blosxom

Load blosxom.cgi into your favorite text editor. Find the Plugins section. Make sure $plugin_dir is set to the directory where you copied the Pollxn plug-in. Save blosxom.cgi if you make any changes.


5.   Edit Your Blosxom Story Template

Your Blosxom story template is responsible for formatting each blog entry in your blog. This is where you'll want to put a 'discuss' link to Pollxn (if you haven't already) and a reference to the Pollxn plug-in that will display the number of comments available for the blog entry.

Using a text editor, open the Blosxom story template that goes with the Blosxom flavour you use (i.e., story.html, story.1993, etc.).

Insert a 'discuss' hyperlink to pollxn.cgi if you haven't already. Users will click on this link whenever they want to read or post comments about a given blog entry. Here is a sample hyperlink to pollxn.cgi:

     <a href="/cgi-bin/pollxn.cgi?storypath=$path/$fn.$flavour">Discuss</a>

Next, insert a reference to the Pollxn plug-in:


Put the plug-in reference wherever you want a blog entry's comments count (i.e., '45 comments') to appear. If you'd like to use the comment count as your discussion hyperlink, use $pollxn::comments_count as your HREF text, like this:

     <a href="/cgi-bin/pollxn.cgi?storypath=$path/$fn.$flavour">$pollxn::comments_count</a>

When you're done editing, save the story file.


6.   Test the Pollxn Plug-In

Surf to your Blosxom blog. Each blog story should now show the number of Pollxn comments associated with it.