Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Poll Extension for Vanilla 0.9.3
Latest Version
Poll Extension 0.1
Requires Vanilla 0.9.3 beta snapshot from Dec 28 or later.
To use, you need to install two tables:
You can go to http://bytetastic.com/vanilla/forum/ to see what it's like.
You can log in with username "User1" through "User7", and password "vanilla".
Original post
Poll Extension 0.1
Requires Vanilla 0.9.3 beta snapshot from Dec 28 or later.
To use, you need to install two tables:
CREATE TABLE `LUM_Poll` (
`PollID` int(8) NOT NULL auto_increment,
`DiscussionID` int(8) NOT NULL default '0',
`Title` varchar(255) NOT NULL default '',
`Options` text,
PRIMARY KEY (`PollID`)
) ENGINE=MyISAM;
CREATE TABLE `LUM_PollVote` (
`PollID` int(8) default NULL,
`UserID` int(10) default NULL,
`Vote` int(3) NOT NULL
) ENGINE=MyISAM;
You can go to http://bytetastic.com/vanilla/forum/ to see what it's like.
You can log in with username "User1" through "User7", and password "vanilla".
Original post
I'm working on a Poll extension to Vanilla. I haven't gotten to the PHP part yet, but I'd like some feedback on the default style and javascript mechanism.
http://bytetastic.com/vanilla/poll/
I'm not sure how to place it in the discussion though. Suggestions?
I'm new to Vanilla development though, so I'd like to know.. would this be possible with an extension alone? What should I do to make it easy for the user to set up the tables required (an install script?)
I'd like to get some tips on where to start. I'm experienced with PHP, and I've already written two patches (for the Opera and Safari bug), so I could figure it out myself, but it would be nice to get some tips from those with more experience writing extensions to vanilla.
0
This discussion has been closed.
Comments
If so then you need to change the font to font-family: Trebuchet MS, Verdana, Tahoma, Arial; and i'd swap the green for yellow #FEF9E9 with a border of #FFEDAE.
I've managed to load the data from the database, instead of being just hardcoded. The extension needs two new tables:
Poll:
`PollID` int(8) NOT NULL auto_increment, `DiscussionID` int(8) NOT NULL default '0', `Title` varchar(255) NOT NULL default '', `Options` text
PollVote:
`PollID` int(8) default NULL, `UserID` int(10) default NULL, `Vote` int(3) NOT NULL
Where "Options" is a serialized array, with the title of the options (for example serialize(array("The Simpsons", "South Park")); ).
Major tasks left is:
- Voting through AJAX
- Creating a poll in the Discussion form