• In my site, I have around 3.5K+ members. Surely all of them are not going to participate in the pool. In the ranking page and also in the predictions page I would like to include members only who have been participated at least in one match and omit others from the calculation. Right now, it takes around 2.5 hours to calculate the scores every time. Any idea how can I tackle this issue? Thanks in advance.

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

    (@antoineh)

    You can try to write an SQL query that selects all users without any predictions. With this data set you can then exclude them from the plugin.

    If you are using leagues, then you delete the users from the pool_wp_league_users table. If you are not using leagues, then set the league_id for these users to “0” in the pool_wp_league_users table.

    Thread Starter Zihad Tarafdar

    (@xihad76)

    I am using No league mode.
    When I go to pool_wp_league_users table, I see only two rows.
    I am confused what to do now. Ranking in the front-end works fine though, showing all the members of the site.

    Plugin Author AntoineH

    (@antoineh)

    If you are using ‘no league’ mode, then you can exclude players from the pool (and the ranking calculation) by adding a record to this league_users table with league 0.

    You can do this by clicking each user in the User admin of the plugin. Or automated by inserting records in the database via SQL.

    e.g. if user with ID 49 should be excluded, then do this:

    INSERT INTO pool_wp_league_users
      ( user_id, league_id ) 
    VALUES 
      ( 49, 0 );

    And if you manage to write a query that selects all users without at least one prediction, then you can create a script to add records for all these users.

    Thread Starter Zihad Tarafdar

    (@xihad76)

    Thanks, I got it.
    But, what if a member,currently excluded but want to join the prediction game, at a later date? Is there any auto-join mechanism which will include him in the pool as soon as he/she predicts a game? I think this would be very useful for site with a large number of userbase. If I pre-allow all members,it takes really long time to calculate (2 hours+)

    Thank you for your prompt response,by the way.

    Plugin Author AntoineH

    (@antoineh)

    There is no automated mechanism in the plugin. But it should be relatively easy to write a shortcode for example, that shows a button to join (which you then add to a page or widget).
    And if you won’t be able to write this, then maybe a contact form via a plugin to request access?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude members who didn’t participate yet’ is closed to new replies.