Radio Streaming - 50% Lifetime Discount with purchase of any Joomla Web Radio Addon. Discount Code: STR15-Z
See Radio Streaming Plans

Results 1 to 5 of 5

Thread: Hidden predictions

  1. #1

    Hidden predictions

    Hi,

    just a a quick question. Is there a way to hide a players Predictions until game started, like the hidden in championship.

    regards

  2. #2
    Administrator
    Join Date
    Jul 2015
    Posts
    65
    Hello,
    you could add some code in the file <joomla directory>/components/com_masterleaguepro/views/playerprediction/tmpl/default.php

    the following line should be around line 173
    Code:
    <td><?php echo $item->home_prediction."-".$item->away_prediction; ?></td>
    you should do something like that
    Code:
    <?php 
    if( $item->match_start_time <= date("Y-m-d H:i:s") ){
    ?>
        <td><?php echo $item->home_prediction."-".$item->away_prediction; ?></td>
    <?php
    }else{
        echo "hidden";
    }
    ?>
    note that this code was not tested , please take backup of the file you are about to change, so you can restore it. We will consider in future updates of the component to add this functionality as optional (admin would be able to chose if he want to hide the user predictions until the game starts.

    Best Regards

  3. #3
    Hi,
    I tried changing the code for this but it didn't work. Got the word Hidden a number of times above the predictions. Thanks for taking a look.
    Regards

  4. #4
    Administrator
    Join Date
    Jul 2015
    Posts
    65
    Hello sorry the code had a mistake and the text hidden was not an element of the table try using this one

    Code:
    <?php 
    if( $item->match_start_time <= date("Y-m-d H:i:s") ){
    ?>
        <td><?php echo $item->home_prediction."-".$item->away_prediction; ?></td>
    <?php
    }else{
        echo "<td>hidden</td>";
    }
    ?>

  5. #5
    Hi,
    I have inserted the code and tested, all works great, many thanks for your help, regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •