PDA

View Full Version : views playerhistory tmpl default.php



raven00
27-09-2017, 05:13 PM
hi,
what code should be in line 110 in <!--<td><?php ?></td>--> ?
This is reference to line 96 <!--<th><?php echo JText::_("COM_MULTILEAGUE_WL"); ?></th>-->
Its empty, maybe for future solutions?

Or maybe you can help me with this.
My players want to know how many points they get for every match. How can i do that?

thank you.

raven00
20-12-2017, 09:01 PM
still current :)

ekosak
26-02-2018, 06:30 PM
Hi, I created this code to write the points on this page.It is not perfect, but it can be improved.
In this case the correct result is 18 points and the result is 9.
In line 96
<th><?php echo "Points"; ?></th>
in line 110
<td><?php
if ($item->home_score_prediction == $item->home_team_score AND $item->away_score_prediction == $item->away_team_score) {
echo "18";
}


elseif ( ($item->home_score_prediction < $item->away_score_prediction AND $item->home_team_score < $item->away_team_score) OR
($item->home_score_prediction > $item->away_score_prediction AND $item->home_team_score > $item->away_team_score) OR
($item->home_score_prediction == $item->away_score_prediction AND $item->home_team_score == $item->away_team_score) ) {


echo "9";
}


if ( ($item->home_score_prediction < $item->away_score_prediction AND $item->home_team_score > $item->away_team_score) OR
($item->home_score_prediction > $item->away_score_prediction AND $item->home_team_score <= $item->away_team_score) OR
($item->home_score_prediction == $item->away_score_prediction AND $item->home_team_score !== $item->away_team_score) ) {


echo "0" ;
}


?></td>

See result ins https://bembolao.com/index.php/classificacao?view=playerhistory&mluser=730
No is perfect.Its works.

vbadmin
27-02-2018, 03:59 PM
ekosak (http://www.multihosting.com/support/forum/member.php/1040-ekosak), thank you for your contribution at Master-League!

Regards,
Nikos

raven00
02-03-2018, 09:53 PM
hi,
thanks!

I add
OR
($item->home_score_prediction < $item->away_score_prediction AND $item->home_team_score == $item->away_team_score)
) {


echo "0" ;
}

and it works better I think. Try and see in draw results.

ekosak
03-03-2018, 06:07 PM
Hi, thanks
Right. One problem still persists. When the game did not happen in the draws shows the score.
And I still try to show the sum on this page.