With the default views setup these 2 fields always show up as 0.
The thing is that the Home and Away sections work perfectly..

I know i can just sum up Home and Away Goals to form the total but thats just a workaround

CommentFileSizeAuthor
#5 1125280.patch1.39 KBParisLiakos
Screenshot.png6.08 KBParisLiakos

Comments

ayukko’s picture

Subscribe!

ayukko’s picture

Hi there

I have done a workaround. I have used a module I had installed (I think it is views custom field) which allows you to add calculated fields. I used it to addtow calculated fields to get the values for Goals scored and Goals conceded.

Will wait for the fix for this though.

ParisLiakos’s picture

Can you share the code you used with custom fields?

I am trying with custom fields right now but all my fields have no value except nid :S



EDIT: Nevermind i was using an argument and forgot about it

threaders’s picture

I have found the code that needs changing in leaguesite\leaguesite_league\views folder.

Change line 15 of file leaguesite_handler_field_goals_for.inc to be the following:

$for = $values->leaguesite_standings_goals_for_home + $values->leaguesite_standings_goals_for_away;

Change line 15 of files leaguesite_handler_field_goals_against.inc to be the following:

$for = $values->leaguesite_standings_goals_against_home + $values->leaguesite_standings_goals_against_away;

ParisLiakos’s picture

StatusFileSize
new1.39 KB

indeed it works:)
attached the patch

thanks @threaders

ParisLiakos’s picture

Status: Active » Patch (to be ported)