Extension:QPoll/Examples

Declaration/voting mode
Now there's an example of three different polls:  {Please choose the side of conflict: ! Choose a score (I - least important, V - most important) describes my values and ideals describes my personal views most suitable approach to current situation explains their arguments in the most logical way provides the most useful idea
 * layout="transpose" type="unique" showresults="0"}
 * I | II | III | IV | V

{When I begin to work on some project as a member of working group, the most important thing to me is: understanding the goals and importance of the project to figure out the goals and values of the working group members to define, how the project will be performed to understand, which benefits this project could bring to our group members to organize the project in such way that it will be well done
 * layout="proposals transpose" type="unique" showresults="1"}
 * 1 | 2 | 3 | 4 | 5

{In reality, I am understanding new ideas better and easier, when I can: Have you thought which external factors encourage you to invent something new? Have you experienced problems due to excessive curiosity? Did you have a strong desire to improve handiwork? Did you ever have problems due to excessive stubbornness?
 * layout="proposals" type="" showresults="1;color:blue;background:yellow"}
 * "Real" myself ||| "Ideal" myself
 * Yes | No | Yes | Maybe | No

{Which picture do you like better? Let's assume the poll above is located at the wikipage Mainpage. It's unique identifier on the mainpage is #almaz1 (id=almaz1 poll attribute). Only a different title can re-use the same identifier. This poll will show it's statistics to everyone who can view and thus vote on the Mainpage, in case wiki admin permitted this by placing  qp_Setup::$global_showresults=1;  in LocalSettings.php (showresults attribute). Questions of this poll will be displayed two per row (perrow=2 poll attribute). Questions of poll will have their statistics displayed in different style, according to their showresults attributes.
 * type="unique" showresults="2;color:blue;background:yellow;textcolor:#FF0000;textbackground:aquamarine"}
 * 1 | 2 | 3 | 4 | 5

 {Checking various types of questions, 1 understanding the goals guessing real goals of the project digging deeply into the problem
 * type=""}
 * Large metacategory for the full list of categories just below
 * Category 1 | Category 2 | Category 3

{Checking various types of questions, 2 understanding the real goals Did you mean choice? guessing true goals of the project digging even more deeply into the problem
 * type=""}
 * Two categories span "A"|| Two categories span "B"
 * 1 | 2 | 3 | 4

{Checking various types of questions, 3 understanding the goals guessing real goals of the project digging deeply into the problem Let's assume the second poll is located at the wikipage Pagename. It will be available for the current user only after the first poll (Mainpage#almaz1) was successfully submitted (dependance="Mainpage#almaz1" poll attribute). It's own id=poll0. It might be addressed in the future with Pagename#poll0 poll address (or, just #poll0 if the another poll or parser function is located on the same page).
 * type="[]"}
 * Metacategory for categories I & II | Metacategory for categories III & IV
 * I | II | III | IV

The question 2, proposal 1 of this poll calls a qpuserchoice parser function to display a custom proposal text depending on the user's category choice in the previously voted poll Mainpage#almaz1 question 1, proposal 2 (see "the most logically suitable to the current situation" proposal text line above). The displaying proposal text will be Did you mean ... choice?, where ... will be substituted according to the user choice of categories in Mainpage#almaz1 question 1, proposal 2

Note also, that the metacategory (spans) line of the question number 3 is equivalent to the line second metacategory was filled up with one additional empty cell automatically to include the rest of the categories (IV in this case).
 * Metacategory for categories I & II | Metacategory for categories III & IV
 * Metacategory for categories I & II || Metacategory for categories III & IV

{Your favorite drink [][]<> Winter [][]<> Spring [][]<> Summer [][]<> Autumn The poll of "mixed" type. Choose only the water, or any combination of juice, beer and/or other custom drink, which you would prefer during the proposed seasons of the year.
 * textwidth="20" type="mixed"}
 * Plain water | Juice | Beer | Other drink

{Your favorite drink [][]<> Winter Spring Summer Autumn
 * textwidth="20" type="mixed"}
 * Plain water | Juice | Beer | Other drink

Since the v0.4.3 it's possible to omit repeated declaration of exactly the same category types at the next proposal line. Starting from the second proposal line (Spring), there's only proposal text. Thus, the poll with id=multi2 has the same category types as the previously declared poll with id=multi.

Since the v0.7.0 it's possible to define just one category question when proposal have textfield type: {Please describe your short opinion on newspapers below <> Calgary Herald Edmonton Journal Lethbridge Herald Lethbridge Sun Times Lethbridge Journal Starting with v0.7.0 question's "common question" can be hidden when there is only one category defined and it's name equals to html entity 160 (non-breaking space). This might be useful when defining the fields for question comments and feedbacks. For example, you may replace common question title "Your feedback" to html entity 160 in the poll with id=multi3 to have the question to be hidden.
 * textwidth="20" type="mixed"}
 * Your feedback

Statistical display mode
Please note that this mode is available only since v0.6.0. The following code can be placed at any wiki page where the extension was installed:  {showresults="2;color:green;"} {} {showresults="0"} {showresults="1"} If permitted by value of qp_Setup::$global_showresults property, will show the statistical results of poll with id almaz1 located at Mainpage.
 * first question will have green bars displayed
 * second will inherit showresults="1" from poll's value of showresults attribute, thus showing only numerical percents
 * third will not be displayed at all
 * fourth will have only numerical percents displayed