WordPress.org

Ready to get started?Download WordPress

Forums

LeagueManager
[resolved] Delete diff column from standings table (7 posts)

  1. erknrio
    Member
    Posted 10 months ago #

    Hello!

    I try to delete the diff column (only this) from the standings-extend.php file. Looking for a solution I found this code in the soccer.php file:

    echo '<td class="num">'.$team->diff.'</td>';

    If I comment this line, boom! the web explodes and pieces of code for all sides :-).

    I changed the name of the original file to soccer-original.php (backup) and uploaded the modify soccer.php file, but this throw an error:

    Fatal error: Cannot redeclare class LeagueManagerSoccer in myDomain/leaguemanager/sports/soccer-original.php on line 243

    New: I uploaded again the soccer.php file but without the commented line and throw the same error :-|.

    I need help with this. Thank you very much.

    http://wordpress.org/plugins/leaguemanager/

  2. ben52
    Member
    Posted 10 months ago #

    you have to modify: standings-extend.php file is in templates folder not soccer.php file

  3. erknrio
    Member
    Posted 10 months ago #

    Well, what line of code?

    <?php do_action( 'leaguemanager_standings_columns_'.$league->sport, $team, $league->point_rule ) ?>
    <td class='num' title="Puntos"><?php echo $team->points ?></td>

    This line show Dif & Points but it call other function. Ok, tell me what code modify in this line (or template) and I will do it ;-).

  4. VersusMx
    Member
    Posted 10 months ago #

    I too have the same problem.
    <td class='num'><?php echo $team->points ?></td>
    This code does not show the total points accumulated by the team but (probably) the goals scored.
    How can I fix the problem?

  5. erknrio
    Member
    Posted 10 months ago #

    I resolved my own problem. I explain the steps I did:

    STEP 1
    I needed the information from the $team variable but I don't knew how to get it. I used the

    <?php vardump($team); ?>

    to know which were the $team options.

    STEP 2
    I created a new template for the standings that I needed. I changed the "standings-extend.php" to "standings-soccer.php"

    STEP 3
    Delete this lines of code:
    Form th

    <?php do_action( 'leaguemanager_standings_header_'.$league->sport ) ?>

    From td

    <?php do_action( 'leaguemanager_standings_columns_'.$league->sport, $team, $league->point_rule ) ?>

    STEP 4
    Add this new lines in the position of the deleted lines:

    From th

    <th class="num">F:C</th>

    From td

    <td class='num'><?php echo $team->points2 ?></td>
    <td class='num'><?php echo $team->points ?></td>

    STEP 5
    In your post/page change the standings mode from extend (or other that you have) to your own template.

    VersusMx if your have another question do it otherwise I mark this topic as resolved.

  6. erknrio
    Member
    Posted 10 months ago #

    This is my standings-soccer-php (sorry for spanish comments):

    <?php if ( isset($_GET['team']) && !$widget ) : ?>
    <?php leaguemanager_team($_GET['team']); ?>
    <?php else : ?>

    <?php if ( $teams ) : ?>

    <table class="leaguemanager standingstable" summary="" title="<?php _e( 'Standings', 'leaguemanager' ) .' '.$league->title ?>">
    <tr>
    <th class="num"><?php echo _c( 'Pos|Position', 'leaguemanager' ) ?></th>
    <th class="num"> </th>
    <?php if ( $league->show_logo ) : ?>
    <th class="logo"> </th>
    <?php endif; ?>

    <th><?php _e( 'Team', 'leaguemanager' ) ?></th>
    <?php if ( 1 == $league->standings['pld'] ) : ?>
    <th class="num" title="Jugados"><?php _e( 'Pld', 'leaguemanager' ) ?></th>
    <?php endif; ?>
    <?php if ( 1 == $league->standings['won'] ) : ?>
    <th class="num" title="Ganados"><?php echo _c( 'G|Ganados','leaguemanager' ) ?></th>
    <?php endif; ?>
    <?php if ( 1 == $league->standings['tie'] ) : ?>
    <th class="num" title="Empatados"><?php echo _c( 'E|Empates','leaguemanager' ) ?></th>
    <?php endif; ?>
    <?php if ( 1 == $league->standings['lost'] ) : ?>
    <th class="num" title="Perdidos"><?php echo _c( 'P|Perdidos','leaguemanager' ) ?></th>
    <?php endif; ?>
    <th class="num" title="Goles Favor: Goles Contra">GF:GC</th>
    <th class="num" title="Puntos"><?php _e( 'Pts', 'leaguemanager' ) ?></th>
    </tr>
    <?php if ( $teams ) : ?>
    <?php foreach( $teams AS $team ) : ?>

    <tr class='<?php echo $team->class ?>'>
    <td class='rank'><?php echo $team->rank ?></td><!--posicion-->
    <td class="num"><?php echo $team->status ?></td><!--flechita -->
    <?php if ( $league->show_logo ) : ?>
    <td class="logo">
    <?php if ( $team->logo != '' ) : ?>
    <img src='<?php echo $team->logoURL ?>' alt='<?php _e('Logo','leaguemanager') ?>' title='<?php _e('Logo','leaguemanager')." ".$team->title ?>' />
    <?php endif; ?>
    </td>
    <?php endif; ?>

    <td title="<?php echo $team->title ?>">pageURL ?>"><?php echo $team->title ?></td>
    <?php if ( 1 == $league->standings['pld'] ) : ?>
    <td class='num' title="Partidos Jugados"><?php echo $team->done_matches ?></td>
    <?php endif; ?>
    <?php if ( 1 == $league->standings['won'] ) : ?>
    <td class='num' title="Partidos Ganados"><?php echo $team->won_matches ?></td>
    <?php endif; ?>
    <?php if ( 1 == $league->standings['tie'] ) : ?>
    <td class='num' title="Partidos Empatados"><?php echo $team->draw_matches ?></td>
    <?php endif; ?>
    <?php if ( 1 == $league->standings['lost'] ) : ?>
    <td class='num' title="Partidos Perdidos"><?php echo $team->lost_matches ?></td>
    <?php endif; ?>
    <td class='num' title="Goles Favor: Goles Contra"><?php echo $team->points2 ?></td>
    <td class='num' title="Puntos"><?php echo $team->points ?></td>
    </tr>
    <?php endforeach; ?>
    <?php endif; ?>
    </table>
    <h6>Si encuentra algún error en la clasificación, por favor, comuníquelo a soporte@marchadeportiva.com</h6>
    <?php endif; ?>
    <?php endif; ?>

  7. erknrio
    Member
    Posted 10 months ago #

    Solved :).

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.