Monday, September 08, 2003

Blosxom Pollxn Plugin A Challenge

Blosxom Test Notes: Worked all day yesterday learning many of the ins and outs of Blosxom. I managed
to not only install it and get it working well but modified the templates so
my
blog
is more attractive. Then today, I installed the Pollxn plug-in to add comment
functionality. I had quite a time with it because I was a bit confused over the
instructions.


Problem 1: The instructions for adding the Comments link to the Blosxom blog
said to paste the following code into the story.html file.



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



The first part of this link only works if the pollxn.cgi file has been copied
into a /cgi-bin directory under the Blosxom datadir. The instructions initially
recommended installing it directly in the Blosxom datadir then said it could
be installed
in a cgi-bin if necessary. Often an ISP will limit users to a single cgi-bin
directory directly under their public_html directory. However, if such a user
tries to use the above script, they will get a file not found. I’m trying
to work out a defined installation procedure with as much preconfigured as
possible since faculty don’t like editing configuration files. I prefer to install the cgi file directly in the blosxom directory then changing the url to:



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



Now for the second problem. I couldn’t figure out why the link was resolving
to a filename ending in .html when my Blosxom.cgi file correctly specified
my file extension to be .txt. It appears that the $fn variable refers to only
the filename without the file extension. My Blosxom “flavour” is
specified as .html (I use modified .html templates). The result is that the
above link resolves to a filename ending in .html instead of .txt. I further
modified the link to:



<a href="pollxn.cgi?storypath=$fn.$file_extension">$pollxn::comments_count</a>



to correct this problem.



No comments: