Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Poll Plugin

(Page 1 of 5)
> >
Quote Reply
Poll Plugin
I am working on a Poll Plugin for the forum and would like to hear some feedback from you.


Features:

  • Poll with variable number of answers.

  • Flexible rules for posting polls (e.g. Admin, Moderators, registered users, anybody, selected usergroups)

  • Flexible rules for voting (e.g. registered users, selected user groups, anybody).

  • Track votes according to IP (so you can only vote once).

  • Possibility to put the poll on any other page (through SSI)

  • etc.


You can find a (preliminary) implementation at: http://www.iyengar-yoga.com/.../gforum.cgi?forum=1;. The design is very simple at this moment, and obviously need some improvements.

Feel free to vote (remember, once only, so think before you vote!), and post your comments (here or there), Guest replying is turned on. You cannot post polls at the moment (only the Admin can).

Also, if you have a good idea about a poll, tell me and I will put it on!

Ivan
-----
Iyengar Yoga Resources / GT Plugins

Last edited by:

yogi: Feb 28, 2002, 5:10 AM
Quote Reply
Re: [yogi] Poll Plugin In reply to
Hehe, ya beat me to it.
Quote Reply
Re: [yogi] Poll Plugin In reply to
Why track by IP? Surely by username would be much easier. Only registered users allowed to vote, and once the username has casted a vote that's done.

Hm, I often wonder about all these plugins. Aren't Gossamer Threads planning something like this? What are the current to-do list of GTForum. I think it would be a good idea for GT to post is publicaly, so that people don't waste their time creating plugins that might be replaced.

- wil
Quote Reply
Re: [yogi] Poll Plugin In reply to
When I vote I get:

You have already voted in this poll!

Last edited by:

RedRum: Feb 28, 2002, 5:25 AM
Quote Reply
Re: [Wil] Poll Plugin In reply to
In Reply To:
Why track by IP? Surely by username would be much easier. Only registered users allowed to vote, and once the username has casted a vote that's done.

I want to track IP's because this is the only way to prevent duplicate votes in the case that you allow guest to vote too. But you are right, I could also track votes for users if only registered users can vote.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [RedRum] Poll Plugin In reply to
Paul

I get that too. Your vote is registered, though. The program just needs to be tweaked to show that message, only after trying to re-access the poll.

- wil
Quote Reply
Re: [RedRum] Poll Plugin In reply to
In Reply To:
When I vote I get:

You have already voted in this poll!

This was a bug. Should be fixed now.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
I keep getting "cannot find server" errors :(
Quote Reply
Re: [RedRum] Poll Plugin In reply to
Sorry for that, but we seem to have some network problems here at university....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Try not to track by ip because those of us who have to go through a proxy server to access the Internet may not be able to vote since you willl likely see the ip of the proxy server instead of my real ip.
Quote Reply
Re: [dauhee] Poll Plugin In reply to
But then that forces member only polls.
Quote Reply
Re: [dauhee] Poll Plugin In reply to
Yeah, go for the username and only allow voting for registered users.

- wil
Quote Reply
Re: [yogi] Poll Plugin In reply to
Sorry, but the server was down for a while. Polls are open again!

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [Wil] Poll Plugin In reply to
Why not drop a cookie with a 24-hour expiration period? That way, you could keep people from voting twice (well, people who aren't obsessed enough to delete their cookies) while avoiding the problems with proxy servers (like everybody on AOL).
Quote Reply
Re: [yogi] Poll Plugin In reply to
Overall a nice plugin. Now all it needs is some nice colors instead of a big white space :)

Last edited by:

RedRum: Mar 1, 2002, 7:02 AM
Quote Reply
Re: [RedRum] Poll Plugin In reply to
Thanks.

I will work on the colours later, but that is definitely a good point.

I am still thinking of how to prevent multiple votes. IP, cookies? How do other poll scripts do it?

BTW, threaded view now works also.

Ivan
-----
Iyengar Yoga Resources / GT Plugins

Last edited by:

yogi: Mar 1, 2002, 7:05 AM
Quote Reply
Re: [yogi] Poll Plugin In reply to
With cookies there is always the risk of people deleting them. Using IP's causes problems with proxy servers. Using usernames won't allow guest posting.

Hmm lots of things to consider :)

You could always allow guest posts using the guest id. Not fool proof though.
Quote Reply
Re: [yogi] Poll Plugin In reply to
I love the whitespace!! Nice and clean. Please keep it that way!

I still say go for the usernames and only allow registered users to vote.

Good luck.

- wil
Quote Reply
Re: [RedRum] Poll Plugin In reply to
In Reply To:
You could always allow guest posts using the guest id. Not fool proof, though.

Thanks for the suggestion.

I don't think that's a good idea. You could just write a script that does gforum.cgi?do=poll_vote;guest=$i, and then let $i run from zero to infinity.....

There will be an option to only allow registered users to vote (as Wil wants to have it). In that case the tracking is easy.

But I think the plugin should also allow you to have votes from guest users. What I have in mind is that you are able to put the poll on the homepage of your website and let anybody vote. I think if you just want to vote, you shouldn't be forced to register. Voting is not so "serious" as posting!

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Yes you can't just ignore guests.

Last edited by:

RedRum: Mar 1, 2002, 7:33 AM
Quote Reply
Re: [yogi] Poll Plugin In reply to
I really like BigNoseBird's polling script (and not just because of the name Smile). It lets you use either IP numbers or cookies or both. It's not perfect, though - we recently ran some polls that, on some days, were getting a couple thousand responses an hour. The script invariably crashed, maybe when two votes came in simultaneously, and wiped out the basic config/results file (fortunately, the script also logs all the votes, so using that we were able to re-create the vote tallies up to the crash time).
Quote Reply
Re: [yogi] Poll Plugin In reply to
In Reply To:
I don't think that's a good idea. You could just write a script that does gforum.cgi?do=poll_vote;guest=$i, and then let $i run from zero to infinity.....


... Or just leave it off altogether and let GForum increment the guest ID from 0 to infinity ;-)

Consider a combination of IP and username - for a logged in user, let them vote unless that user has already voted. If it is a guest voting, track their IP and only let the IP vote once.

Going by just IP isn't a good idea - that would mean all Gossamer Threads employees only get to vote once! What happened to sending all your employees to skew the results of a poll? Wink hehehe

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Poll Plugin In reply to
In Reply To:
Consider a combination of IP and username - for a logged in user, let them vote unless that user has already voted. If it is a guest voting, track their IP and only let the IP vote once.

Going by just IP isn't a good idea - that would mean all Gossamer Threads employees only get to vote once! What happened to sending all your employees to skew the results of a poll? Wink hehehe

Yes, that's what I thought I would do. If the user is logged in, it definitely makes sense to track by username.

Should I also include cookies as an option (for guests)? I.e. track according to cookie and/or ip (maybe even forbid voting for a certain amount of time)?

Should the default permissions be rather relaxed or very restricted?

As for permissions for writing polls and for voting, they will be related to the value of $USER->{user_forum_permission} (or of $GUEST->... for guests). This means that you can choose which minimum permission (in a specific forum) a user/guest has to have to make an new poll/vote.

E.g. you can set the permissions in such a way that only moderators of a forum can write new polls, and only users who can post a new thread can vote. Or you could set them in such a way that everybody who can post can also make a new poll, and everybody who is allowed to view the posts can vote. I think it should be flexible enough in this way.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
It would be fabulous if you could set this based on user group too.


Realiiity.com Forums
Quote Reply
Re: [ellipsiiis] Poll Plugin In reply to
That might be possible. Let me think about it for a while to see if it makes sense and if it is worth the effort. I have an idea and will do some testing tomorrow morning (Europen time). You could certainly have a list of groups allowed to write polls in any forum (to make it forum specific would be a bit more involved). And a list of groups allowed to vote in any forum.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
> >