Extension talk:QPoll

Various comments
Has anyone used this? Can someone provide a link to an example? I am looking to add polls to my site but can't decide which extension to use. --Jake4d 13:45, 20 July 2009 (UTC)
 * There's an example link in the infobox, though there's still no example in English (July 2009). I'd place an example in English somewhere, if the site has the extension installed. Here I can provide only source code examples. I've checked them and they were working at my local wiki. You may try to download and install the extension, then create the test page and paste the examples code to it. As of the different polls extensions, you may install all of these to find out which fits your needs better. QuestPC 07:36, 24 July 2009 (UTC)
 * Thanks for pointing me to the Russian example, I will try them all the next time I have a free day. QPoll looks like a nice extension. --Jake4d 17:30, 24 July 2009 (UTC)
 * a percentage bar will be great Vev 15:24, 30 August 2009 (UTC)
 * I've made simple bars in v0.5.0. No time to make something more complex right now. Please check the updated documentation to see how to display these, if you are interested. QuestPC 07:37, 15 September 2009 (UTC)
 * Right now, voting statistics (percents) are available to end-user only in numerical format. The diagrams and bars can only be built by the administrator of the site: One have to export the stats of poll to XLS-file (at Special:PollResults) page, then draw diagrams in Calc or Excel. Maybe someday I'll find the time to add built-in drawing (probably using ploticus), and JS-made bars, perhaps, too. QuestPC 06:49, 31 August 2009 (UTC)
 * Since v0.6.0, it's possible to place separate statistical output (bars, percents) on any user-edited page by using statistical display mode. I hope to extend it to draw diagrams some day. QuestPC 07:57, 28 October 2009 (UTC)
 * Since v0.6.0, it's possible to place separate statistical output (bars, percents) on any user-edited page by using statistical display mode. I hope to extend it to draw diagrams some day. QuestPC 07:57, 28 October 2009 (UTC)

It could be a nice feature to be able to drop polls from the "Special:PollResults" page and actually also from the QPoll-tables in the MySQL database through a tool on the wiki itself. This is useful for the polls that are not used anymore. Cause it seems a bit drastic to use MySQL every time. Do you think this is do-able and how much work would this be? Or is there any other way of cleaning up after old / obsolete polls? Kind regards, -Marco WGA 15:43, 19 February 2011 (UTC)

Versions
I know it says it on the extension page, but just to be clear: this extension does not work with MediaWiki 13.2. --Robinson Weijman 14:00, 25 September 2009 (UTC)

MySQL: "1054: Unknown column 'qp_users.uid' in 'field list' (localhost)"
Hi, I'm running MediaWiki 1.15.1, PHP 5.3.0 (apache2handler) and MySQL 5.1.37 on a local instalation using XAMPP (Apache Friends Edition). The extension installed fine and created the tables. Then I reloaded the special page, as requested. The new page has two links: "List all users" (enabled) and "List all polls" (disabled). I click "List all users" and get a DB error in function "qp_UsersList::getIntervalResults". MySQL returns error "1054: Unknown column 'qp_users.uid' in 'field list' (localhost)". Now, looking at the DB, all QPoll tables were created with the prefix of my wiki. So, there is a "cultiwiki_qp_users" table and it has the uid field. The function "qp_UsersList::getIntervalResults" seems to be ignoring the table prefix. If I remove the "cultiwiki_" prefix from the table name, then the extension complains that some tables are missing, so it expects the table to have a prefix. So, I'm stuck. Any thoughts? Thanks. Hamilton Abreu 22:58, 17 November 2009 (UTC)
 * Hi! I am sorry for delay, I am currently busy with very different job. I've identified the issue. The possible fix is uploaded into SVN. You may download it by using SVN client, or, just by overwritting local file from the direct link: qp_results.php QuestPC 11:24, 19 November 2009 (UTC)
 * Problem fixed. Many thanks. Hamilton Abreu 18:32, 19 November 2009 (UTC)

help?
could I get a bit of help with this extension? I'm just trying to ask a simple question like "what is your favorite character?" and then have a list of ~5 characters where users can choose only one option and then submit it. But i seem to keep running into errors with it, I tried looking at the examples here but there are way beyond anything that I'll need, Thanks redekopmark 18:09, 9 March 2010 (UTC)
 * Please try copy/paste the following code into the page:

 {Choose one of the characters below: What is your favorite character?
 * layout="proposals transpose" type=""}
 * Littlefoot | Cera |  Ducky |  Petrie |  Spike
 * In case that doesn't work, let me know. QuestPC 08:39, 10 March 2010 (UTC)


 * thanks, that worked :) redekopmark 20:47, 11 March 2010 (UTC)

Unable to call qp_Setup
I can get to the special version page and the tables are all setup. I have added the lines in local settings: require_once( "extensions/QPoll/qp_user.php" ); qp_Setup::$cache_control = false; qp_Setup::$global_showresults = 1; qp_Setup::$anon_forwarded_for = true;

I get this error: Unable to call qp_Setup::renderPoll in /var/www/html/mediawiki-1.15.4/includes/parser/Parser.php on line 3243

Can anyone help or know how to correct this?

I am using version: QPoll-trunk-r68481.tar.gz and I have also tested on QPoll_0.6.5.tgz

Thank you,

Nimish Patel
 * Which version of PHP do you use? I cannot reproduce this error with MediaWiki 1.15.4 / PHP 5.2.9-2. If your version is earlier than PHP 5.2.3, callbacks in string form (like "qp_Setup::renderPoll") might not work. I haven't checked an extension with such old PHP builds, so there might be another incompatibilities as well. I've modified the code to pass the callbacks differently in r68762, so try to checkout latest version from SVN, please. QuestPC 06:39, 30 June 2010 (UTC)
 * Apologize for the late response back- I tried the r68762 build from svn and it seemed to work :). I am using PHP version 5.1.6. I'll give and update once I test it some more :) Thanks for your help!! =D

Nimish Patel

LocalSettings changes not working
Hi - I've installed QPoll and confirmed it in SpecialVersion. When I try to add options in LocalSettings.php (i.e. the qp_Setup options) I get this message:  Any idea what is going wrong? We have MediaWiki 1.15.4 (r518) & PHP 5.3.3 (cgi-fcgi) --Robinson Weijman 12:45, 28 September 2010 (UTC)


 * Or are they only for version 0.6.5 (and therefore MediaWiki 1.16? --Robinson Weijman 12:52, 28 September 2010 (UTC)
 * Before 0.6.5, there were global variables $qp_enable_showresults, $qp_AnonForwardedFor used for setup Extension:QPoll. However, v0.6.5 probably should work with MW 1.15.4 too, although I haven't checked this. In case it doesn't, please report a bug on this talk page. QuestPC 16:26, 1 October 2010 (UTC)


 * Good to know, thank you. I'll get back to you about 0.6.5. --Robinson Weijman 13:07, 4 October 2010 (UTC)

Default MW 1.16 download is 0.6.4
Currently the default download for MW 1.16 is 0.6.4 - shouldn't it be 0.6.5? --Robinson Weijman 13:22, 4 October 2010 (UTC)
 * These should be tagged in svn repo. I am currently busy with another projects and still haven't checked v0.6.5 with 1.15.5 and 1.17alpha. I know I should do that, however there is not enough of time for that right now. With 1.16 pre-release it was working, in fact I've used former 1.16 trunk to develop it. Also, with PHP 5.3.x, to make it "look into the future, not the past". QuestPC 05:53, 5 October 2010 (UTC)

New line
I notice that the poll question blocks automatically appear next to each other on the page. I'd like them to appear underneath each other (i.e. like adding a new line character). E.g. in Declaration/voting mode, I'd like the four sections to go underneath each other instead of in a 2 x 2 block. Anyone know how to do that? --Robinson Weijman 15:06, 11 November 2010 (UTC)


 * Solution - I should have seen this: just a question of changing the  value from 2 to 1 (  specifies the number of questions per line). --Robinson Weijman 15:25, 11 November 2010 (UTC)

How do I get an average number score as a result?
I want people to be able to vote on how much they think something is worth, so I want them be able to give any whole number as input and the poll results be an average result of all inputs. I don't want to give people the choice of $1-$1000 or give them $5-$10, $10-$15 kind of price choices either.
 * Such feature has not been implemented yet. As a workaround, you may use current 0.7.0 beta from the trunk. First you have to define text field inputs, then export the complete votes into XLS. After that you may write a macro in your favorite spreadsheet (Calc, Excel) to calculate average values. However, the numeric type of text fields is not checked / not enforced by extension, thus the user may input non-digits into the text field. I'll try to add numeric fields to polls when I'll have some free time. QuestPC 08:48, 18 January 2011 (UTC)

Thanks! I saw that there was a math extension that would let you put a bunch of numbers separated by pipes that would spit out a mean number for you. Is there some kind of form extension (with a phone number or something input field) that could be convinced to use that math extension in its output?
 * The math "extension" is not for calculation, it is being used to render a TeX formula. To calculate in wikitext, you have to install Extension:ParserFunctions. Then, there will be an

parser function available. Of course you can replace constant numbers with nested template calls, including QPoll results retrieval template call: However, there is no results enumerating template, because it might be undesired to provide direct access to another user votes to non-administrators, who edit the pages (usually votes access is restricted to admin-only Special:Pollresults page). That's why I suggest exporting XLS from Special:Pollresults and process it with Libre / OOO Calc macro. QuestPC 07:40, 1 February 2011 (UTC)
 * Speaking of forms, there is simple Extension:Form, which is mostly used to create new pages and such. Also, there are more advanced Extension:Semantic Forms and Extension:Semantic Forms Inputs, but their purposes are different. You may try to use these with latest version of QPoll in trunk (which uses PPframe, thus compatible with embedding of parser functions in tags). But I guess that would really be tricky or even impossible, because semantic has it's own pre / post processing. QuestPC 07:45, 1 February 2011 (UTC)

Layout in Internet Explorer
In Internet Explorer the layout is not pretty: the question numbers appear on the line above where the question itself appears (specifically, above and to the left). Is there a solution for this? --Robinson weijman 09:58, 27 January 2011 (UTC)
 * The question numbers are displayed properly at the same line as the question itself here in IE8. Which version of IE do you use? Also, can you provide the poll source that is supposed to be rendered incorrectly? QuestPC 07:14, 1 February 2011 (UTC)


 * We're obliged to use IE7. =:-(


 * The code (removing sensitive parts) is:

 { What is your general opinion of the wiki? |layout="proposals" type="" showresults="1;color:blue;background:yellow"} ||||| Please rate the following (one response per question) | Very poor | Poor | OK | Good | Very good Search / finding information Accuracy of information Help pages Overall { Your experience |layout="proposals" type="" showresults="1;color:blue;background:yellow"} ||||| Please select one response per question | Strongly disagree | Disagree | Neutral | Agree | Strongly agree The wiki is the first place I look for documentation The information I need can usually be found on the wiki ... a lot more ...


 * I added the nowiki tags so that you can see here how it looks when I'm editing (hope that's clear).


 * Thanks for the prompt response!
 * --Robinson weijman 09:10, 4 February 2011 (UTC)
 * I've tried to fix incorrect position of question number in IE7. Please download trunk version. QuestPC 17:40, 4 February 2011 (UTC)

Thanks. But my poll is already running now. Maybe next time! =:-) --Robinson weijman 14:44, 10 February 2011 (UTC)

Optional question
Is it possible to make a question optional? Specifically, I want to create a single text box at the end of the questionnaire for "other comments". However, this is currently obligatory, which I don't want.

In addition, I am obliged to create a checkbox next to the text field:

{Other feedback |textwidth="60" textheight="4" type="mixed"} || Other comments [ ]<> Type your comments here

Is there a way around that? --Robinson weijman 12:37, 27 January 2011 (UTC)
 * With the latest version (update from trunk) it is possible to have alone text field as the only proposal value. Speaking of transparent category names, that is against the purpose of an extension, but you may try using nbsp as the category name, for example:

{Other feedback <> Type your comments here QuestPC 08:07, 1 February 2011 (UTC)
 * textwidth="60" type="mixed"}
 * &#160;
 * I've made a patch where a question which has a single (and only single) category named as 160 html entity (empty non-breaking space) will not have it's category name displayed. It's in the trunk now. QuestPC 11:25, 1 February 2011 (UTC)


 * Thanks, I will check this out. But what is a transparent category name? --Robinson weijman 09:16, 4 February 2011 (UTC)


 * When I use the suggested code above I get:

Syntax error Other feedback Category name is empty

using MW 1.15.4 and QPoll 0.7.--Robinson weijman 10:12, 4 February 2011 (UTC)
 * The MediaWiki itself renders that as space; however internally that is an entity of code 160: . Also, take a look at the source code of this talk page, you'll see the actual entity in example code. QuestPC 15:31, 4 February 2011 (UTC)

Polls not showing
Hi.

I've installed version 0.7 on MW 1.16.0 on PHP 5.2.6. I tried one of the demo polls: {Your favorite drink [][]<> Winter [][]<> Spring [][]<> Summer [][]<> Autumn but nothing displays except a Vote button. The extension installed okay and in the Poll result special page it is showing: Page "Test" Poll "multi3": Source, Statistics, Users, Not participated I tried 0.6.5 with the same result. Any ideas what I'm doing wrong? Many thanks. mitchelln 13:24, 18th February 2011 (UTC)
 * textwidth="20" type="mixed"}
 * Plain water | Juice | Beer | Other drink
 * Hi, I am running 1.16.0 at my personal wiki and v0.7 works here. I run it with PHP 5.3.3; v5.2.6 is pretty old, however someone was running QPoll 0.6.5 successfully even with really ancient and buggy PHP 5.1.x. So, that sounds strange. Do you have any PHP errors / warnings? Do another parser tag extension run fine? I've noticed that you have poll id mismatch in the source text and at the special page. Perhaps the database is inconsistent. You may try dropping qp_* DB tables and recreate these with Special:Pollresults. However, the current poll data will be lost in such case. QuestPC 19:15, 27 February 2011 (UTC)

Polls with automatic naming
I was wondering, if and in what way is it possible to give a poll its name automatically. For instance in the case I create a new page and I always want to include the same poll (only for each page I want the poll to have a different name)? Kind regards, -Marco WGA 22:14, 19 February 2011 (UTC)