Thread Starter
grunk
(@grunk)
I reply to myself :
To customize the display of the widget and the standing i just edit the standing-*.php in the template folder :
1 – Create the following folder /wp-content/theme/your-theme/leaguemanager
2 – Past the required standing file. (ie : i’m using only compact so i copied standing-compact.php from plugin/leaguemanager/template/
3 – Edit the previous file.
In my case i did this change :
<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">G</th>
<?php endif; ?>
<th class="num">W</th>
<th class="num">L</th>
<th class="num">%</th>
</tr>
<?php if ( $teams ) : ?>
<?php foreach( $teams AS $team ) : ?>
<tr class='<?php echo $team->class ?>'>
<td class='rank'><?php echo $team->rank ?></td>
<td class="num"><?php echo $team->status ?></td>
<?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><?php echo $team->title ?></td>
<?php if ( 1 == $league->standings['pld'] ) : ?>
<td class='num'><?php echo $team->done_matches ?></td>
<td class='num'><?php echo $team->won_matches ?></td>
<td class='num'><?php echo $team->lost_matches ?></td>
<td class='num'><?php echo round($team->won_matches/$team->done_matches,3) ?></td>
<?php endif; ?>
</tr>
That’s it ! You can now enjoy your new standings and widget 🙂
Hello grunk,
i am the admin for a baseball club website and your topic has been very useful.
quick question : our website displays results for several teams, including french little league teams, and the points format is not the same :
•for adults it is a percentage, like the template you posted
•for little league it is a simple number of points.
Do you know how to mix the 2 ?? How to add your template to the template list in the widget by example ?
I hope you still read the posts on this thread 😉
Thank you in advance
Suzanne
I reply to myself too 😉
In the folder /wp-content/theme/your-theme/leaguemanager I put the 2 standings templates :
•standing-compact.php taken from the plugin, that i use for little league (results displayed as POINTS)
•standing-extend.php that I edited with your code above, that i use for all other games (results displayed as %)
Suzanne
Thread Starter
grunk
(@grunk)
Merci pour l’auto réponse 🙂
Ca pourra peut être nous servir aussi , club français aussi (duc-baseball.org) on affiche pour le moment que les résultat baseball/softball senior donc en %