[Home] [About The World] [Kiosk Web Hosting] [Customer Help]
[Memo] [Login] [WebMail Login]


Interactive Perl Scripts
on The World Kiosk

by Adam Gaffin
www.boston-online.com


If you have a Kiosk account, you can add all sorts of interesting interactive features to your site - everything from online forums to instant polls - all without knowing a lick of programming, thanks to the dozens of free and low-cost Perl scripts out there.

Beyond the sheer thrill of watching technology in action, well done interactive apps can help increase usage of your site. Users will come back more often to see what's new or, if you use conferencing or guestbook software, to see what other users have to say.

What follows are descriptions of the scripts I'm using on Boston Online. I had two main criteria for picking the ones I did: They have the features I wanted and they be reasonably idiot proof, i.e., be something even I could get up and running in a half hour or less. For the most part, setup consists of installing the scripts in your cgi-bin directory, opening up the scripts with a text editor, then following the embedded directions for adding the appropriate paths and file names. (To use the latest version of perl, you will need to set the scripts to use /usr/local/bin/perl5.8.0.)

Vitally Important Caveat

You will need an understanding of Unix directory paths and the chmod command. Both are really, really important, because you will quickly discover that roughly 99% of the problems you run into will be caused either by giving the script the wrong path to some directory or by not setting a particular file or directory's permissions correctly.

Now, you may try the following and hate them. Don't fear - there are plenty more out there. http://www.cgi-resources.com is an excellent resource - it has links to scores of Perl (and even C and C++) apps for Web sites. Each script listed below has numerous alternatives, so if they don't meet your needs, go to cgi-resources and look for one that does.


Forums

Online conferences can be a powerful draw to your site - once you get an active conference going, people will return frequently to see what other users have to say.

Darryl Burgdorf's WebBBS is a great way to add a conference (or conferences) to your site. It used to be free, but is now a $50 shareware script that rivals some far more expensive packages out there (although you can download and use the script as is - it's not crippleware)

One of the good things about the script is its customizability. You can "sandwich" the postings into templates, so that the conferences have the same look and feel as the rest of your site. You can also decide how messages are displayed (all on one page, on separate threaded pages, etc.) and how long messages stay online before they are either purged or sent to a separate "archive" directory. You can even integrate it with cookies that can tell repeat visitors which messages are new (this is done by downloading a separate cookie "library" and installing it - took me about five minutes). It also comes with a built-in search tool - handy if your conferences get a lot of traffic. And you can run multiple copies of the script if you want to set up independent conferences. Plus, if you run into problems, Burgdorf runs a support forum on his site.

It's somewhat similar to the freeware WWWBoard. I chose it initially mainly because of its display options. WWWBoard displays ALL messages on a single page - unwieldy when you have a lot of messages. With WebBoard's "compressed" option, users get just a list of thread topics - just like in your more modern Usenet readers.

Links

WebBBS: http://awsd.com/scripts/webbbs/index.shtml
WebBoard: http://www.worldwidemart.com/scripts/wwwboard.shtml
Boston Online example: http://www.the-election.com/cgi-bin/conf.pl


Search Engines

If you have more than a few pages on your site, a search engine can be a handy way to let users find documents quickly.

Probably the easiest way to do this doesn't involve scripts at all. Hotbot has a neat service that lets you create a search form that looks at its database for relevant hits. The advantage of Hotbot is that it does all the indexing work. The disadvantages are that any changes you make on your site are not instantly reflected in its database and that you're sending users to somebody else's site (and ads, etc.).

On Boston Online, I use Burgdorf's WebSearch, which is free. It has a number of nice features, including weighted searches (the more often a search term shows up in a document, the higher it shows up on the results page) and support for Boolean searches and for meta tags (so that you can further push documents up and control how their summaries look). Results are displayed rather nicely as well - if your pages have "description" meta tags, WebSearch uses those to provide the document summary. And you never have to worry about updating WebSearch. This is because every time a user does a search, the script looks through all the documents on your site.

And there's its main drawback. If you have lots of documents (or documents that are incredibly long) on your site, it is going to take a fair amount of time to run a search (this is why industrial-strength search engines and databases rely on compiled indexes, rather than searching every document). I have under 200 documents on Boston Online, with maybe a total of 1 megabyte of text, and it sometimes seems to hesitate just to the point where you wonder if something is wrong - and then it pops up the results.

ICE is a system that's more akin to the big search engines. It consists of two scripts. One you run on the command line via telnet to index your site. The other is the engine that users connect to to conduct a search. At least on Boston Online, it is noticeably faster than WebSearch. The disadvantages: Every time you make a change on your site, you have to run the indexer; its results display is a lot more barebones than WebSearch's (it shows the title, the date the page was created and the number of occurrences of the word or phrase in the document).

Links

HotBot form setter-upper: http://www.hotbot.com/help/tools/
WebSearch: http://awsd.com/scripts/websearch/index.shtml
ICE: http://www.informatik.th-darmstadt.de/~neuss/ice/ice.html
Boston Online examples: http://www.boston-online.com (on the lefthand side, scroll down a page) for WebSearch; http://www.boston-online.com/cgi-bin/ice2-for.pl for ICE.


Forms

If you want users to submit specific types of information to you, you want an online form. But unless you have a script to format the form's output, what you'll get in e-mail is a mass of gibberish, basically.

Matt Wright's FormMail is a script that mails you the results of a form submission in English. Once you install it, you add a variety of "hidden" variables to your HTML form definition that control how you get the data. It also lets you require that the user fill out specific fields (an e-mail address, for example) and lets you re-direct the user to a new page after he clicks on "submit" (so you could have a "thank you" page, for example). It's one of the easiest scripts to set up - there are only a couple of variables you have to add (such as the path to World's SMTP process). Then you can go wild in forms (the documentation for the script is very good).

Links

FormMail: http://www.worldwidemart.com/scripts/formmail.shtml
Boston Online example: http://www.boston-online.com/restform.html (call up the HTML source to see examples of the hidden variables).


Banner Ads

Ad rotation software is what the big sites use to display an endless procession of ads when you call up their pages. You can do the same thing. Even if you don't have advertising, you might still want to use the software - to highlight different pages or resources on your site. Every time a user calls up your home page, say, he'll see a graphical link to another page (you will have to come up with the graphics, however).

I'm using Burgdorf's WebAdverts, which, like his BBS package, is a $50 shareware app. It's fairly simple to set up and lets you decide which ads go on which pages. If you do take ads, it also has a log-in system for your advertisers to get instant stats on impressions, clickthrough, etc. You can use either server-side includes (this lets you customize the ads down to the alt statements, but requires you to use .shtml pages) or through a static call to the script (you get rotating ads, but the alt statements have to be "hard-coded" into your HTML).

Links

WebAdverts: http://awsd.com/scripts/webadverts/index.shtml
Boston Online example: http://www.boston-online.com


Polls

Want to get a quick read on how your users feel about a particular topic? Or just want to run a fun "question of the day" feature? Bignosebird.com's Reader Survey not only lets you set up an insta-poll, it displays the results in bar graphs as soon as a user clicks on "Vote" (you can also set up a "See Results" button). The script lets you block people from voting multiple times, although since it works on the incoming IP address, this could cause problems if you have lots of users from places such as AOL (since it uses a proxy server, which means many users could have the same IP address). Fortunately, this is optional.

A couple of caveats with the script: It comes named survey.cgi. You may have to change the name to survey.pl for it to work on the World. Also, the instructions don't tell you how to run more than one survey at a time. Fortunately that's easy enough to do - if you run into trouble, just drop me a line.

Links

Reader Survey: http://bignosebird.com/carchive/survey.shtml
Boston Online example: http://www.boston-online.com/barnicle/temp.html (this is a barebones page; I originally had it live on a page about Mike Barnicle, but one of the problems with polls is that people will try to stuff the ballot box).




(@) THE WORLD
Comments? Questions? Problems? Contact us.
Page last modified February 14, 2003.
Web site contents & design Copyright © 2003 Software Tool & Die.
  Legal info.
Spammers are crooks! Don't do business with crooks!