My Poll v2.1


Please read everything but email me if
(1) you do not understand
(2) you get it running (so I can check it out and put up a link to your site)
at support@fuzzymonkey.net

In this README:

REQUIRES
SUMMARY
FEATURES
DISTRIBUTION / LICENSE
INSTALLATION
HOW TO USE
CHANGES
TODO

REQUIRES

SUMMARY

“My Poll” aims to provide an easy to use add in solution for adding voting interaction on webpages. The package includes both a CGI script and an SSI for embedding into .shtml pages. Both interfaces use the same config file and can be used exclusively or in combination. A question and list of answers is entered in the config file. The included CGI script can be a accessed directly to present the user with the question and list of options. After making a selection, a pretty bar graph is displayed with the results. The included SSI script can be used to embed the question and answers in a smaller table within a webpage. Clicking on one of the options in the SSI page shows the results in a new popup window. The script has optional time based IP logging to prevent multiple votes from the same IP address within a specified window.

FEATURES

DISTRIBUTION / LICENSE

This software is released under the GPL. Please see the included LICENSE file. Copyright (C) 2003 Michael and Erin Spiceland This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Use this script at your own risk! I make no warranties that it is hack proof!

INSTALLATION



1. Install scripts

If you have shell access

ftp the poll*.tar.gz to your cgi-bin/ directory

untar it with

$ tar -zxvpf poll*.tar.gz

edit the config file, sitevariables.pl

$ cd poll/

$ pico sitevariables.pl (This command assumes you use pico. Replace this with vi, emacs, or whatever your favorite editor is)

done

If you do not have shell access

Download the .zip or .tar.gz file on your computer. Unzip or untar the contents. Edit the sitevariables.pl file to your liking. Ftp the entire unziped poll/ directory into the cgi-bin/ folder of your web account. Now use ftp or some other method to set the permissions of .cgi files to 755 (chmod 755 *.cgi). Also, you may what to verify that the user that your webserver runs as (normally apache or your username) has permissions to write to the directory containing the .cgi files.

done

2. Customizing it

Read the article on “templating” in our articles section. It will show you how to edit the template.html file that is in the same directory as the scripts. Just make sure you leave the tag <!-- content --> as a place holder for the script content.

You will also be able to edit the colors and such in the config file, but you saw that in the previous step.
5. Your done!
Fire up your browser and point it at the index.cgi script. Good Luck! Email me if you use it!

HOW TO USE



There are two ways of using My Poll. The first, is to use it like a normal CGI script. To do that, just point your browser at the script like so:
e.g.- http://www.yoursite.com/cgi-bin/poll/index.cgi
If you get an internal server error, run it from command line so that you can see what is going wrong. See the FAQ in our articles section for more info.
The second way is to use SSI. An SSI is a way of building a normal webpage using html but embedding a script in the middle of it. Basically, you build a webpage like normal but name it .shtml instead of .html. Then, you have a special line in the .shtml file that specifies the name of the script you want to execute. The script gets executed and the output of the script is then placed in the html where you specified. If you want to use the SSI script, it is called ssi.cgi. There is an example of how to use this in the doc/ directory.

CHANGES

11.24.2003 Version 2.0. Initial release of the completely re-written version.
12.07.2003 Version 2.1. Cleaned up the look and feel. Added font options in config file to make it easier to integrate with .css or specify custom fonts.

TODO

1. nothing unless you email suggestions.

Send questions or comments to mike@fuzzymonkey.net

Thanks,
Michael and Erin
FuzzyMonkey scripting wizards