AnalogX
CGIVote
CGIVote
CGIVote
CGIVote

CGIVote

version 1.00
version 1.00
version 1.00
version 1.00

version 1.00

Documentation

Documentation


While it's fun to guess at how users feel about things, it's even cooler to actually know! I've always enjoyed looking over voting results to see what people think about certain subjects, but have always found the voting programs clunky and limited.

AnalogX CGIVote is designed to give a large amount of flexibility, while still being easy to use and understand. You can have an unlimited number of voting topics, questions, answers, etc!

Inside the /votedata subdirectory, there are two files, 'header.htm' and 'footer.htm' which unsurprisingly are what it puts before and after (respectively) the returned matches. This is primarily to allow you to customize the engine to fit in perfectly with the look of your site. Also, if you create a dir called 'logs' inside /votedata, then it will log all of the voting results made by an IP address.

The /votedata subdirectory is also where you want to put the configuration file for each voting topic. Currently it supports the following keywords:

    TOPICNAME       This is the overall topic for this set of questions/answers
    QUESTIONCOUNT   The total number of questions in the topic

    QUESTION        The question number, from 1 to x, followed by the question
    ANSWERMAX       The maximum number of answers; ie, can more than one answer be
                    selected
    ANSWERCOUNT     The total number of answer to the question
    ANSWER          The answer number, from 1 to x, followed by the actual answer

Make sure to check out the included examples to get a better feel about how things work.

The look and results can be totally customized using scripting similar to all the other AnalogX CGI programs. There are special keywords that CGIVote looks for in the source file, and inserts the appropriate text in place of a certain returned value:

    &Vote.Topic;            The overall topic string
    &Vote.Votes;            The number of votes for this answer
    &Vote.Answer;           The answer string
    &Vote.Percent;          The percentage of votes for this answer
    &Vote.Question;         The question string
    &Vote.TotalVotes;       Total number of votes for current question
    &Vote.TotalAnswers;     Total number of answers for current question
    &Vote.TotalQuestions;   Total number of questions

Now, each of these is modified to reflect which question/answer it deals with, so for instance if you're after the number of votes to Question 2, Answer 4, then you put this:

    &Vote.Q2A4Votes;

The 'Q' simply means the question, and the 'A' simply means the answer. If Q is not specified, and you do something like &Vote.A5Votes;, it assumes you're after the same Q as the last one.

The program only allows one vote per IP address, although it will appear to take a second vote from the person, it never actually saves it.

If you need to check the version number, you can get it by typing the following at the command prompt:

    cgivote /?

it will display the version, subversion, and release status.

Although I don't know if I need to state this or not, I'll do it anyway, this will ONLY work on a server running some flavor of Windows, and should work with any Web Server (whether it be IIS or Apache).