• Resolved rogeralexander

    (@rogeralexander)


    Can you tell me if it is a way to hide matches and questions older than 24h or just to hide them manually in the prediction page, after they’re over?

    The page I need help with: [log in to see the link]

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

    (@antoineh)

    Hiding matches and questions is possible. Depends a bit on your definition of when they’re “over”.

    By default the plugin will add a CSS class to both stating whether the prediction/answer can be altered or not by the player. If this is enough for you, you can simply add the following to your stylesheet:

    .match.closed, 
    .bonus.closed { 
    	display: none!important; 
    }

    There are also other, more advanced, ways by filtering the output via PHP filters. Examples for those can be found in these extension plugins:
    only open matches
    only matches for this weekend

    You can do the same for questions by searching for the correct filter in the plugin code and then using it in your own plugin / function.

    kleb123

    (@kleb123)

    How can I change the extension plugin to show matches from friday+saturday+sunday (and not only saturday+sunday)? I tried to ad some lines, but with no/wrong result

    Plugin Author AntoineH

    (@antoineh)

    I guess you’re referring to the “only matches for this weekend” extension.

    I’m not sure, but it should be something like this. I didn’t test it.

    			if ( $day === 5 ) {
    				// Friday
    				$startOfRange = strtotime( 'today+00:00' );
    				$endOfRange = strtotime( 'today+00:00 +7 days' );
    			} elseif ( $day === 6 ) {
    				// Saturday
    				$startOfRange = strtotime( 'today+00:00 -1 days' );
    				$endOfRange = strtotime( 'today+00:00 +6 days' );
    			} elseif ( $day === 7 ) {
    				// Sunday
    				$startOfRange = strtotime( 'today+00:00 -2 days' );
    				$endOfRange = strtotime( 'today+00:00 +5 days' );
    			} else {
    				// all other days
    				$startOfRange = strtotime( 'next Friday+00:00' );
    				$endOfRange = strtotime( 'next Friday+00:00 +7 days' );
    			}
    kleb123

    (@kleb123)

    Thanks but that one didn’t work; today (Friday) all games were hidden (so Friday Saturday Sunday).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hiding matches and questions that are over’ is closed to new replies.