Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Poll - Vote Only Once
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Poll - Vote Only Once

 Post Reply Post Reply Page  <123
Author
Etnematreus View Drop Down
Newbie
Newbie


Joined: 19 May 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Etnematreus Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2003 at 4:40pm
Originally posted by exile2003 exile2003 wrote:

OK...figure borg is too busy to worry about this, so I tried to make a couple of modifications.  Tested with latest version 7.01 using Access 2000, but should work on 2002 and SQL as well.  Requires some knowledge of Access databases.

Objective: When the vote-once option is checked, this will be "strictly" enforced, not through the use of cookies (which the forums currently used), but through the use of server-stored voters' IDs.  As borg indicates in another post, this may slow down your forum if there are many (in the thousands) voters.  However, this will ensure that each registered user only votes once.  Of course, some one could sign up as multiple users, but the email restrictions could prevent that.  It's highly recommended that you backup your forum and database before attempting this.

1.  Open the forum database in Access, then open the tblPoll table

2.  Add a memo field called "Vote_IDs".  Set Required to No and Allow Zero Length to Yes.

3. Replace the "poll_cast_vote.asp" in the forum directory and "poll_display_inc.asp" in the includes directory with the files below:

http://www.allersoft.com/wwf/poll_mod_701.zip

Then, you're all set.

Note that if your poll is open to "unregistered user", i.e., guests, cookies will be used to enforce single-vote, since all guests have the same ID, 2.

Should also add that for existing polls, the restriction will be applied to new voters only, i.e., if you make these changes, those who already voted CAN vote again, however, new voters will be able to vote only once.

MOD NOT WORK FOR ME I GET ERROR!!!!!!!!!!!

Back to Top
Supremo View Drop Down
Groupie
Groupie


Joined: 08 August 2002
Location: Portugal
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote Supremo Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2003 at 12:01pm

Hum.... i really need this to work as it should, also...

I mean, if the Poll choice says "Vote only once" it should work like that, independantly of cookies, or expiration times.

and the mod about the expiration date on the polls doesn't solve the problem, it only takes care of the database size increasement, but doesn't actually solve the problem... which is MULTI-VOTING..

I'm thinking about bringing this to the suggestions forum, and hope -borg- implements it... after all, it doesn't work as supposed.

Onix Webmaster
Onix (Online Gaming Community)
www.onix.ws
Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2003 at 7:07pm

Originally posted by Supremo Supremo wrote:

and the mod about the expiration date on the polls doesn't solve the problem, it only takes care of the database size increasement, but doesn't actually solve the problem... which is MULTI-VOTING..

well the only way to prevent multi-voting is by storing the users that have voted on a database and check that the user hasn't voted before allowing him/her to vote so the mod does resolve the multi-voting problem.........................

FeRnAN
Back to Top
Supremo View Drop Down
Groupie
Groupie


Joined: 08 August 2002
Location: Portugal
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote Supremo Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2003 at 8:28pm
Originally posted by fernan82 fernan82 wrote:

Originally posted by Supremo Supremo wrote:

and the mod about the expiration date on the polls doesn't solve the problem, it only takes care of the database size increasement, but doesn't actually solve the problem... which is MULTI-VOTING..

well the only way to prevent multi-voting is by storing the users that have voted on a database and check that the user hasn't voted before allowing him/her to vote so the mod does resolve the multi-voting problem.........................

Sorry if i misunderstood... let me see if i got it straight.

The user who makes the poll, sets an expiration date on it, then, every voter can vote there once, and won't be able to do it again until the expiration date timeouts, and when that happens, the users won't be able to vote anyway, cause the poll gets deleted... is that it ?

Sorry for the trouble.

Onix Webmaster
Onix (Online Gaming Community)
www.onix.ws
Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2003 at 9:06pm
Originally posted by Supremo Supremo wrote:

Originally posted by fernan82 fernan82 wrote:

Originally posted by Supremo Supremo wrote:

and the mod about the expiration date on the polls doesn't solve the problem, it only takes care of the database size increasement, but doesn't actually solve the problem... which is MULTI-VOTING..

well the only way to prevent multi-voting is by storing the users that have voted on a database and check that the user hasn't voted before allowing him/her to vote so the mod does resolve the multi-voting problem.........................

Sorry if i misunderstood... let me see if i got it straight.

The user who makes the poll, sets an expiration date on it, then, every voter can vote there once, and won't be able to do it again until the expiration date timeouts, and when that happens, the users won't be able to vote anyway, cause the poll gets deleted... is that it ?

Sorry for the trouble.

Kind of like that but the poll doesn't get deleted once it expires, just the votes are deleted off the db and nobody else can vote after the poll has expired, but the poll stays there, just nobody can vote on it after it has expired...

Also changing the options on the expiration date is as simple as changing the HTML on the form...

The only difference the users will notice is that they won't be able to vote on polls once it has expired, instead they'll get a message saying that the poll has expired...

maybe i should also add a text string on poll_display_inc.asp so it shows the expiration date on the poll...



Edited by fernan82
FeRnAN
Back to Top
Supremo View Drop Down
Groupie
Groupie


Joined: 08 August 2002
Location: Portugal
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote Supremo Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2003 at 9:26pm

Thx a lot fernan82, i think this MOD solves my problem yes... i'm gonna set it up this week, along with some toehr stuff.

again, thx

Onix Webmaster
Onix (Online Gaming Community)
www.onix.ws
Back to Top
exile2003 View Drop Down
Newbie
Newbie
Avatar

Joined: 20 April 2003
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote exile2003 Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2003 at 7:59pm

Thanks for the mod, fernan82.

Everything works great, however, one potential problem, if the polls are left on "auto-pilot" with automatic deletion of expired votes is that if the poll never get accessed on or beyond its expiration date, the associated votes will never be deleted.  Otherwise, great code!

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2003 at 8:16pm
Originally posted by exile2003 exile2003 wrote:

Thanks for the mod, fernan82.

Everything works great, however, one potential problem, if the polls are left on "auto-pilot" with automatic deletion of expired votes is that if the poll never get accessed on or beyond its expiration date, the associated votes will never be deleted.  Otherwise, great code!

I guess i can make a script to delete the votes of all expired polls and add it to the admin section when i get time, that would be a possible solution to that problem...

FeRnAN
Back to Top
 Post Reply Post Reply Page  <123

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.