Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Poll Write-In & Change Vote Hack Details »
Poll Write-In & Change Vote Hack
Mod Version: 1.5, by TomasDR (Member) TomasDR is offline
Developer Last Online: Oct 2019 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.8 Rating: (13 votes - 4.69 average) Installs: 94
Released: 24 Mar 2007 Last Update: 15 Dec 2007 Downloads: 310
Supported DB Changes Uses Plugins Template Edits  

Poll Write-In Vote Hack

This is only for 3.6.x, you can find my 3.7.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.
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
Install Info:
  • Files edited: 0
  • Templates edited: 3
  • Files to install: 1
  • Time to install: 5 minutes max
Install Procedure:
1. Install the Product (Download the XML file)
2. Edit Template polloptions_table
FIND

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

ADD ABOVE

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

3. Edit Template pollresults_table
FIND

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE WITH

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

4. Edit Template editpoll
FIND

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE WITH

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

5. Enjoy!
Version Info:


Version 1.0:
  • Initial release of the hack
Version 1.1:
  • Added a requested feature (please see screenshot) so now the username is recorded after a write-in vote.
  • Added an error/permission check for max poll options that is set in vBulletin options by the admin so a write-in poll cannot exceed that number.
  • Added two new error messages reflecting the max poll option error & a specialized error message for entering a blank write-in vote.
Version 1.2:
  • Added the feature (suggested by bchertov) to be able to allow your users to change their vote in all polls. This is now a vBulletin Option located in the Setting Group Poll and Thread Rating Options the option is Allow Users to Change Their Votes in ALL Polls as a Yes/No, if set for 'No' they will still be able to change their vote in Write-in polls as before. NOTE: The template edit has changed for the template pollresults_table with this version!
  • Fixed the bug reported by A_V concerning poll max options being set for zero/unlimited.
  • Added the Write-in permission check along with the vB option for allowing users to change votes in the plugin Change write-in poll vote.
Version 1.3:
  • Added the requested feature to allow changing the Write-In option when Editing Polls. Note: There is an additional template (editpoll) to edit with this new version.
Version 1.4:
  • Added the ability to turn off the username added after a write-in vote.
  • Added logging to the moderator log if the username addition is turned off per a request.
Version 1.5:
  • Found a bug if you allow the "Unregistered / Not Logged In" group to vote in polls. If they change their vote they will change all guest's votes. You only need to upgrade if you allow Unregistered users the ability to vote in polls.
Version 3.6.8:
vBulletin 3.6.8 has the ability to filter by product in the moderator log. This is the only difference between the xml files.

Please post your comments or suggestions for this hack. I will read ALL posts.

PLEASE CLICK INSTALL!
(You will get an email when a new version is released.)


Pictures:
  1. Showing the "Write-In" checkbox under Miscellaneous Options when creating a poll.
  2. Showing the poll with the link to add a write-in vote.
  3. Showing the screen to add a write-in vote.
  4. Showing the new poll with the new write-in vote and the link to Change your vote.
  5. Showing the new feature (ver 1.1) where the username is placed after the write-in vote.
  6. Showing the moderator log entry.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	chkbox.jpg
Views:	903
Size:	13.5 KB
ID:	62232   Click image for larger version

Name:	poll.jpg
Views:	853
Size:	16.3 KB
ID:	62233   Click image for larger version

Name:	addwritein.jpg
Views:	790
Size:	17.7 KB
ID:	62234   Click image for larger version

Name:	change.jpg
Views:	876
Size:	15.5 KB
ID:	62235  

Click image for larger version

Name:	uname.jpg
Views:	747
Size:	21.1 KB
ID:	62274   Click image for larger version

Name:	modlog.jpg
Views:	266
Size:	19.1 KB
ID:	72655  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 24 Mar 2007, 00:54
TomasDR TomasDR is offline
 
Join Date: Feb 2006
Post reserved.
Reply With Quote
  #3  
Old 24 Mar 2007, 01:00
bacanze bacanze is offline
 
Join Date: Mar 2007
A useful plugin, thanks
Reply With Quote
  #4  
Old 24 Mar 2007, 02:27
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Looks AWESOME! One suggestion. How about a small (vote added by [username]) or something after or under the added vote option. That way people know what the original options were and who added the extra options.
Reply With Quote
  #5  
Old 24 Mar 2007, 02:54
bitdefuser bitdefuser is offline
 
Join Date: Mar 2007
Location: C:\WINDOWS
This is risky if your going to have a very important poll, such as voting for a new moderator. No install for me, just warning you folks out there.
Reply With Quote
  #6  
Old 24 Mar 2007, 03:24
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Its an option, just like allowing multiple votes is
Reply With Quote
  #7  
Old 24 Mar 2007, 11:29
bashy bashy is offline
 
Join Date: Nov 2005
Wow, excellent m8 well done
Is there a away to set it so the option is checked by default?
__________________
Bashy

Bashys Place ~ Bashys Hosting
Reply With Quote
  #8  
Old 24 Mar 2007, 11:33
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
I'm sure my members could find this a useful addition .. thanks TomasDR
Clicked install
Reply With Quote
  #9  
Old 24 Mar 2007, 11:52
MaestroX MaestroX is offline
 
Join Date: Aug 2006
Real name: Chris A.
Nice one, thanks for sharing
Reply With Quote
  #10  
Old 25 Mar 2007, 00:24
TomasDR TomasDR is offline
 
Join Date: Feb 2006
Originally Posted by bitdefuser View Post
This is risky if your going to have a very important poll, such as voting for a new moderator. No install for me, just warning you folks out there.
As the other person mentioned, Write-In votes is an option, just like Public and/or Multiple voting is an option. Also there is a permission check in the plugin so someone cannot add a Write-in vote to a non write-in poll even if they knew the do=addwritein URL.

I agree with you hence why I added the permission check.
Reply With Quote
  #11  
Old 25 Mar 2007, 00:26
ezurick ezurick is offline
 
Join Date: Mar 2007
I couldn't find the two (2) poll templates to edit....
Reply With Quote
  #12  
Old 25 Mar 2007, 00:31
TomasDR TomasDR is offline
 
Join Date: Feb 2006
Originally Posted by ezurick View Post
I couldn't find the two (2) poll templates to edit....
They are both under the "category" Poll Templates << in your style manager.
Reply With Quote
  #13  
Old 25 Mar 2007, 00:44
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
What about my suggestion on seeing who added the option. I think it could get out of hand with people adding random crap if they were anonymous. Is is possible? Thanks for the mod, I love it.
Reply With Quote
  #14  
Old 25 Mar 2007, 01:00
TomasDR TomasDR is offline
 
Join Date: Feb 2006
Originally Posted by 4x4 Mecca View Post
What about my suggestion on seeing who added the option. I think it could get out of hand with people adding random crap if they were anonymous. Is is possible? Thanks for the mod, I love it.
Currently there is only one SQL change in the hack, to add the field "writein" to the poll table and I wanted to keep it simple.

Let me look into adding something like this, if this would work for you:
  • Coca-Cola
  • Pepsi
  • Mountain Dew (TomasDR)
Reply With Quote
  #15  
Old 25 Mar 2007, 01:45
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
That's exactly what I'm looking for. Thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:19.

Layout Options | Width: Wide Color: