Poll Product

     This is a version of Amos Latteier's Poll product. It has been modified
     to handle multiple questions, and also draws piechart gifs to summarise the poll results.
     To do this it uses Frederick Lundh's Python Imaging Library (PIL) package.

Changes

	version 0.7.1 (Gabor Melis - mega@hotpop.com)

	o it doesn't use HTTP_REFERER anymore, instead:

	  when clicking OK on a Message Dialog you are transfered to a sensible place (like 'results' after voting)

	  This was necessary, because UserDb messed up the HTTP_REFERER.

	version 0.7.0 (Gabor Melis - mega@hotpop.com)

	o Full path of legend.dtml was in each instance making a Zope upgrade
	  break them

	o Poll now checks if all questions are answered

	o There is a new management tab: Voters

	  It lists all voters. One can remove all voters.

	o New style __init__.py, no add list corruption (Poll only shows up
	  if the user has right to add it)

	o New icons

	o Moved unused files to folder 'old'

	o Preliminary support for more graph types

	o This release breaks compatibility with old versions

	version 0.6.5 (Itamar Shtull-Trauring - itamar@attable.com)
    
	o The pie GIF now includes the correct HTTP header.

	o When a question wasn't voted for the colors in the graph were wrong.

	o Added background color (white).

	o Added workaround so that the poll results aren't loaded from the 
	  browser's cache (in results.dtml).
    
	version 0.6.4 (Gabor Melis - mega@hotpop.com)

	o Voters are stored persistently. Voters list was lost between
	  restarts for example.

	version 0.6.3 (Gabor Melis - mega@hotpop.com)

	o Checking for votes moved to poll level,
	  Now each poll has a list of users who have already voted.

	version 0.6.2 (Gabor Melis - mega@hotpop.com)

	o Fixed 0.6.1 ;-)
	  It seems everything except Cut/Paste was broken by 0.6.1
	  All meta_type references are updated now.

	version 0.6.1 (Gabor Melis - mega@hotpop.com)

	o Fixed meta_types (Cut/Paste now works for Polls)

	version 0.6.0 (Gabor Melis - mega@hotpop.com)

	o This version is INCOMPATIBLE with 0.5.0,
	  upgarding will break your old polls.

	o PIL is now optional, detected automatically if present

	o Polls can be open and closed

	o Polls can be non-anonymous from now

	o For a non-anonymous poll nobody can vote more than once.
	  This requires the 'Vote' permission not to be available for
	  anonymous users. It is a solution for a small number of
	  possible voters as a list of voters is maintained for each
	  poll.

	o Permissions are renamed to '... Poll'
	  and 'Vote' permission is added.

	version 0.5.0 (Andy Smith - andy.smith@iname.com)

Implementation

	The new poll implements three classes. 

	o   A 'poll' class, which is a container class used
	to store the poll's questions and resuts.
	
	o   A 'question' class. This class holds each question, as well as its responses

	o   A 'response' class. Each possible answer to a question is stored as a response object.
	    It stores the test of the response, as well as the number of votes cast.

	Each of these classes has its own management screen which link to each other.

Installation

	(PIL is now optional but the rest still stands)

	This package requires PIL to be compiled and installed such that PIL can be imported by the
	Poll product. So far it has been run on both linux and win32 installations of PIL.

	PIL must existi somewhere in Zope's import path. A good	place to do this
	would be in the systems 'site-packages' directory.

	PIL is availabe at http://www.pythonware.com

	Because of a naming confict between Zope and PIL (ImageFile and others), it is 
	necessary to 'packagize' PIL. There is an __init__.py file included with this product 
	which should be placed in the PIL directory. This allows PIL to be imported as 
	a package and therefore allows modules to be uniquely qualified (using PIL.ImageFile etc.)

	To install PIL on a Redhat 5.2 system the following steps were done -

	o  Create a PIL.pth file in /usr/lib/pythonx.x/site-packages containing the string 'PIL'

	o  Copy the PIL files to /usr/lib/pythonx.x/site-packages/PIL

	o  Copy the _imaging.so file to /usr/lib/pythonx.x/site-packages/PIL

	o  Copy the __init__.py file included with this package to /usr/lib/pythonx.x/site-packages/PIL

	Installation on other platforms/linux distributions will be the same but different ;)

	David Ascher has made available precompiled PIL binaries for win32 at http://starship.skyport.net/~da/PIL

Creating a Poll.

	 To add a poll, select 'Poll Item' from the add menu of a folder.

	 Once the poll has been created, the possible questions and their responses can be
	 entered using the management interface. To add a question, type the question into
	 the 'question' text field, as well as the possible answers, one per line, in the 'Poll
	 Answers' text field.

Adding And Deleting Questions

	 Once a question has been created, it will appear in the management interface for the poll.
	 Multiple questions can be added by following the previous step again and again (and again and again)
	 If a wrong question is entered, the management interface for the poll allows questions to be deleted in
	 much the same manner as an object in a Zope folder can be deleted - select the check box 
	 next to the question(s) to be deleted, and hit the 'Delete' button.

Editing Questions

	To edit a question, click on it's link (the text of the question). The management interface for
	that question will be displayed. In this interface, the text of the question can be changed, responses
	can be added or deleted, and the votes cast for each response can be changed, cleared etc. 

	While this interface allows the results of polls to be rigged, the author does not condone the use
	of this practise ;)

Displaying a Poll

	You can use a poll either by accessing it directly, or
	by embedding it in a Document with DTML.
	
Future Enhancements

	o   Nicer way of accessing PIL without adding a special __init__.py file?

	o   There's a problem with GIF refreshes... sometimes although there have been
	    new votes cast, browsers can tend to cache the gif and not realise that the
	    same IMG REF will return a different gif, even tho the URL is the same.

Questions

	Getting Zope and PIL to play with each other is simple but there are a few gotchas. 
	If you get stuck mail me and I'll try to help.

	Andy Smith - andy.smith@iname.com
