nabopoll - Documentation

nabocorp - nabopoll




Start by downloading nabopoll, and unzip the files in a directory keeping the directory structure. Upload all the files to your webserver. If you are performing an upgrade, it is recommended to delete all the files on your webserver and of course make a backup of your database.

I can only recommend you to protect the admin directory with a .htaccess file...

Once everything is uploaded go to http://.../nabopoll/admin/install.php. You should see a screen asking you the parameters to access your database. If one of these parameters is defined by an environment variable, click the associated checkbox. nabopoll will do a getenv on the variable to get the real value (for instance, my ISP requires me to connect to the server defined by the environment variable MYSQL_HOST).

Fill all the fields and click on the Next button. If you are upgrading you are then asked whether you want to upgrade your version or do a clean install. If you never installed nabopoll before then clean install should be the only option available. Make sure to have a backup of your database in all cases before proceeding.

Select the appropriate option. The installation procedure should now make all the necessary modifications in your database to have nabopoll setup. Everything should run fine (I hope...) and you can now start using nabopoll!

Your first survey

Now go to http://.../nabopoll/admin/index.php and now you can create a new survey, add questions and answers and of course edit approximately anything. Here is the meaning of the icons you'll see in the admin interface (I'll use the term "item" to generically designate a survey, a question or an answer - the current item is the item that is on the line where you clicked the icon):

add an item in the database. before clicking edit the new item on the left of this icon
validate the changes you have made to the current item
delete an item. no confirmation asked!!
insert an empty item before the current one
move the current item up in the current list
move the current item down in the current list
go one level below: in survey view, this allows you to edit the questions of the current survey ; in question view this lets you edit the answers to the current question
this lets you reset the results of the current survey
this lets you see the results of the current survey
this lets you see the history of answers made to the current survey

You have several options for a survey:

  • Single vote: Allows or disallows a same person to vote multiple times to the survey. Check can be done using cookies or based on the IP address.
  • Log: Enables the save of all the answers made to the survey. You'll be able to check exactly what each voter answered to each question.
  • Required: If this is checked, then a voter must answer to all the questions of the survey.
  • Closed: No more votes can be taken for that survey.

Once your survey is ready you can access it with the following URL: http://.../nabopoll/vote.php?surv=1 (of course you should replace 1 by the number of your survey).

For a quick poll to include in your homepage for instance, include the file quickpoll.php where you want in your page. See test/test.php for an example on how to include it and set the various variables (you might need to set the $path variable)...

If you want all the questions of your survey, use http://.../nabopoll/vote_1page.php?surv=1 instead.


You can customize the look of your surveys to match your design. nabopoll uses templates to achieve this. A template is a set of html files defining how nabopoll should display your surveys. Two templates are provided: classic and compact (used for quick polls). You can modify them or create new ones by creating a new subdirectory in the templates folder. Put all the .tpl files listed below (you can copy the ones from classic and modify them). Upload this new directory to your webserver and your template is automatically detected by nabopoll and ready to use! You can have as many as templates as you want.

Here is an explanation of how each file is used:

common header of all the pages. generally opens the HTML tags and sets the design.
common footer of all the pages. closes what header.tpl opened...
standard voting page displaying a question and its answers.
message after the user answered the last question of the survey.
to display the results of a survey.
error page.

In all these files you just have to use simple tags (like {QUESTION_TEXT}) to display data of your survey. Please check the files of the classic template to know which tags are available in each file and what they are used for. For vote.tpl and result.tpl, everything between <!-- ANSWER START --> and <!-- ANSWER END --> will be repeated for each answer to the question.

You can also customize the images used in your templates in the administration interface. The first image is the VOTE button displayed after each question. The three last images are used to display the bars. They generally are 1x1 images. You can make your own images if you want to use another color scheme than the one provided.

Do not hesitate to send me a mail once you have a survey online :-)

© 2003, nabocorp.