Version: 1.6, by TomasDR
Developer Last Online: Oct 2019
Category: Miscellaneous Hacks -
Version: 3.7.x
Rating:
Released: 12-09-2008
Last Update: 12-09-2008
Installs: 50
DB Changes Uses Plugins Template Edits
Translations
No support by the author.
Poll Write-In Vote Hack
This is only for 3.7.x, you can find my 3.6.x version here.
About this hack:
I developed this hack for my board after several polls were made by members that were short on options, especially since the poll creators are sometimes biased with the poll options. I am sure you have seen the same on your boards.
This hack allows the poll creator to allow "Write-In Votes" to a poll (single or multiple). I also added the feature to change your vote if the poll is a "write-in vote" poll, you can also allow vote changes on all polls through an admin option (ver 1.2+). This will allow a user to change their vote if they discover a better poll option written in by another user, or if they want to add one or more write-in votes to a multiple choice poll.
An admin/moderator/etc. who has permission to edit a poll can change a poll to make it a write-in poll or not. (ver 1.3+)
The cancel/change vote feature works with single and multiple choice polls.
This is my first hack but please don't let that scare you away, this is a very basic hack.
Permission Overview:
There are very few permission checks with my hack;
If you can create a poll, you can make it a write-in vote poll.
If you can vote on the poll, you can add a write-in vote to a write-in poll.
If the poll is closed you cannot change your vote or add a write-in vote of course.
You cannot add a write-in vote to a non write-in vote poll.
If you can Edit a Poll you can remove a write-in choice.
Permission Settings:
Located in vBulletin Options "Poll and Thread Rating Options" section.
Allow users to change their votes in ANY poll. (Default NO)
Show the username after a write-in vote. (Default Yes) * If NO a log entry is written to the moderator log as per a request, see pic below
Since version 3.6.8 vBulletin has had the ability to filter by product in the moderator log so you can filter the write-in votes if you chose not to have the username displayed.
My crack team of quality assurance testers discovered almost immediately that the write-in poll options are not governed by the max size for poll options that you set in the admin panel vbulletin options.
They did this by posting the entire chapter of Genesis into an option. It truncated at Chapter 20, which is just a tad longer than the 150 characters specified in the admin panel.
I've modified the write-in vote template to substring $optionvalue to the desired length. Does anyone know what variable name the specified max poll options characters is stored in? Ideally, I'd like to use that variable rather than hard-coding or creating a new variable that I have to maintain.