The Poll extension for the Yii framework allows you to create custom polls for both anonymous and authenticated users to vote on.
Features include:
This has been tested with 1.1.8, but should work with any version.
You must also:
*An example of this type of setup is explained here: Building a Blog System using Yii
The next step is to install the database schema located in '/data/poll.sql', modifying the table prefixes as needed, as well as the foreign key constraint referencing the user's ID.
return array( ... 'import' => array( 'application.modules.poll.models.*', 'application.modules.poll.components.*', ), 'modules' => array( 'poll' => array( // Force users to vote before seeing results 'forceVote' => TRUE, // Restrict anonymous votes by IP address, // otherwise it's tied only to user_id 'ipRestrict' => TRUE, // Allow guests to cancel their votes // if ipRestrict is enabled 'allowGuestCancel' => FALSE, ), ), );
The Poll extension has the basic Gii-created CRUD functionality, as well as a portlet to load elsewhere.
To load the latest poll:
$this->widget('EPoll');
To load a specific poll:
$this->widget('EPoll', array('poll_id' => 1));
February 9, 2012
October 18, 2011
October 17, 2011
Total 5 comments
Good work. But What have you tried to say by:
Please help. I am in problem.
No man, WE WANT THIS NOW :)
That is a good call on the configuration, I'll update the code and also put up a demo on my server when I get a minute.
Hi... if you could add some picture of the poll...
Or create demo at some free hosting...
Looks nice but why would you put configuration in the app params and not directly in the module configuration?
Leave a comment
Please login to leave your comment.