Title: shortcode fb-allquestionscores
Last modified: June 24, 2021

---

# shortcode fb-allquestionscores

 *  Resolved [af3](https://wordpress.org/support/users/af3/)
 * (@af3)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-fb-allquestionscores/)
 * I hope there will be a shortcode to tabulate the scores for questions like the
   shortcode [fp-allscores match=”x”]

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-fb-allquestionscores/#post-14593974)
 * And what would you like to show in the table headings? The entire question would
   be too big, I think. Can you perhaps give a mock-up of different matrixes (1 
   or more players, 1 or more questions)? If I get a better feeling of what you 
   want to show, it shouldn’t be too hard to create something.
 *  Thread Starter [af3](https://wordpress.org/support/users/af3/)
 * (@af3)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-fb-allquestionscores/#post-14594013)
 * Perhaps, Heading could be Q1, Q2, Q3.. it doesnt need the whole questions.
 * For the allscore, I rearranged the display like this image (user on heading) 
   because I have less players than the number of matches so the heading are the
   users instead of matches. The allquestions could then be something like this (
   image below) but with the Q1, Q2 either as row and users as heading; or vice 
   versa. The full questions can be displayed as tooltip when user hover on the 
   Q1, Q2 etc.
 * [https://drive.google.com/file/d/1rBYoC8NvmiETJ85440yK9ZmlTDGNHKo_/view?usp=sharing](https://drive.google.com/file/d/1rBYoC8NvmiETJ85440yK9ZmlTDGNHKo_/view?usp=sharing)
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-fb-allquestionscores/#post-14599909)
 * hi,
 * I did an attempt to create a new shortcode. I based it on the same principles
   as the [fp-scores] to keep consistency. If it is okay, I can consider adding 
   it to the next version of the plugin. To be honest: I tested it for a lot of 
   scenarios (closed/open questions, variable scoring, correct/wrong/no answer) 
   and I think I covered all, but also didn’t put too much effort in it 😉
 * [shortcode [fp-question-scores] plugin](https://www.dropbox.com/s/vc7qx8rvhlbs3bv/football-pool-shortcode-fp-question-scores.php?dl=0)
 * The possible parameters:
 *     ```
       //[fp-question-scores]
       //  Displays the scores for every user for one or more questions.
       //
       //    Users & question arguments can be entered in the following formats (example for users):
       //        users 1               -> users="1"
       //        users 1 to 5          -> users="1-5"
       //        users 1, 3 and 6      -> users="1,3,6"
       //        users 1 to 5 and 10   -> users="1-5,10"
       //
       //    league           : the league to get the users from, defaults to the overall league
       //    users            : collection of user ids, if set then league setting is ignored
       //    question         : collection of question ids
       //    use_querystring  : if set to 'yes' all parameters will be retrieved from the querystring values
       //    show_total       : if set to 'yes' the total score for a row will be shown
       //    hide_zeroes      : if set to 'yes' a score of 0 points will not be shown
       ```
   
 * In the table head I show both the question ID and a number. And also the full
   question both as title for the numbers and as text in a separate heading row.
   My idea was that you can show/hide what you want via CSS. So the below CSS would
   be the default CSS to show Q1, Q2 etc.
 *     ```
       .fp-question-scores .question .question-id {
         display: none;
       }
       .fp-question-scores .question .question-nr:before {
         content: "Q ";
       }
       .fp-question-scores tr.question-text {
         display: none;
       }
       ```
   
 * Hope this helps.
 *  Thread Starter [af3](https://wordpress.org/support/users/af3/)
 * (@af3)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-fb-allquestionscores/#post-14600235)
 * Wohoo!! This is super awesome.
    I can get the shortcode to show with the question
   parameter. They look awesome and the tooltip works too. The css option to show/
   hide is a great idea.
 * `[fp-question-scores question="2-34" show_total]` works but actually show_total
   was not shown until I changed the strict equal to dbl equal to display the <TD
   >.
 * `[fp-question-scores users="1"]` is returning empty for me, also with ranges 
   of userids. Still trying to figure out why.
 * Anyway, this is a great addition to the FB-Pool plugin. Thank you.
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-fb-allquestionscores/#post-14600318)
 * > [fp-question-scores question=”2-34″ show_total]
 * > [fp-question-scores users=”1″]
 * This will not work because the shortcode expects some question ID’s and some 
   user ID’s. The shortcode will show a matrix of given users (or league ID) and
   given questions.
 * Change it to `[fp-question-scores users="1" question="2-34" show_total="yes"]`
 *  Thread Starter [af3](https://wordpress.org/support/users/af3/)
 * (@af3)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-fb-allquestionscores/#post-14600325)
 * I got it! This is cool.
    I added data-title to the SPAN element so that it can
   be styled in css. Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘shortcode fb-allquestionscores’ is closed to new replies.

 * ![](https://ps.w.org/football-pool/assets/icon-256x256.png?rev=983880)
 * [Football Pool](https://wordpress.org/plugins/football-pool/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/football-pool/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/football-pool/)
 * [Active Topics](https://wordpress.org/support/plugin/football-pool/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/football-pool/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/football-pool/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [af3](https://wordpress.org/support/users/af3/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/shortcode-fb-allquestionscores/#post-14600325)
 * Status: resolved