Plugin Directory

Changeset 3177772


Ignore:
Timestamp:
10/29/2024 08:29:41 AM (16 months ago)
Author:
beardev
Message:

v 3.0.3

Location:
joomsport-prediction
Files:
88 added
4 edited

Legend:

Unmodified
Added
Removed
  • joomsport-prediction/trunk/joomsport-prediction.php

    r3131650 r3177772  
    44Plugin URI: http://joomsport.com
    55Description: Create sport predictions for your JoomSport matches
    6 Version: 3.0.2
     6Version: 3.0.3
    77Author: BearDev
    88Author URI: http://BearDev.com
  • joomsport-prediction/trunk/readme.txt

    r3131650 r3177772  
    55Tested up to: 6.6
    66Requires PHP: 7.4
    7 Stable tag: 3.0.2
     7Stable tag: 3.0.3
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
    1010
    11 Create sport predictions for your JoomSport matches. 
     11Orginize Sports Predictions game for your site users to improve fun engagement. Matches are taken from JoomSport plugin & updated automatically!
    1212
    1313== Description ==
     
    8888== Changelog ==
    8989
     90= 3.0.3 =
     91Mobile view improvement for scores predict page.
     92
    9093= 3.0.2 =
    9194New type of round: Outcome prediction (pick the winner). Available in pro version only.
  • joomsport-prediction/trunk/sportleague/assets/css/prediction.css

    r3131650 r3177772  
    731731    }
    732732}
     733
     734/* Mobile round matches */
     735.jsMatchPredContainer {
     736    margin-bottom: 20px;
     737}
     738.jsMatchPredItem {
     739    border: 1px solid #e4e7ed;
     740    border-radius: 4px;
     741    background-color: #ffffff;
     742}
     743.jsMatchPredItem:not(:last-child) {
     744    margin-bottom: 15px;
     745}
     746.jsMatchPredHeader, .jsMatchPredMain, .jsMatchPredFooter {
     747    display: flex;
     748    align-items: center;
     749    justify-content: space-between;
     750    padding: 10px 15px;
     751}
     752.jsMatchPredHeader {
     753    border-bottom: 1px solid #e4e7ed;
     754    font-weight: 700;
     755    background: #f5f7f9;
     756}
     757.jsMatchPredLink {
     758    font-weight: 400;
     759}
     760.jsMatchPredMain {
     761    font-size: 14px;
     762}
     763.jsMatchPredTeams {
     764    display: flex;
     765    flex-direction: column;
     766    gap: 10px;
     767}
     768.jsMatchPredTeam {
     769    display: flex;
     770    align-items: center;
     771    min-height: 50px;
     772}
     773#joomsport-container .jsMatchPredTeam img {
     774    min-width: auto;
     775    border: none;
     776    padding: 0;
     777    background-color: transparent;
     778}
     779.jsMatchPredScore {
     780    align-self: stretch;
     781}
     782.jsMatchPredScore .jsScoreDivM, .jsMatchPredScore .jsp_prediction_score {
     783    display: flex;
     784    flex-direction: column;
     785    justify-content: space-around;
     786    height: 100%;
     787    gap: 10px;
     788}
     789.jsMatchPredScore .jsScoreDivM {
     790    position: relative;
     791    min-width: 20px;
     792}
     793.jsMatchPredScore .jsScoreDivM > .jscalendarLiveBig {
     794    top: 50%;
     795    bottom: auto;
     796    right: 0;
     797    left: auto;
     798    min-width: auto;
     799    margin: 0;
     800    transform: translateY(-50%);
     801}
     802.jsMatchPredScore .jsScoreDivM > .BigMScore1, .jsMatchPredScore .jsScoreDivM > .BigMScore2 {
     803    width: auto;
     804    padding: 0;
     805    font-size: 18px;
     806    color: inherit;
     807    background-color: transparent;
     808}
     809.jsMatchPredScore .jsp_prediction_score {
     810    min-width: auto;
     811    font-size: 0px;
     812}
     813.jsMatchPredFooter {
     814    border-top: 1px solid #e4e7ed;
     815    font-weight: 700;
     816}
     817.jsMatchPredScorePredicted > .jsp_prediction_score {
     818    display: inline-block;
     819}
  • joomsport-prediction/trunk/sportleague/views/default/userround.php

    r2568296 r3177772  
    88            $user = new WP_User($rows->usrid);
    99            $uname = $user->data->display_name;
     10
    1011            echo '<div class="jsPredUsrTitle">';
    1112            echo get_avatar( $user->data->user_email, $size = '24');
     
    1819        <?php
    1920        $ddList = $rows->getRoundDD();
     21
    2022        echo '<div class="jswDDRounds">';
    2123        ?>
     
    3436<div>
    3537    <form action="" method="post" name="jspRound" id="jspRound">
    36     <div class="table-responsive">
    37         <?php do_action("jspred_saved_notice");?>
    38         <div class="jstable">
    39            
    40             <div class="jstable-row">
    41                     <div class="jstable-cell">
    42                         <?php echo __('Date and time','joomsport-prediction');?>
    43 
    44                     </div>
    45                     <div class="jstable-cell">
    46                         <?php echo __('Participant','joomsport-prediction');?>
    47 
    48                     </div>
    49                     <div class="jstable-cell">
    50                         <?php echo __('Participant','joomsport-prediction');?>
    51 
    52                     </div>
    53                     <div class="jstable-cell jsalcenter">
    54                         <?php echo __('Prediction','joomsport-prediction');?>
    55 
    56                     </div>
    57                     <div class="jstable-cell jsalcenter">
    58                         <?php echo __('FT','joomsport-prediction');?>
    59                         <?php echo __('Score','joomsport-prediction');?>
    60 
    61                     </div>
    62                     <div class="jstable-cell jsalcenter">
    63                         <?php echo __('Points','joomsport-prediction');?>
    64 
     38        <?php if (jsHelper::isMobile()): ?>
     39            <div class="jsMatchPredContainer">
     40                <?php do_action("jspred_saved_notice");?>
     41               
     42                <?php
     43                for ($intA = 0; $intA < count($lists['matches']); ++$intA) {
     44                    $match = $lists['matches'][$intA];
     45
     46                    $m_played = get_post_meta( $match->id, '_joomsport_match_played', true );
     47                    ?>
     48                    <div class="jsMatchPredItem">
     49                        <div class="jsMatchPredHeader">
     50                            <div class="jsMatchPredDate">
     51                                <?php
     52                                $m_date = get_post_meta( $match->id, '_joomsport_match_date', true );
     53                                $m_time = get_post_meta( $match->id, '_joomsport_match_time', true );
     54                                $match_date = classJsportDate::getDate($m_date, $m_time);
     55
     56                                echo $match_date;
     57                                ?>
     58                            </div>
     59                            <div class="jsMatchPredLink">
     60                                <?php echo classJsportLink::match(__('View Match','joomsport-prediction'), $match->id, false, '', 0); ?>
     61                            </div>
     62                        </div>
     63                        <div class="jsMatchPredMain">
     64                            <div class="jsMatchPredTeams">
     65                                <div class="jsMatchPredTeam">
     66                                    <?php
     67                                    $partic_home = $match->getParticipantHome();
     68
     69                                    if(is_object($partic_home)){
     70                                        echo $partic_home->getEmblem(true, 0, '');
     71                                        echo jsHelper::nameHTML($partic_home->getName(true));
     72                                    }
     73                                    ?>
     74                                </div>
     75                                <div class="jsMatchPredTeam">
     76                                    <?php
     77                                    $partic_away = $match->getParticipantAway();
     78
     79                                    if(is_object($partic_away)){
     80                                        echo $partic_away->getEmblem(true, 0, '');
     81                                        echo jsHelper::nameHTML($partic_away->getName(true));
     82                                    }
     83                                    ?>
     84                                </div>
     85                            </div>
     86                            <div class="jsMatchPredScore">
     87                                <?php
     88                                if($m_played == 0) {
     89                                    echo $rows->getPredict($match->id);
     90                                } elseif($m_played == 1 || $m_played == -1) {
     91                                    echo jsHelper::getScoreBigM($match);
     92                                }
     93                                ?>
     94                            </div>
     95                        </div>
     96
     97                        <?php if($m_played == 1 || $m_played == -1): ?>
     98                            <div class="jsMatchPredFooter">
     99                                <?php
     100                                echo '<div class="jsMatchPredScorePredicted">'.__('Prediction','joomsport-prediction').': '.$rows->getPredict($match->id).'</div>';
     101
     102                                if($m_played == 1){
     103                                    echo '<div class="jsMatchPredScorePoints">'.__('Points','joomsport-prediction').': '.$rows->getMatchPoint($match->id).'</div>';
     104                                }
     105                                ?>
     106                            </div>
     107                        <?php endif; ?>
    65108                    </div>
    66109                    <?php
    67                     if($joker_match){
    68                         ?>
    69                         <div class="jstable-cell jsalcenter">
    70                             <?php echo __('Joker','joomsport-prediction');?>
    71 
     110                }
     111                ?>
     112            </div>
     113            <?php else: ?>
     114                <div class="table-responsive">
     115                    <?php do_action("jspred_saved_notice");?>
     116                    <div class="jstable">
     117                        <div class="jstable-row">
     118                            <div class="jstable-cell">
     119                                <?php echo __('Date and time','joomsport-prediction');?>
     120                            </div>
     121                            <div class="jstable-cell">
     122                                <?php echo __('Participant','joomsport-prediction');?>
     123                            </div>
     124                            <div class="jstable-cell">
     125                                <?php echo __('Participant','joomsport-prediction');?>
     126                            </div>
     127                            <div class="jstable-cell jsalcenter">
     128                                <?php echo __('Prediction','joomsport-prediction');?>
     129                            </div>
     130                            <div class="jstable-cell jsalcenter">
     131                                <?php echo __('FT','joomsport-prediction');?>
     132                                <?php echo __('Score','joomsport-prediction');?>
     133                            </div>
     134                            <div class="jstable-cell jsalcenter">
     135                                <?php echo __('Points','joomsport-prediction');?>
     136                            </div>
     137                            <?php
     138                            if($joker_match){
     139                                ?>
     140                                <div class="jstable-cell jsalcenter">
     141                                    <?php echo __('Joker','joomsport-prediction');?>
     142                                </div>
     143                                <?php
     144                            }
     145                            ?>
    72146                        </div>
    73147                        <?php
    74                     }
    75                     ?>
    76 
    77                 </div>
    78             <?php
    79             for ($intA = 0; $intA < count($lists['matches']); ++$intA) {
    80                 $match = $lists['matches'][$intA];
    81                 ?>
    82                 <div class="jstable-row">
    83                     <div class="jstable-cell">
    84                         <?php
    85                         $m_date = get_post_meta( $match->id, '_joomsport_match_date', true );
    86                         $m_time = get_post_meta( $match->id, '_joomsport_match_time', true );
    87                         $match_date = classJsportDate::getDate($m_date, $m_time);
    88                         echo $match_date;
     148                        for ($intA = 0; $intA < count($lists['matches']); ++$intA) {
     149                            $match = $lists['matches'][$intA];
     150                            ?>
     151                            <div class="jstable-row">
     152                                <div class="jstable-cell">
     153                                    <?php
     154                                    $m_date = get_post_meta( $match->id, '_joomsport_match_date', true );
     155                                    $m_time = get_post_meta( $match->id, '_joomsport_match_time', true );
     156                                    $match_date = classJsportDate::getDate($m_date, $m_time);
     157
     158                                    echo $match_date;
     159                                    ?>
     160                                </div>
     161                                <div class="jstable-cell">
     162                                    <div class="jsDivLineEmbl">
     163                                        <?php
     164                                        $partic_home = $match->getParticipantHome();
     165
     166                                        if(is_object($partic_home)){
     167                                            echo $partic_home->getEmblem(true, 0, '');
     168                                            echo jsHelper::nameHTML($partic_home->getName(true));
     169                                        }
     170                                        ?>
     171                                    </div>
     172                                </div>
     173                                <div class="jstable-cell">
     174                                    <div class="jsDivLineEmbl">
     175                                        <?php
     176                                        $partic_away = $match->getParticipantAway();
     177
     178                                        if(is_object($partic_away)){
     179                                            echo $partic_away->getEmblem(true, 0, '');
     180                                            echo jsHelper::nameHTML($partic_away->getName(true));
     181                                        }
     182                                        ?>
     183                                    </div>
     184                                </div>
     185                                <div class="jstable-cell jsalcenter" style="white-space: nowrap;">
     186                                    <?php echo $rows->getPredict($match->id); ?>
     187                                </div>
     188                                <div class="jstable-cell jsalcenter">
     189                                    <?php echo jsHelper::getScore($match, '','',0, true); ?>
     190                                </div>
     191                                <div class="jstable-cell jsalcenter">
     192                                    <?php echo $rows->getMatchPoint($match->id); ?>
     193                                </div>
     194
     195                                <?php
     196                                if($joker_match){
     197                                    echo '<div class="jstable-cell jsalcenter">';
     198                                    echo $rows->getMatchJoker($match->id);
     199                                    echo '</div>';
     200                                }
     201                                ?>
     202                            </div>
     203                            <?php
     204                        }
    89205                        ?>
    90206                    </div>
    91                     <div class="jstable-cell">
    92                         <div class="jsDivLineEmbl">
    93                             <?php
    94                             $partic_home = $match->getParticipantHome();
    95                             if(is_object($partic_home)){
    96                                 echo $partic_home->getEmblem(true, 0, '');
    97                                 echo jsHelper::nameHTML($partic_home->getName(true));
    98                             }
    99                             ?>
    100                         </div>   
    101                     </div>
    102                     <div class="jstable-cell">
    103                         <div class="jsDivLineEmbl">
    104                         <?php
    105                         $partic_away = $match->getParticipantAway();
    106                         if(is_object($partic_away)){
    107                             echo $partic_away->getEmblem(true, 0, '');
    108                             echo jsHelper::nameHTML($partic_away->getName(true));
    109                         }
    110                         ?>
    111                         </div>
    112                     </div>
    113                     <div class="jstable-cell jsalcenter" style="white-space: nowrap;">
    114                         <?php
    115                         echo $rows->getPredict($match->id);
    116                         ?>
    117                     </div>
    118                     <div class="jstable-cell jsalcenter">
    119                         <?php
    120                         echo jsHelper::getScore($match, '','',0, true);
    121                         ?>
    122                     </div>
    123                     <div class="jstable-cell jsalcenter">
    124                         <?php
    125                         echo $rows->getMatchPoint($match->id);
    126                         ?>
    127                     </div>
    128                     <?php
    129                     if($joker_match){
    130                         echo '<div class="jstable-cell jsalcenter">';
    131 
    132                         echo $rows->getMatchJoker($match->id);
    133                         echo '</div>';
    134 
    135                     }
    136                     ?>
    137207                </div>
     208            <?php endif; ?>
     209
    138210            <?php
     211            if($rows->canSave()){
     212                ?>
     213                <div class="clearfix">
     214                    <input type="hidden" name="jspJoker" id="jspJoker" value="<?php echo $rows->joker_match;?>" />
     215                    <input type="button" class="btn btn-success pull-right button" id="jspRoundSave" value="<?php echo __('Submit my predictions','joomsport-prediction');?>" />
     216                </div>
     217                <?php
    139218            }
    140219            ?>
    141 
    142         </div>
     220            <input type="hidden" name="jspAction" value="saveRound" />
     221        </form>   
    143222    </div>
    144223    <?php
    145     if($rows->canSave()){
    146 
    147     ?>
    148     <div>
    149         <input type="hidden" name="jspJoker" id="jspJoker" value="<?php echo $rows->joker_match;?>" />
    150         <input type="button" class="btn btn-success pull-right button" id="jspRoundSave" value="<?php echo __('Submit my predictions','joomsport-prediction');?>" />
    151     </div>
    152     <?php
    153     }
    154     ?>
    155         <input type="hidden" name="jspAction" value="saveRound" />
    156     </form>   
    157 </div>
    158 <?php
    159224//classJsportAddtag::addJS(JS_LIVE_ASSETS.'js/jsprediction.js');
    160225//classJsportAddtag::addCSS(JS_LIVE_ASSETS.'css/prediction.css');
Note: See TracChangeset for help on using the changeset viewer.