Hi,
Is there a way to change the total matches in the league tables to Games Played. For example instead of showing 140 total matches, (as we do 20 prediction games each week), it would show 7 Games Played ?
Regards
Radio Streaming - 50% Lifetime Discount with purchase of any Joomla Web Radio Addon. Discount Code: STR15-Z
See Radio Streaming Plans
Hi,
Is there a way to change the total matches in the league tables to Games Played. For example instead of showing 140 total matches, (as we do 20 prediction games each week), it would show 7 Games Played ?
Regards
Hello,
if i understood correctly you wish instead of the total matches to show the total match days the user participated?
Best Regards
Hi,
yes, sorry I never made it clear. match day totals rather than total matches.
regards
It is possible
the answer that follows is not the best practice , but in order to apply the changes with the minimum amount of moves it is the best available
you will have to change the code in file <joomla directory>/components/com_masterleaguepro/models/standings.php
near line 55 the following code should be present
you will have to change it toCode:$query="SELECT u.id , u.username,SUM(log.points) as points,SUM(log.win) as win,SUM(log.draw) as draw,SUM(log.lose) as lose,SUM(log.matches_played) as matches_played ,SUM(log.goal_for) as goal_for, SUM(log.goal_against) as goal_against , SUM(log.goal_difference) as goal_difference FROM `#__masterleaguepro_users` mu INNER JOIN `#__users` u ON mu.user_id=u.id INNER JOIN `#__masterleaguepro_user_log` log ON log.user_id=mu.user_id WHERE log.league_id=$league AND mu.league_id=log.league_id GROUP BY mu.user_id ORDER BY points DESC , goal_for DESC , goal_difference DESC";
Best regardsCode:$query="SELECT u.id , u.username,SUM(log.points) as points,SUM(log.win) as win,SUM(log.draw) as draw,SUM(log.lose) as lose,COUNT(DISTINCT log.matchday_id) as matches_played ,SUM(log.goal_for) as goal_for, SUM(log.goal_against) as goal_against , SUM(log.goal_difference) as goal_difference FROM `#__masterleaguepro_users` mu INNER JOIN `#__users` u ON mu.user_id=u.id INNER JOIN `#__masterleaguepro_user_log` log ON log.user_id=mu.user_id WHERE log.league_id=$league AND mu.league_id=log.league_id GROUP BY mu.user_id ORDER BY points DESC , goal_for DESC , goal_difference DESC";
Hi,
Many thanks, this has worked.
Can you let me know which File I need to go to to change the text in the league, would like to change the text total matches to Total Games.
Regards
Last edited by Sjf0464; 19-12-2016 at 08:41 PM.
Hello,
i am glad that i could help, the translation file is located at <joomla directory>/language/en-GB/en-GB.com_masterleaguepro.ini you should be able to find there the text you are looking for.If you are using multiple languages in your joomla installation you can copy that file in the other language directory and support multiple languages.
Best regards.
Hi,
Great thanks for the info, much appreciated
Regards