roland.griesser
Forum Replies Created
-
Forum: Plugins
In reply to: [LeagueManager] Overtime Lost, Overtime WonOk now I see whats wrong with your code, this also explains the “0-0” problem ??
You have inserted the columns in the wrong order, as i mentioned above: In the header, you have “M?l Diff OTW OTL”, but in the table itself you have OTW and OTL first.
I guess you have fixed the 0-0 problem in the league settings, point format? You can change it back to %d-%d, so that the goals are displayed correctly.
Then change your displayStandingsColumns to the following code, and your columns should be in the right order and OTW and OTL should also be right-aligned:function displayStandingsColumns( $team, $rule ) { global $leaguemanager; $league = $leaguemanager->getCurrentLeague(); echo '<td class="num">'; if ( is_admin() && $rule == 'manual' ) echo '<input type="text" size="2" name="custom['.$team->id.'][points2][plus]" value="'.$team->points2_plus.'" /> : <input type="text" size="2" name="custom['.$team->id.'][points2][minus]" value="'.$team->points2_minus.'" />'; else printf($league->point_format2, $team->points2_plus, $team->points2_minus); echo '</td>'; echo '<td class="num">'.$team->diff.'</td>'; echo '<td class="num">'.$this->getNumWonMatchesOvertime($team->id).'</td>'; echo '<td class="num">'.$this->getNumLostMatchesOvertime($team->id).'</td>'; }
regards
Forum: Plugins
In reply to: [LeagueManager] Overtime Lost, Overtime WonCan you please send me the content of your displayStandingsColumns function?
$league = $leaguemanager->getCurrentLeague(); echo '<td class="num">'; if ( is_admin() && $rule == 'manual' ) echo '<input type="text" size="2" name="custom['.$team->id.'][points2][plus]" value="'.$team->points2_plus.'" /> : <input type="text" size="2" name="custom['.$team->id.'][points2][minus]" value="'.$team->points2_minus.'" />'; else printf($league->point_format2, $team->points2_plus, $team->points2_minus); echo '</td>'; echo '<td class="num">'.$team->diff.'</td>';
In the original code, the goal and diff-columns have the class “num”, which right-aligns them. In your source-code, the two columns are missing the “num”-class. If you add the class, these two columns should also be right-aligned.
regards
Forum: Plugins
In reply to: [LeagueManager] Overtime Lost, Overtime WonMake sure to insert the columns in the same direction both in the displayStandingsHeader and displayStandingsColumns functions. I think that you have the goals displayed in the OTW column.
To right-align your columns, just edit the file “leaguemanager/style.css” and change the following codetable.leaguemanager .num { text-align: center; }
to
table.leaguemanager .num { text-align: right; }
Regards!
Forum: Plugins
In reply to: [LeagueManager] Overtime Lost, Overtime WonHi,
I had the same issue (OTW and OTL only):
Just edit the file hockey.php in the folder ‘leaguemanager\sports’.
There you insertecho '<th>OTW</th><th>OTL</th>';
into the functiondisplayStandingsHeader()
.
Then, in thedisplayStandingsColumns
function, insertecho '<td>'.$this->getNumWonMatchesOvertime($team->id).'</td>'; echo '<td>'.$this->getNumLostMatchesOvertime($team->id).'</td>';
after the line
global $leaguemanager;
Best regards