Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

A better poll plugin?

+13 votes
asked Sep 24, 2011 in Plugins by NoahY
recategorized Nov 13, 2011 by gidgreen

Okay, so using the Q2A voting system for polls turns out to be not the ideal solution... what happens is the person who posted the poll gets lots of points for all the people voting on their answers :)  So, here's the sort of poll plugin people were asking for, I think.  No promises, but it seems to work as expected, and is fully CSS configurable.  Here it is with some basic css and custom images for the vote buttons:

Of course, almost anything is possible with css; If someone has an idea for default css, suggestions are welcome.  So, what do you think?

Oh, and the source is at the same place, on github:


commented Apr 22, 2012 by Kai
It seems that we cannot edit the poll (when I click "Edit the question" I can edit only the question, not the poll, but when I "Ask the question" I can also create the poll)?
commented Dec 3, 2013 by Hardeep Saini
Dear, I am using your plugin on one of my site... but there's a problem

When registered user asked a question & add a poll in question, but when i approve the questions there's no poll.

but when i created a poll from my admin or super admin it works.

i setting permissions for create polls to registered user.

please help me out.


13 Answers

+1 vote
answered Sep 24, 2011 by yerbol89kz
Notice: Use of undefined constant QA_HTML_THEME_LAYER_URLTOROOT - assumed 'QA_HTML_THEME_LAYER_URLTOROOT' in /home/surakz5/public_html/rus/qa-plugin/q2a-poll/qa-poll-admin.php on line 250
commented Sep 24, 2011 by NoahY
okay, should be fixed now.
+2 votes
answered Sep 26, 2011 by yerbol

User no login! Ask page.


commented Oct 4, 2011 by NoahY
should be fixed, sorry I didn't reply sooner.
+1 vote
answered Sep 27, 2011 by Raj
Question2Answer query failed:

SELECT BINARY content as content, votes, id FROM qa_polls WHERE parentid=24

Error 1146: Table '*******.qa_polls' doesn't exist
commented Sep 27, 2011 by NoahY
You'll have to disable, save then enable and save the poll plugin in admin/plugins.  That will create the table.
0 votes
answered Sep 29, 2011 by yerbol89kz
How i can edit poll?
commented Sep 30, 2011 by yerbol89kz
You misunderstood me! If the user asks a question and makes a birdie on a poll and then leave it blank is the inscription (# # # no choices found for poll!) And at the end of the issue would not be an inscription POLL! Many users do not understand how to take advantage on the issue and furnish the bird.

Sorry, I translated via Google transliteration because I understand very little of english!
commented Oct 1, 2011 by NoahY
Ah, so you want it to be idiot-proof ;)

Okay, I've added a check to make sure they add choices... I think that's what you're on about.
0 votes
answered Oct 2, 2011 by Raj

not working properly. screenshot attached.

commented Mar 18, 2014 by maxjtechno
have a look at the bug on the unvote too...
There is a fix here :
commented Mar 18, 2014 by Reepjyoti Deka
Cool.. Thanks a lot! :) :)

Cheers mate! :)
0 votes
answered Oct 3, 2011 by WhyCheese

Nice and very usefull plugin, but how i can disable /polls pages becouse it just show all questions instead of polls (may posibly be becouse of my Q2A core modification). Also i think it's better place for tag [poll] to be after question title, not before it.

However this plugin is very usefull and would be nice to see more features like points earning for voting... (?) or something... if plugin is still supported.

I'm really appreciated and thankfull to NoahY for all plugins he made. Thanks !

commented Oct 4, 2011 by NoahY
the polls pages should not be enabled by default.  admin/pages should let you edit/delete the link.

the [poll] tag does come after the title; maybe some core modification of yours interferes with this.

thanks for the appreciation; always nice to have positive feedback :)
0 votes
answered Oct 8, 2011 by Raj


When I create a poll, then this marks "> shows up in one or two vote button. Somethme it shows first / last / middle vote button. And these button become uncleckable. But if i select other vote button such as 'NGOs' then this marks "> go away and all vote buttons become clickable.

And I don't understand from where Fully Bangladeshi comes out. Is it autometically comes from Facebook user profile?


commented Oct 14, 2011 by NoahY
I think you're using an old version of the plugin... it's all messed up anyway, but on my own site, it's not messed up.  Can you try updating the code?

And I can't find any problem with the "> showing up.

As for the "Fully Bangladeshi", that's the user's signature.
commented Oct 15, 2011 by Raj
Thanks for your continuous support.

I have updated the recent version today. But still having "> problem with a new error "Undefined variable: full in ........ /NoahY-q2a-poll-965d59b/qa-poll-page.php on line 82'' showing both in internet explorer 8 and firefox.  I am uploading the screenshots soon.

I am agree with powerUser. If options 2 or 3 then "> not shows. If more than 3 options then it shows.
0 votes
answered Oct 15, 2011 by Raj

01. Problem in these Vote Button appears only in internet explore.

02. This "Notice: Undefined variable: full in  ........ qa-poll-page.php on line 82" appears in all browsers when vewing Poll. 

Problem in Vote Button appears only in internet explorer (i am using IE8)


03. "> sign still shows in crome and firefox if options are more than three.

commented Oct 23, 2011 by Raj
Thanks. It works.
Actually I don't know how to set "display_errors" set off.
commented Oct 25, 2011 by Krzysztof Kielce
I tried the poll on my bunch of friends, asking them 3 questions.
No one responded because they had to log in...

Maybe it would be possible to give option switch between remembering IP (anonymous enabled) and username (only logged in)?
0 votes
answered Dec 25, 2011 by yerbol

I leave such errors in version 1.5 beta

Notice: Undefined index: main_form_tags in /home/surakz5/public_html/qa-include/qa-app-format.php(1452) : eval()'d code on line 57



Notice: Undefined index: updatetype in /home/surakz5/public_html/qa-include/qa-app-format.php on line 471

Notice: Undefined index: updatetype in /home/surakz5/public_html/qa-include/qa-app-format.php on line 480

Notice: Undefined index: updatetype in /home/surakz5/public_html/qa-include/qa-app-format.php on line 471

Notice: Undefined index: updatetype in /home/surakz5/public_html/qa-include/qa-app-format.php on line 474

Notice: Undefined index: updatetype in /home/surakz5/public_html/qa-include/qa-app-format.php on line 480

0 votes
answered Mar 10, 2012 by nehogymar
Hi all and NoahY,

I love all your stuff, but I've got a problem with poll plug. I've been trying to translate
this two:

"You must enter at least two choices for the poll."
"you are not allowed to vote"

in admin panel (the changes not saving) and qa-poll-admin.php (after rewiriting, still the default english language appears)

In the admin panel I don't mind, but in the frontend popup screen more important.

So where, can I can exchange these two lines?


Thanks in advance
commented Mar 10, 2012 by NoahY
try the latest version of the plugin; it uses a language file that you can edit.
0 votes
answered Mar 10, 2012 by nehogymar

One more thing,

I reduced, the admin "Minimum length of answer:  to 0" because I don't whant to force the user when answering, write something for vote, just vote freely....

But with this I got:
/qa-include/qa-theme-base.php on line 1844 ($a_item['content'],)
probably because the content is empty(?)

So how is it possible avoid this message, or using just for voting by self with other approach?



commented Mar 10, 2012 by NoahY
I don't see how this is related to the poll plugin...
0 votes
answered Jul 28, 2013 by saeed
I am admin of my q2a site but i can't edit polls that other users make. why?
commented Mar 17, 2014 by Reepjyoti Deka
You can edit them by changing the text in the database. I guess you would have the logins for it as u are the admin.

You can view the text at the qa_polls table under the content column.