Topic: Another Poll Mod Problem (Non-User Voting)

@chacmool: Don't know anymore if I have your latest mod or not (updated, fixed, tweaked to much on my site to remember ;-) but I have a problem with voting from non-registered (anonymous) users.

In fact it works and shows the poll radio buttons for anonymous visitors as long as nobody has voted. As soon as the first anonymous voted the vote is added into the DB like this:

voters: ,605,2,,

In fact it means user "605", "2" and " " voted while " " is a not logged in user. However, this denies other not logged in users to add their vote too because " " has already voted... You know what I mean?
In fact only the first anonymous user can vote, everybody else later get the result only.

Not sure if you have it fixed with 1.1 and which code I need to change then.
If you want to check out an example, see here:

Cheers ~ Arne

Re: Another Poll Mod Problem (Non-User Voting)

I'll move this to the mod forum.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3 (edited by chacmool 2003-10-25 15:55)

Re: Another Poll Mod Problem (Non-User Voting)

Hmm, I know what you mean... and I'm gonna look at it right away. Not sure if I've tried that scenario myself hmm

Edit: Yup! You're right. I'ts a bug. I'll fix it right away.

4 (edited by chacmool 2003-10-25 16:07)

Re: Another Poll Mod Problem (Non-User Voting)

Done! Fixed it!

FIND (in viewtopic.php, line ~124):
// Already votet -> Show the results
if(strpos($voters, ','.$cur_user['id'].',') !== false)
    $showresult = true;

// Already votet -> Show the results
if(strpos($voters, ','.$cur_user['id'].',') !== false || !$cur_user['id'])
    $showresult = true;

This should make it work. It'll be in the next release, have another issue to look at before I release it though.


Re: Another Poll Mod Problem (Non-User Voting)

Thanks chacmool, will give it a try now and let you know how it works.
Sorry Kennel for using the wrong forum.

Just an additional thought to chacmool: Have you thought about using cookies to prevent anonymous user to vote more then once for the same pool? IP tracking isn't working because of the dynamic IPs for modem and DSL access and member tracking only doesn't work as we have seen with the problem I've reported so the only/best way to get it working are cookies.
Maybe you could use the punBB cookies from Kennel here anyway?

Anyway - thanks for the fast fix! Will let you know if/how it is working for me.

Cheers ~ Arne

Re: Another Poll Mod Problem (Non-User Voting)

No problem, its only fun when people use something that I've made smile

Well, its too easy to just remove the cookie and vote again... Is it really necessary to let anonymous users vote in the poll?

7 (edited by Arne 2003-10-25 16:30)

Re: Another Poll Mod Problem (Non-User Voting)

Hej, it's me again! smile
Tested it and it "works" now since anonymous users can't vote anymore but get the result. sad
Unfortunately - to answer your question - I think it's important that anonymous user can vote also. Don't know how it works in other communities but most of the postings on my site comes from regular visitors but for any reason they don't want to create an account - which is okay for me.
I don't think that to many users will remove cookies at all. If it happens it's bad luck but even better then not being able to vote...

[EDIT]Maybe it would be a nice option too for permissions to allow anonymous votes or not. Best of all would be to select this option if you create a poll.

Anyway - will modify the output template to notice the users that you have to be a registered user to vote which might be not clear for the visitors of the poll.[/EDIT]

Cheers ~ Arne

Re: Another Poll Mod Problem (Non-User Voting)

Hmm, true... I might add it when I have time. Some bugs left to look at first though.

Re: Another Poll Mod Problem (Non-User Voting)

I'll say this, I remove cookies from my computer daily.

Through the awful grace of God

"Dude, CSS and XHTML are like two boys who are deeply in love.  They're perfect for each other, but no one can acccept it."