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

    (@antoineh)

    Sorry, don’t understand what you mean. Maybe it’s too late, or I’ve been looking at too many questions, but can you explain a bit more? Or give some examples of the (relative) URL’s so I can relate to the correct part of the plugin?

    Thread Starter dekkerpj

    (@dekkerpj)

    The relative URL is /user. You get there by clicking on a user name in the ranking or by selecting All predictions from the menu.
    You defined the lead sentence on that page to be:
    Below are all the predictions for <username>.
    Only matches and bonus questions that can’t be changed are shown here.

    At this moment in Euro 2016, you’d expect to see the users’predictions for the 4 matches that have been played. However, it shows the inverse: only the matches that have not yet been played (and then of course without filled-in score since it can still be changed).

    Note: I used a filter you provided for limiting the list of matches to do just that on a users’ personal predicion sheet (URL: /pool): to show only the matches for which the result can still be changed. It should have no influence on the /user page but I thought I’d mention it.

    By the way, I notice you’re working long and late and probably wish have a private life too. Thanks and be aware of the balance.

    Plugin Author AntoineH

    (@antoineh)

    OK, the filter is the culprit. I guess we are using a filter for the matches that is too generic.

    I see that the function that is used for the pool and the user page allows us to differentiate between the two pages, but only if we use this filter.

    Quote from the function:

    $matches = apply_filters( 'footballpool_predictionform_matches_filter', $matches, $user_id, $is_user_page );

    Thread Starter dekkerpj

    (@dekkerpj)

    Thanks Antoine, I agree that the filter is the cause. Deactivating it solves the problem.
    I see your quoted function in line 504 of class-football-pool-matches.php. But what change then do you suggest?

    Plugin Author AntoineH

    (@antoineh)

    I suggest using this filter instead of the other one. And to use the $is_user_page variable to determine what to do (change matches, or do nothing with the data set).

    Thread Starter dekkerpj

    (@dekkerpj)

    thanks, I’ll do that

    Horst

    (@silberfuchs)

    Hi,

    I exactly have the same “problem” but I am not very good in “programming” – could you please help me to change this filter in a detailed way.

    Thanks a lot!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘User predictions show only future matches’ is closed to new replies.