Football Pool
[resolved] Show toto results in raking (4 posts)

  1. joselo4
    Posted 3 years ago #


    i would to know how can i configure the plugin to show how many toto results and the w-d-l result had score each user in the rakning.

    Example how it works now:

    Position - User Name - Points
    1 - Joselo4 - 20

    and i would like to show this:

    Position - User Name - Points - Toto Points - W-D-L Points
    1 - Joselo4 - 20 - 2 - 1

    Its that possible ?

    Thank you


  2. AntoineH
    Plugin Author

    Posted 3 years ago #

    Yes, that should be possible. The scorehistory table has all the information you need. If you do a GROUP BY on userId and COUNT the columns (full, toto) that have a value of 1 that should do the trick. Please note that points for both questions (type = 1) and matches (type = 0) are stored in the table, so for your query you have to include only 'type = 0'.

    Do you have any PHP and SQL knowledge?

  3. AntoineH
    Plugin Author

    Posted 3 years ago #

    Oh, I did a quick look in the code. The data is already there. All you have to do is change the print_pool_ranking function to also display the $row['full'] and $row['toto'] values.

    For example:

    $output .= sprintf( '<tr class="%s"><td style="width:3em; text-align: right;">%d.</td>
    					<td><a href="%s">%s%s</a>%s</td>
    				esc_url( add_query_arg( array( 'user' => $row['userId'] ), $userpage ) ),
    				$this->get_avatar( $row['userId'], 'medium' ),
    				Football_Pool::user_name( $row['userId'], 'label' ),
    				( $all_user_view ? $this->league_image( $row['leagueId'] ) : '' )
  4. joselo4
    Posted 3 years ago #

    Your second post was great!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Football Pool
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic