Title: Display Bonus question Points
Last modified: August 31, 2016

---

# Display Bonus question Points

 *  Resolved [friendlydesign](https://wordpress.org/support/users/friendlydesign/)
 * (@friendlydesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/)
 * First of all, thank you for this plugin, you do a great job.
 * I am looking how to display the score with bonus issue, as is display the score
   for the match on the prediction page.
 * Thanks in advance.
 * [https://wordpress.org/plugins/football-pool/](https://wordpress.org/plugins/football-pool/)

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

 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093657)
 * Sorry, not sure what you mean.
 *  Thread Starter [friendlydesign](https://wordpress.org/support/users/friendlydesign/)
 * (@friendlydesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093774)
 * Sorry, my English is not very good.
 * After validation of the scores, the points obtained by the user appears next 
   to the icon of statistical graphics. I would do the same for the number of points
   obtained by the user for bonus questions.
 * (perhaps in page “class-football-pool-pool.php”)
 * ex :
 * Feb 20, 2016
    18:00 Team 1 2 – 0 Team 2 **3** (here icon graphics)
 * Bonus Question 1
 * Answer : …
 * Closed 2016-02-20 17:00 3 Pts(value in admin) **+ Points real !**
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093837)
 * I’m on holiday right now. I’ll check it when I get home (next week).
 *  Thread Starter [friendlydesign](https://wordpress.org/support/users/friendlydesign/)
 * (@friendlydesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093956)
 * Ok thanks !
 *  Thread Starter [friendlydesign](https://wordpress.org/support/users/friendlydesign/)
 * (@friendlydesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093962)
 * Hello,
 * May I ask if you have had time to see my question?
 * thanks in advance !
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093964)
 * Hi,
 * Unfortunately this is not something that can be changed via a hook. So this means
   you’ll have to edit one of the plugin’s file. If you do an update in the future,
   you’ll have to redo the changes.
 * The changes must be done in “classes\class-football-pool-pool.php”. Look for 
   the line that reads:
 *     ```
       $points = $question['points'] == 0 ? __( 'variable', FOOTBALLPOOL_TEXT_DOMAIN ) : $question['points'];
       ```
   
 * Add the following code below that line:
 *     ```
       if ( $question['score_date'] ) {
       	if ( $question['correct'] ) {
       		if ( $question['user_points'] != 0 ) {
       			$points_scored = $question['user_points'];
       		} else {
       			$points_scored = $points;
       		}
       	} else {
       		$points_scored = 0;
       	}
       	$points_scored = sprintf( ' (%s points scored)', $points_scored );
       } else {
       	$points_scored = '';
       }
       ```
   
 * _(ofcourse you can change the text to whatever you want)_
 * And then below the line that reads:
 *     ```
       $output .= sprintf( '<span class="bonus points">%s %s'
       					, $points
       					, __( 'points', FOOTBALLPOOL_TEXT_DOMAIN )
       			);
       ```
   
 * Add this line:
 *     ```
       $output .= $user_points;
       ```
   
 * I didn’t test this thoroughly, so I may have missed a certain scenario, but it
   shows how it should be done and should give you a start.
 *  Thread Starter [friendlydesign](https://wordpress.org/support/users/friendlydesign/)
 * (@friendlydesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093980)
 * Thx u very much !!!!
 * But the last line is :
 * `$output .= $points_scored;`
 * not
 * `$output .= $user_points;`
 * U are the best !
 * Thx for this plugin !!!!!!!
 *  Thread Starter [friendlydesign](https://wordpress.org/support/users/friendlydesign/)
 * (@friendlydesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093981)
 * Last question… perhaps 😀
 * How display total score by user for one match ?
 * Thx !
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093985)
 * Total score for one match? Please explain. I don’t think I understand correctly
   what you want.
 *  Thread Starter [friendlydesign](https://wordpress.org/support/users/friendlydesign/)
 * (@friendlydesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093987)
 * Total score = points prediction + points bonus questions by user by match
 * Ex : match 1, user “toto” : 8 pts prediction (score correct) + 4 pts question
   bonus = 12 pts total score for toto in match 1 (in array shortcode or on page“
   classes\class-football-pool-pool.php”.
 * Thx !!!!

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

The topic ‘Display Bonus question Points’ 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/)

## Tags

 * [bonus](https://wordpress.org/support/topic-tag/bonus/)
 * [display](https://wordpress.org/support/topic-tag/display/)

 * 10 replies
 * 2 participants
 * Last reply from: [friendlydesign](https://wordpress.org/support/users/friendlydesign/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/display-bonus-question-points/#post-7093987)
 * Status: resolved