Support » Plugin: Football Pool » Show toto results in raking

  • Resolved joselo4



    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author AntoineH


    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?

    Plugin Author AntoineH


    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'] ) : '' )

    Your second post was great!


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show toto results in raking’ is closed to new replies.