Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ok 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

    Can 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

    Make 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 code

    table.leaguemanager .num {
    	text-align: center;
    	}

    to

    table.leaguemanager .num {
    	text-align: right;
    	}

    Regards!

    Hi,

    I had the same issue (OTW and OTL only):

    Just edit the file hockey.php in the folder ‘leaguemanager\sports’.
    There you insert echo '<th>OTW</th><th>OTL</th>'; into the function displayStandingsHeader().
    Then, in the displayStandingsColumns function, insert

    echo '<td>'.$this->getNumWonMatchesOvertime($team->id).'</td>';
    echo '<td>'.$this->getNumLostMatchesOvertime($team->id).'</td>';

    after the line global $leaguemanager;

    Best regards

Viewing 4 replies - 1 through 4 (of 4 total)