Gossamer Forum
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
Quote Reply
Re: [yogi] Poll Plugin In reply to
I have improved the plugin with a couple of things:

a) IP and/or cookie based verification for voting for guests (admin configurable).
b) user_id based verification for users who are logged in (admin configurable)
b) you can set permissions for writing polls/voting on per forum and per usergroup basis (e.g guest can vote in forum A, but not in forum B; registered users can write a poll in forum C, but only moderators in forum D; etc).

The testing forum now allows you to write polls as a registered user. Get your password (no email validation required) and try making your own poll. Guest votes are verified by a cookie that expires after 24 hours.

---> http://www.iyengar-yoga.com/pollforum/gforum.cgi

Comments are appreciated. Tell me if you run into problems or inconsistencies or anything weird.

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

Last edited by:

yogi: Mar 5, 2002, 6:44 AM
Quote Reply
Re: [yogi] Poll Plugin In reply to
You need to add the poll forms on the advanced editor post form :)

Also, on my poll thing, I forgot to mention, I also have users post with their vote to include their reasoning (the subject of the post is their vote), might be something to look into for yours.


Realiiity.com Forums

Last edited by:

ellipsiiis: Mar 5, 2002, 12:18 PM
Quote Reply
Re: [ellipsiiis] Poll Plugin In reply to
Advanced editor post form should work now. Could somebody test it, though? Thanks!

Users can post to the thread if they want to comment on their vote (like on slashdot).

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [ellipsiiis] Poll Plugin In reply to
I found some time to work on the plugin again. And I updated it on the test installation:

http://www.iyengar-yoga.com/pollforum/gforum.cgi

The permissions are set as follows (to show you how flexible the permission system is):
- forum 1: guests can post and write polls.
- forum 2: registered users can write/edit polls and guests can ony vote.

It should also work in the advanced editor now. And you can make multiple choice polls.

Votes are logged by username, and if you are not logged in by IP address.

There is also a small script which can be called through SSI (or in a PHP page).
Demo: http://www.iyengar-yoga.com/...poll.cgi?poll=latest

Comments/remarks are appreciated.

I only have to finish up a couple of things before I will release it. And I am still thinking of a good price....

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

Last edited by:

yogi: Mar 28, 2002, 3:21 AM
Quote Reply
Re: [yogi] Poll Plugin In reply to
Ahh.....colors are much cooler! .....fits in nicely now.

Looks very nice.
Quote Reply
Re: [yogi] Poll Plugin In reply to
Looks great, good work :)

Unfortunately it won't work for my site because we need to force people to reply with their vote on certain polls, but that's something that most sites wouldn't need anyway.


Realiiity.com Forums
Quote Reply
Re: [yogi] Poll Plugin In reply to
What about the use of images to vote on in place of text?

Is it possible to show only the percentage and not the total votes?

Can the percentage be taken out a couple decimal points?



Thanks!

Last edited by:

Teambldr: Mar 28, 2002, 7:20 PM
Quote Reply
Re: [Teambldr] Poll Plugin In reply to
In Reply To:
What about the use of images to vote on in place of text?

That's not currently supported. It would need some modifications to do that, but it's possible in principle without too much work.

In Reply To:
Is it possible to show only the percentage and not the total votes?

That can be done from in the templates.

In Reply To:
Can the percentage be taken out a couple decimal points?

Yes, I can make that an option (for the admin).

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [ellipsiiis] Poll Plugin In reply to
In Reply To:
Unfortunately it won't work for my site because we need to force people to reply with their vote on certain polls, but that's something that most sites wouldn't need anyway.

Yes, it's certainly not a common feature for polls that people have to reply with their vote. It makes the validation a lot simpler though, especially if you only allow registered users to reply. Are you allowing only one vote/reply per user? What about empty replies? Can anyone write a poll?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Thanks for the info.



It is a nice feature.
Quote Reply
Re: [yogi] Poll Plugin In reply to
I have poll permissions set by forum/group, so it's configurable who can post them. (In our case we have one forum where anyone can post polls, but in most our forums only mods or specifically designated people can) People can vote more than once, but only their first vote will register, and I took the reply button away if a post is a poll.


Realiiity.com Forums
Quote Reply
Re: [yogi] Poll Plugin In reply to
Just a quick note about the progress.

The plugin is basically finished. However, there is a small problem in it's interaction with the present version of GForum (version 1.1.3), but the problem will be fixed with version 1.1.4 of GForum.

I will release the plugin as soon as Gossamer Forum 1.1.4 is out. The price will probably be $20 for normal users. Non-profit sites can use it for free.

Feel free to post comments and/or feature requests in the meantime.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Good job, yogi! Looking forward to it's release.

Cheers

- wil
Quote Reply
Re: [Wil] Poll Plugin In reply to
I am happy to announce that the Poll plugin has been released. You can download it directly from your GForum administration area (Plugins -> Plugin Download -> List Plugins on GT).

Features (as a reminder):

  • Ability to hold custom polls on your forum

  • unlimited number of answers per poll

  • multiple choice polls

  • very flexible permission rules (voting, writing polls, editing polls can be set globally, but also on a per usergroup, per forum basis)

  • track votes through IP address, cookies and/or username

  • enable/disable polls

  • put polls on your homepage (SSI, PHP)

The plugin can be evaluated for free during three days. If you wish to use it after this period, you have to register it. Registration costs USD 20. Non profit organizations can register for free. For details on how to pay/register, see "Plugins -> Poll -> About" in your adminstration area.

Please post comments/bugs/feature request here.

Acknowledgments: I would like to thank everyone who commented on it, and I am particularly indebted to Alex, Jason and Paul for their valuable feedback.

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

On my Win2000 install, I get the following error when attempting install:

Error running installation code: GT::Template::Inheritance (2784): Wrong argument passed to this subroutine. Usage: Path templates/default does not exist or is not a directory at e:/heavybombers.com/heavybombers/forums/admin/GT/Config.pm line 293.

Regards,


Quote Reply
Re: [HeavyBombers] Poll Plugin In reply to
Ivan, you can probably fix this by making sure any paths are full paths, not relative. i.e. use $CFG->{admin_root_path} . '/templates/default' instead of just ./tempaltes/default.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [HeavyBombers] Poll Plugin In reply to
Sorry for the bug, try the new version, which I have just uploaded.

Could you then tell me, if it works please? Thanks.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Happy to oblige....and it installed w/ no problems. Now I'm going to play around with it. Congrats on a fine addition to the Gforum universe.
Quote Reply
Re: [yogi] Poll Plugin In reply to
Ivan,

Minor issue but one I found when I cranked up NS 6.2 to take a look at something. Notice the offset for your poll graphic bar in the NS window compared to its offset in the IE 6.1 window.

BTW: With this poll plugin under your belt, I bet you could fairly easily generate a forum note function too? Instead of having a poll placed at the top of a thread, you could have a moderator/administrator note placed at the top of a forum or category, but I digress. Cool

Last edited by:

HeavyBombers: Apr 27, 2002, 8:56 AM
Quote Reply
Re: [HeavyBombers] Poll Plugin In reply to
1. You can change the way the graphic is displayed in the template "include_poll_results.html". You could add a " " before the images to create additional space.

2. Yes, that would indeed be possible. Unfortunately, I don't have the time to write the code though.... maybe somebody else.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Hi Yogi

I think you've done a real nice job here, congrats!

- wil
Quote Reply
Re: [Wil] Poll Plugin In reply to
Hi Wil,

thanks a lot.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [HeavyBombers] Poll Plugin In reply to
I like the first reply to your poll there Scott. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Poll Plugin In reply to
My forehead gets sore from all the banging it does on my desktop Wink

My primary audience is 78-85 and then 40-60 yr olds....sometimes these high tech new fangled gadgets really throw them for a loop. But the number of senior citizens getting online is truly impressive.

But the poll plugin might be pushing the envelope a little too far :-)
Quote Reply
Re: [HeavyBombers] Poll Plugin In reply to
Scott,

I just noticed that there is a bug in the plugin installer, that has got to do with the language options.

I'll work on a solution, until then, please don't install/upgrade the plugin.....

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

Last edited by:

yogi: Apr 27, 2002, 12:16 PM
Quote Reply
Re: [HeavyBombers] Poll Plugin In reply to
The installer is fixed now, everything should be fine. If you have previously installed the plugin, please uninstall it (no data will be lost), delete it completely from the system, and install the latest version.

All this confusion is due to me including some new features in the last minute before releasing it...

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Votes made from threaded mode aren't counting, at least in my forums. Any idea why?

Edit: I just tested a vote in threaded mode in your test forums and it doesn't work either.


Realiiity.com Forums

Last edited by:

ellipsiiis: Apr 28, 2002, 4:21 PM
Quote Reply
Re: [ellipsiiis] Poll Plugin In reply to
This was a bug (the poll_type template tag was not correctly set).

I fixed it, you can download the latest version from the server.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Uninstalled, downloaded and reinstalled, still doesn't work.


Realiiity.com Forums
Quote Reply
Re: [ellipsiiis] Poll Plugin In reply to
It now works on my testforum...

Can you try making a "multiple choice poll" and the vote in threaded view?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Poll Plugin In reply to
Whoops, I thought I had turned the cgi caching off on my server but I hadn't-- it seems to be working. Thanks Blush


Realiiity.com Forums
Quote Reply
New Version - 1.0.1 In reply to
I have just put a new version of the plugin (1.0.1) on the server. It seems that the "poll_ssi" function was broken with version 1.1.5 of GForum. The new version fixes that, as well as some other minor things.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Hi Ivan,



Will the latest version allow images rather than just text as a voting item?

Example: 4 pictures of baseball bats. Each different in type. To vote you would select the vote button next to the image you like.

As well, did you allow the number of voters and/or the percentage of voters to be turned off in the poll plugin?



Thanks in advance
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
Hi

1. No, images are not possible yet. I'll add it to the to do list for a future version. One could do a quick hack (to display images if the poll options are of the form "Image-http://www.foo.com/bar.gif").

2. Can be done in the templates.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Thanks Ivan



Nice plugin!
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
Ok GF1.1.5 user so -> uninstalled Poll 1.0, and reinstalled 1.0.1

1) I can click NEW POLL and get the poll options

2) One can fill in the options and click POST

3) When you go to view the message, it looks like a normal post with no poll info or options.

Is this cgi-caching? I do not have a dedicated server, so how would/could I disable it?


I have also verified that all the appropriate tags were modified that it calls for as well.

post_view_flat.html

post_view_printable.html

post_view_threaded.html

include_post_common_write.html

include_post_html_common_write.html

all have been modified correctly.

I see the options when I click VIEW THREADED... I do not see the poll in either post_view_flat.html or post_view_printable.html

Just in case I moved the tags around in the template - but to no avail. SO I moved them back.

As another part of the debugging process, I created a new poll and put votes in there to see if that would make a difference - no... Still only see in threaded view

One interesting note: For polls that were created prior to the upgrade, I see those just fine in all views... To me - that suggests that the templates are ok and for some reason, the new polls are not getting submitted properly.

Last edited by:

shiner: May 31, 2002, 5:30 PM
Post deleted by shiner In reply to
Quote Reply
Re: [shiner] New Version - 1.0.1 In reply to
I cannot reproduce the error you got: I upgraded a forum 1.1.4 (with plugin 1.0.0 installed) to 1.1.5, installed the new version of the plugin, and everything went fine.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Yogi,

I briefly took the if statements out of post_view_flat so the statement looked like this:

<tr>
<td colspan="2">
<%include include_poll_view.html%>
<%include include_poll_results.html%>
</td>
</tr>

Surprisingly - this was the output:

Poll: Unknown Tag: 'poll_question'
View Results (Unknown Tag: 'poll_votes' votes)

Poll: Unknown Tag: 'poll_question'
Unknown Tag: 'poll_votes' total votes

SO... where would the disconnect be? It has something to do with FLAT VIEW. Once that is resolved, the PRINT VIEW part should correct itself because it is based on the FLAT VIEW.

The biggest hang up is that I can see poll data in any view if the poll was created in 1.1.4!
Quote Reply
Re: [shiner] New Version - 1.0.1 In reply to
Can you please add the following line at the end of post_view_flat.html for testing purposes:

<%GT::Template::dump%>

and then look what it says for poll_view and poll_results.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Yogi,

They simply are not there....

The only variables that are listed containing POLL are:

post_is_poll and root_post_is_poll

Should this be 0?

'post_id' => '883',
'user_perm_edit' => '1',
'post_locked' => '0',
'post_is_poll' => '0',


However, in the threaded view... all of these are listed

current_user_poll_permission
poll 1 poll_answer_answer poll_answer_id poll_answer_percentage poll_answer_votes poll_enabled 1 poll_id 15 poll_id_fk poll_loop $VAR = [
{
'post_id_fk' => '883',
'poll_answer_id' => '47',
'poll_answer_percentage' => '0',
'poll_id_fk' => '15',
'poll_answer_answer' => 'oen',
'poll_answer_votes' => '0'
},
{
'post_id_fk' => '883',
'poll_answer_id' => '48',
'poll_answer_percentage' => '0',
'poll_id_fk' => '15',
'poll_answer_answer' => 'tewo',
'poll_answer_votes' => '0'
},
{
'post_id_fk' => '883',
'poll_answer_id' => '49',
'poll_answer_percentage' => '0',
'poll_id_fk' => '15',
'poll_answer_answer' => 'hor',
'poll_answer_votes' => '0'
}
];
poll_question test eotpsg poll_type 0 poll_view 1 poll_votes 0
post_is_poll
user_poll_permission

Quote Reply
Re: [shiner] New Version - 1.0.1 In reply to
In flat view, root_post_is_poll should be 1 for polls, post_is_poll can be empty (or zero).

Can you edit Poll.pm (add the red things), and tell me what happens when you add a new poll:

Code:
# Update Post table
my $c = $DB->table('Post');
$c->update ( { post_is_poll => '1' }, { post_id => $post_id }) or die $GT::SQL::error;

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
A fatal error has occurred:
Failed to execute query: 'UPDATE gforum_Post SET WHERE post_id = ?' Reason: You have an error in your SQL syntax near 'WHERE post_id = 884' at line 1 at /home/sites/site30/web/cgi-bin/forum/admin/Plugins/GForum/Poll.pm line 135.


Please enable debugging in setup for more details.
Quote Reply
Re: [shiner] New Version - 1.0.1 In reply to
This is very strange. So somehow, the Post table is not updated, when you write a new poll.

Even stranger (at least to me), is the fact that you can view these new polls in threaded/print view. Is that really correct?

What database are you using?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Ivan,

I can only view in the threaded view - and yes, I can see the poll question and results of newly created polls when in threaded view. Print View is related and based on Flat view. I am presuming that once flat view is fixed - print view will also have been corrected.

I am using the MySQL database that my host set up for me and the standard tables that g-forum creates. I have done nothing out of the norm - I simply upgraded and what once worked, no longer works. I have uninstalled poll, removed the tags, deleted poll, re-installed poll, re-insert the tags - but no luck.

Since I edited poll.pm with the above addition, I can not post polls - you just get the error message.


To see this marvel in action - go here:

http://www.investingdd.com/.../gforum.cgi?post=888

Nothing in flat view, but you see it in threaded...
Quote Reply
Re: [shiner] New Version - 1.0.1 In reply to
The problem really seems to be that the "post_is_poll" field is not updated when you write a poll. If it doesn't find this field set to 1, no poll will be displayed.

It also makes sense that you are still able to see the polls in threaded view, because the plugin does a different kind of lookup in that case.

Have you got a "post_is_poll" field in your Post table? What does the entry in the defs/gforum_Post.def of this field look like?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
The last field in the gforum_post table is post_is_poll

gforum_post.def was the answer... There was no post_is_poll information in there. I overwrote the file with a back-up version. I can now see the polls in flat/print/threaded views. There is one quirk that I believe is in the template - but in flat, I ONLY see the poll and not the post... Still working on it.




- Quick update, to fix the see only the poll and not the post problem, I just restored the view_post_flat template and re-inserted the tag. That worked.

It appears that all of the problems have gone away now. Thank you very much for helping me troubleshoot this. I would never have known to go to the def file. Thanks!

Last edited by:

shiner: Jun 3, 2002, 5:35 AM
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Hi Yogi,



I just installed the poll plugin to give it a try. Everything has gone smooth with just a couple exceptions:

1. When I tried to do the template mod for post_view_threaded.html you state to insert the code "<%if poll_view%> <%include include_poll_view.html%> <%elsif poll_results%> <%include include_poll_results.html%> <%endif%>" just before <%body_table%>. THis would be fine but there are 4 times when that tag is used. TO which location are you reffering?

2. When I tried to do the template mod for post_view_threaded.html you state to insert the code "<%if poll_view%> <%include include_poll_view.html%> <%elsif poll_results%> <%include include_poll_results.html%> <%endif%>" just before <%loop post_loop%> <%body_table%>. This would be fine but only the <%loop post_loop%> shows up in the code and not the <%body_table%>. Any ideas?

3. On the forum_view.html template mod you state to insert the code 3 times. When I do I get three buttons.

Were there template changes between 1.1.4 and 1.1.6 that would make these template modifications different?



Thanks in advance,
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
Hi

1. I mean the one in
Code:
<%body_table%>
<tr>
<td>
<br>
<%include include_post_display.html%>
<br>
</td>
</tr>
<%/body_table%>

2. I assume you mean fo the template post_view_printable.html. There is indeed no <%body_table%> tag, and you can just place it before <%loop post_loop%>.

3. There are three occurances of the "Post New" button on the page. If you insert the code before each of them, it will be fine.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Thanks Yogi!

3. The code was slightly different on the third placement:

<input type="submit"<%unless user_forum_permission >= 5%> disabled<%endunless%> name="do=post_write;forum=<%forum_id%>" value="Post New" class="submit">

It kind of threw me. But I think I have the mods done now.



Thanks again.
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Hi Yogi,



I remember asking about the ability to see only percentage of votes rather than vote count and total votes on a poll by poll basis. Some with, some without.



Is this possible? I don't see anything in the poll setup nor the creation of a poll.



Thanks,
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
This is not possible on a poll by poll basis, only globally throught the templates (you get the number of votes and the percentage for every poll option). The template in question is include_poll_results.html.

I must have misunderstood you....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Thanks Yogi,



Do you think that this might be available in a later version or would a special mod have to be done to make it a poll by poll basis?



This is a really nice plugin by the way.



Thanks!
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
I might include this at some point, but certainly not in the next days/weeks, because I think this is not something that many users require.

So yes, it would have to be a special mod. What is the condition for displaying votes, and for displaying percentages?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
It would be great to have it available in the poll creation screen, giving the poll author the ability to choose from:


Display Percentage Only
Display Count Only
Display Both (default)

Another thing that may be handy is the ability to audit the vote.

Let's say that you hold a poll allowing only a certain group to vote. But the bote requires a certain percentage of the total group to vote for it to be recognized (such as a corporate board vote). Then you would have to match up the avaulable voters to who actually voted. So a list would have to be generated of the actual group voters that participated. Then a list could be printed of the available group and the two papers used to audit the vote.

Just an idea but I can see some professional applications for the plugin if some audit trails and setup options were in place.



Thanks again,
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
So, for example if less than 50 percent of those who can vote did actually vote, you want to display what? And what do you want to display if more than fifty percent voted?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
That would actually be a different function altogether. But not a bad idea! If you were to compare available voters to actual votes and they exceeded the requirement (set during the poll creation) of 51 percent (as an example) then it could state "Vote Valid".

Then after the vote was completed and audited based upon the two lists (available voters and actual voters) the poll creator could stamp the poll (vote) "Vote Confirmed".

So the steps would be:

Poll Creator:
1. Adds poll, sets validity level (percentage required to make the vote valid), selects output format (votes, percent or both), selects a specific group for voting (or no group, or a group of groups) and selects a time frame for the vote (midnight the 1st through midnight the 2nd as an example).
2. Notification is sent out to members of selected groups with a link to the poll and a time frame under which the vote applies.

Voter:
1. Voter places their vote

Poll Creator:
3. Vote Closes and notice is placed on the poll "Voting Closed"
4. Votes are compared to available voters and if a threshold was set and reached a notice is placed on the poll "Vote Valid". Of the threshold was not met a notice is placed on the poll "Vote Invalid".
5. Vote audit ensues comparing the actual voter list to the available voter list. If audit is clean then a notice is placed on the poll "Vote Confirmed" of audit reveals an issue the a notice is placed on the poll of "Vote Not Confirmed".

Did that make sense?Crazy

With this kind of mod I guess it would be "Poll Plugin Corporate" or "Poll Plugin Professional" Smile

Last edited by:

Teambldr: Jun 10, 2002, 7:46 AM
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Hi Yogi,



Is it possible to extend the number used for percentages to include up to four places right of the decimal point in the view results?



Thanks,

Last edited by:

Teambldr: Jun 10, 2002, 1:41 PM
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Hi Yogi,



I have had a few minutes with the Poll plugin now and have found this to be "One Trick plugin"

This plugin adds a tremendous amount of life to a forum. I only wish that there were more plugins developed with interaction as a focal point such as you have done with this.



Great Job!

Thanks
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
Thanks a lot.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
>>I only wish that there were more plugins developed with interaction as a focal point such as you have done with this.<<

Don't forget MyLinks_DB Cool
Quote Reply
Re: [Paul] New Version - 1.0.1 In reply to
I'll check it out.



Thanks Paul
Quote Reply
Re: [yogi] New Version - 1.0.1 In reply to
Hi Ivan,



I am a bit lost on the permissions part. Where do I modify the permissions to make it where only registered users can vote and only moderators can create or modify?

As well, where do I make the change to allow for the XX.XXXX% rather than the XX%?



Thanks!
Quote Reply
Re: [Teambldr] New Version - 1.0.1 In reply to
from the ADMIN->plug ins

click EDIT next to the POLL plug in in the middle of your screen

not anything from the left menu.... ('about' will tell you what numbers represent for the different permission levels)

I had the same problem - enjoy your weekend!
Quote Reply
Re: [shiner] New Version - 1.0.1 In reply to
Thanks a lot!
Quote Reply
New Version - 1.0.2 In reply to
I have just put version 1.0.2 of the Poll plugin on the server.

There is one additional feature, you can now select the number of digits that is displayed of the percentage value of each vote.

There is no need to upgrade if you don't need this feature.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.2 In reply to
Hi Yogi,



To do this upgrade would I need to do the following:

a. Uninstall the earlier version (completely or leave data?)

b. Delete the earlier version

c. Upload the new version

d. Install the new version

e. Repair

Does this sound right? And since mine is registered, do I have to do anything else special?



Thanks!
Quote Reply
Re: [Teambldr] New Version - 1.0.2 In reply to
You can do the following:

1. download the new version from the GT server.
2. install, completely, overwrite existing installation
3. done

But you already have the version with the decimal points for the percentage, so there is really no need to upgrade.

Registration remains valid of course, no need to do something special.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.2 In reply to
Hi Yogi,

I have the following:
Poll 1.0.1 yogi

Does this have the decimal point mod?



Thanks

Last edited by:

yogi: Nov 22, 2003, 6:01 AM
Quote Reply
Re: [Teambldr] New Version - 1.0.2 In reply to
Go to "Plugins -> Poll -> Edit" in your admin area, and check if you have the options "percentage_post" and "percentage_pre".

If they are there, you effectively have 1.0.2, even if it says 1.0.1 on your copy.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.2 In reply to
Nope!

No percentage_!

I will need the upgrade then.



Thanks Yogi!
Quote Reply
Re: [Teambldr] New Version - 1.0.2 In reply to
Yes. But it shouldn't be a problem. Nothing will be deleted.

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

Last edited by:

yogi: Jul 2, 2002, 12:35 PM
Quote Reply
Re: [yogi] New Version - 1.0.2 In reply to
Yogi,

I installed your poll plugin and I am configuring to work with GT forum.

I'm a bit confused about this instruction

Add a "New Poll" button: in forum_view.html, insert (three times)

When I do this I get three identical buttons that say new is that correct.

Thanks

CCUnet
my Christian web
Quote Reply
Re: [ccunet] New Version - 1.0.2 In reply to
You'll have to add the code in three different places in the template. One will appear at the top of the displayed page, the other one at the bottom, and the third is displayed if no post are there yet.

I doesn't really make sense to put the three buttons all at the same place... Wink

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.2 In reply to
Yogi,

The instructions only indicate one location to place the code in the forum_view.html template.

Code:
just before

<input type="submit"<%unless user_forum_permission >= 5%>

disabled<%endif%> name="do=post_write;forum=<%forum_id%>"

value="Post New" class="submit">


What are the other locations

Andre
my Christian web
Quote Reply
Re: [ccunet] New Version - 1.0.2 In reply to
The code snippet I mention occurs three times in the template (like the one quoted, or very similar).

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] New Version - 1.0.2 In reply to
OK I get it now.

Thanks

CCUnet
my Christian web
Quote Reply
Re: [yogi] New Version - 1.0.2 In reply to
Hi Yogi

Is it possible to include a poll on a dynamic page on LSQL?

Both installations are on the same server.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory