How to modify ranking computation

Status: closed!
This is the Release Candidate 1 for Joomla 1.5 native.

Moderator: And_One

digiacomo.antonio
Newbie
Posts: 5
Joined: Tue Nov 29, 2011 3:10 pm

How to modify ranking computation

Postby digiacomo.antonio » Tue Jan 24, 2012 7:09 pm

Hello everyone,
I'm using Joomla 1.5/Joomleague 1.5.3 (karina) as Rugby.
Everything seems to work fine but I want add a "goals" managing feature in the administration panel.
As you may know in Rugby, difference between goals in a match leads to a bonus score computation.
Now I managed to add Goals input fields in the list-matches view by adding appropriate fields in the database and corresponding input text fields in the html in file /administrator/components/com_joomleague/views/matches/tmpl/default_matches.php

Now... my problem is I can't figure out where is Ranking computation. I need to modify Ranking computation to make it consider Goals in the calculus.

ANY help is very appreciated.

Thanks

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: How to modify ranking computation

Postby timoline » Tue Jan 24, 2012 7:54 pm

I really dont understand why you did this.... :confused: , there is a goal ranking criteria isnt it?
But okey... ranking is calculated in helpers/ranking.php

tip: read the wiki about howto create a (rugby)extensions....
Joomla 1.5.x
Joomleague 1.5.....latest git version

User avatar
comraden
Joomleague Core Developer
Joomleague Core Developer
Posts: 1291
Joined: Thu Aug 16, 2007 2:27 pm
Location: Poland, Lublin
Contact:

Re: How to modify ranking computation

Postby comraden » Tue Jan 24, 2012 8:27 pm

digiacomo.antonio wrote:As you may know in Rugby, difference between goals in a match leads to a bonus score computation.

Could U explain?
http://llk.pl::jl_1.6 | jl_2.x | jl_3.x testing/production enviroment
samiec alfa koncernu 'Cham_Burak_Prostak' || proved: the most annoying person on the forum

digiacomo.antonio
Newbie
Posts: 5
Joined: Tue Nov 29, 2011 3:10 pm

Re: How to modify ranking computation

Postby digiacomo.antonio » Wed Jan 25, 2012 9:03 am

timoline wrote:I really dont understand why you did this.... :confused: , there is a goal ranking criteria isnt it?
But okey... ranking is calculated in helpers/ranking.php

tip: read the wiki about howto create a (rugby)extensions....

I'm php developer but I'm not an expert in either Joomla, Joomleague and Rugby in general. Actually I don't see any goal ranking... is it an additional module a have to install?
All I see in the team is this
Image
in the Results column you set the score, near by there is the Goal column (which is the one I added).
Where is the goal ranking criteria?

digiacomo.antonio
Newbie
Posts: 5
Joined: Tue Nov 29, 2011 3:10 pm

Re: How to modify ranking computation

Postby digiacomo.antonio » Wed Jan 25, 2012 9:12 am

comraden wrote:
digiacomo.antonio wrote:As you may know in Rugby, difference between goals in a match leads to a bonus score computation.

Could U explain?

if you beat the opposite team by 4 or more goal difference
you get +1 bonus score (attack score)
if you get beaten by the opposite team by 1 to 7 goal difference you get +1 bonus score (defence score).

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: How to modify ranking computation

Postby timoline » Wed Jan 25, 2012 10:07 am

http://www.joomleague.at/dokuwiki/doku ... gs:ranking

But normally the results=goals, in the matchdetails you can add bonus (penalty points) if this is what you mean?
Joomla 1.5.x
Joomleague 1.5.....latest git version

User avatar
comraden
Joomleague Core Developer
Joomleague Core Developer
Posts: 1291
Joined: Thu Aug 16, 2007 2:27 pm
Location: Poland, Lublin
Contact:

Re: How to modify ranking computation

Postby comraden » Wed Jan 25, 2012 10:09 am

if you beat the opposite team by 4 or more goal difference
you get +1 bonus score (attack score)
if you get beaten by the opposite team by 1 to 7 goal difference you get +1 bonus score (defence score).

I'm too stupid to understand this explanation :bash:
Lets see match result
Rugby Rovato vs Rugby Lecco
Result 9:11
Goals 6:5
:confused:
Who win? I don't know ...
For example, when Rovato put ball in Lecco field (try), scored 5 points (as I know rugby rules).
Penalty, conversion, drop-goal
Where this points added? to Goals or Results?
And there is some calculation beetwen? Goals to Results or Results to Goals?
bonus attack score? bonus defence score? WHERE PUT THIS POINTS?
http://llk.pl::jl_1.6 | jl_2.x | jl_3.x testing/production enviroment
samiec alfa koncernu 'Cham_Burak_Prostak' || proved: the most annoying person on the forum

User avatar
comraden
Joomleague Core Developer
Joomleague Core Developer
Posts: 1291
Joined: Thu Aug 16, 2007 2:27 pm
Location: Poland, Lublin
Contact:

Re: How to modify ranking computation

Postby comraden » Wed Jan 25, 2012 10:20 am

digiacomo.antonio wrote:[
I'm php developer but I'm not an expert

OK, lets see the true comraden's face:
Stand in front of the wall, lean forward, close Your eyes and run as fast as U can ....
Maybe this give U some light ;)
http://llk.pl::jl_1.6 | jl_2.x | jl_3.x testing/production enviroment
samiec alfa koncernu 'Cham_Burak_Prostak' || proved: the most annoying person on the forum

digiacomo.antonio
Newbie
Posts: 5
Joined: Tue Nov 29, 2011 3:10 pm

Re: How to modify ranking computation

Postby digiacomo.antonio » Wed Jan 25, 2012 10:50 am

timoline wrote:http://www.joomleague.at/dokuwiki/doku.php?id=project_settings:frontend_settings:ranking

But normally the results=goals, in the matchdetails you can add bonus (penalty points) if this is what you mean?


Now THAT'S a news for me... I blindly trusted my client who claims that "Results" column represents Scores not Goals. That's why he requested me to add the Goals column.
Obviously you know more than anyone else about joomleague since I see you are from the developing team.
So "Results" stands for "Goals" not "Score". Which means Score gets computed somewhere else taking Results in the calculus.
So the missing thing is just configure or implement a different ranking algorithm that considers "goals difference" when assining bouns points according to this logic:
Attack bonus points (+1): if the winner is 4 or more goals ahead of the loser team.
Defence bonus points (+1): if the loser team is 7 or less goals behind the winner team.

Any idea how to implement and/or configure this behaviour in joomleague?

Thank you very much.

And_One
Joomleague Project Manager, Donator
Joomleague Project Manager, Donator
Posts: 3610
Joined: Fri Sep 11, 2009 4:00 pm
Joomleague version: 2.0.x
Location: Graz
Contact:

Re: How to modify ranking computation

Postby And_One » Wed Jan 25, 2012 12:23 pm

thats not configurable. you will need a separate ranking class for your needs. is this the only difference between rugby and e.g soccer ranking?

http://gitorious.org/joomleague/joomlea ... anking.php ~367ff

digiacomo.antonio
Newbie
Posts: 5
Joined: Tue Nov 29, 2011 3:10 pm

Re: How to modify ranking computation

Postby digiacomo.antonio » Wed Jan 25, 2012 12:41 pm

And_One wrote:thats not configurable. you will need a separate ranking class for your needs. is this the only difference between rugby and e.g soccer ranking?

http://gitorious.org/joomleague/joomlea ... anking.php ~367ff


Is this the only difference? Well I don't know... I don't actually know anything about Rugby and/or Soccer and even less about Joomleague.

Anyway Thank you very much for the help.

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: How to modify ranking computation

Postby timoline » Wed Jan 25, 2012 4:19 pm

So "Results" stands for "Goals" not "Score".

for me score and goals are the same.
And the amount of goals or score of both teams = results
Joomla 1.5.x
Joomleague 1.5.....latest git version


Return to “1.5.4-alena (RC 1)”

Who is online

Users browsing this forum: No registered users and 1 guest

cron