:: LI-Easypoll
| Documentation - Setup |
Extract the .zip file to a temporary folder and edit everything as described
below. Then upload everything to a folder on your server. Then go to admin.php and setup the database and any poll you want.
NOTE 1: If you are running admin.php for the first time and don't setup the database first (last option in de admin menu)
you will get MySQL errors when you are going to another menu option
NOTE 2: When creating a poll you shouldn't use the following characters in any of the fields ` ' " \
This script comes with 15 files:
- admin.php --> The admin script for all the setup work. It gets it's own folder as well
- poll.php --> The main script that does all the voting work
- 2x styles.css --> Two style scripts, one for the admin page and one for the poll
- readme.txt --> The readme file with the same contents as this page
- /images --> A folder containing 10 images which are used for the poll results
- admin.php
- In the admin page there are some variables you need to setup before this page works properly. Just open the file and start editing in the top
- $own_passprot = 1; If you enter a 1 the script will ask for the username and password you setup below before you can access the admin functions.
We advise you to use .htaccess to secure the admin folder. It's more secure than this script pretty simple own password protection
- $username The username you need to enter if you entered a 1 above
- $password The password you need to enter if you entered a 1 above
- $mysql_host The host name of your mysql database
- $mysql_user Your username for your database
- $mysql_pass Your password for your database
- $mysql_db The database name of your database
- poll.php
- In this file you need to enter your MySQL data again and the rest of the variables are there in case you want the poll to use
another language then the default, english.
- $vote The text on the vote button that a user will click when he chose a poll option
- $err_vote If the user hits the vote button without clicking on a poll option, this is the message the user will get
- $err_ip The message that will show up if the user's IP already voted on this poll and you enabled IP restriction on this poll
- $msg_save The message after a succesful vote
- $msg_view There is a link a user can click on to view the poll results. Above those results this text will be shown
- $linktext Text of the "view poll results" link
- $novotes If there are no votes this is the message that will appear in stead of the results
- $totalvotes "Total votes" This line is displayed below the poll results with the number of votes stored
- $votes Votes (displayed in the square brackets [ ] behind a result)
- $mysql_host The host name of your mysql database
- $mysql_user Your username for your database
- $mysql_pass Your password for your database
- $mysql_db The database name of your database
- styles.css
- As said above, there are two styles.css files. One in the admin folder, used for the admin page. And one in the main
folder, used for poll.php. You can edit these two files to suit your websites' layout
- readme.txt
- This file contains the same as this page
Using LI-Easypoll on your website:
- Upload everything to a folder on your server
- Go to admin.php in the /admin folder and enter your username and password you setup
- Only the first time you need to click the last link: "Setup database for LI-Easypoll use"
- Click the button and if you entered the right MySQL data the script will create a main table in the database and will return
with a message that the table was succesfully created
- Go back to the main admin page (there will be a link as well) and click "Create a poll"
- Now you are in the page where you can setup a poll. Every option available will be obvious to you
- After you hit the "create poll" button, you get a php include command that you can place anywhere on a page in a table or wherever you want it
- If poll.php is somewhere else then the page where you put the include command, you need to change the path to poll.php in the
include command accordingly
Finally we would like to ask you that if you are using the script to leave us your website's URL so that we can include that
in our list of people that are using our script. This is so that other people can see examples of this script than just our demo.
Of course this not mandatory whatsoever so it's up to you.
Go back to the product page
|
|
|
|
|