Thank you for your interest in our Voting Script. We recommend to read this documentation carefully.
The script has been configured in a way that makes it ready to use. You only need to upload all script files to your web server. When you intent to edit the script you should do it step by step. After each change you should run the script to monitor the effects. Doing so enables you to know what change eventually causes an error.
Please make sure that the folder "logfiles" is writable (chmod 777).
The HTML templates of the script have been generated by the specifications of XHTML 1.0. HTML tags like <br> or <input> contain an ending slash (<br /> or <input type="text" name="field" />).
With this script you provide votes and polls on your website. Your visitors select one option and click the submit button to vote. The results will be displayed as graphical bars. The option can be displayed as radio buttons with text or images aside and as select menus.
To prevent manipulations the script uses the IP address of the user and/or Cookies. That is to make sure, every visitor votes only once. Please note that these two features can only try to prevent fraudulent votes.
Top
The file "index.php" can be viewed as the configuration file of the script. It is possible to duplicate the file and set it up in a different manner. That enables you to run several scripts with the same script core. Because of that you need to install and - if required - license the script only once.
Besides the "index.php" the additional file "voting_image_options.php" has been set up. The poll's options are image paths instead of text. The visitors can choose between images instead of text options. Although, a unique name ($intern_vote_name) and "radio_image" as field type ($form_field_type) has been defined.
The following variables can be edited:
$add_text = array( 'txt_additional' => 'Additional', 'txt_more' => 'More' );
The first part of each entry is the name of the placeholder. In case you want to use the value of txt_addition in your template enter the name of the entry with curly brackets - {txt_addition}. The name must not contain white spaces or special characters. Only allowed is the _ .
Create the following folder on your web server (with the most FTP clients you are able just to copy the hole script with all folders in one go):
/voting_script/ /voting_script/inc/ /voting_script/languages/ /voting_script/logfiles/ /voting_script/templates/
Copy all files to their corresponding folder. Image files (.gif, .jpg, .png) have to be uploaded in binary mode. Every other files have to be uploaded in ASCII mode (text mode).
Please note: The folder "templates" contains a folder with images.
The folder "logfiles" and the file "log.txt" need to be writable (chmod 777).
You can implement the script in two different ways.
You can set a direct link to the script and use it as an independent page. You can customize the HTML template to fit in your website layout.
With the HTML tag <iframe> you can include the script in an existing page. Place the <iframe> tag where you want it to appear within the page: Example:
<iframe name="voting" src="./voting.php" width="400" height="300" frameborder="0"></iframe>
The directory "templates" contains the files for the layout. You can use HTML and CSS to customize the layout as you wish.
In case you are using a WYSIWYG editor like Dreamweaver, Frontpage or NetObjects please make sure that the software does not make any changes by itself.
The template files contain markers with { and } like: {txt_script_name}. These markers will be replaced by its counterparts from the language file "languages/language.en.inc.php". You are free to edit that file and change the words and phrases. You are also free to replace the markers within the template files by real words or put those markers to other positions within the template file. And you are also able to enhance the language file by using the given pattern.
Amongst those word markers exist the so called Loops. Similar to HTML tags the two parts (<LOOP …>…</LOOP>) must not be separated. If you want to alter the position within the template you move the hole block.
The template "voting_image_options.tpl.html" has been created to display images as options. It contains image tags with the placeholder {label} as file name and path within the LOOP block.
You will find answers to your questions and solutions for your problems with the script in our support forum.
You can download the script without registration und use it for free. If you want to use the script without the reference to STADTAUS.com, you can purchase the script online.
More scripts at STADTAUS.com:
Please also visit our project MetaCollection, a guide for webmasters and developers who are in search of CGI, Perl, or PHP script archives.
http://www.metacollection.com/