facebook twitter

Your Cart is currently empty.

joomla custom development

While asking a technical question on forums, please specify Your version of Joomla and JoomSport component.

Bug: Extratime Results

Bug: Extratime Results

Hi Bearteam,

i have following bug in FE:
- table view: playoff matches with extratime shows wrong winner team ("ET" on the wrong site)
only the first match is right
- calendar view: bonus results dont show 0 ( Result 1:0 is shown as 1: and 0:1 is shown as 1)

BE settings in match details:
- set matches to playoff
- set extratime to true
- set results after regular playtime
- set bonus points to final results after penalty

Link where you can see this (from "Halbfinale" and following):
- table view
- calendar view

Sincerely
Ten

Joomla! 2.5.8
Joomsport Pro 2.7

Tenarro
JoomSport Master
ranks
useravatar
Offline
120 Posts
User info in posts
Administrator has disabled public posting

Re: Bug: Extratime Results

Hello Tenarro ,

For the calendar, you are right, there is a bug.

In file components\com_joomsport\views\calendar\tmpl\default.php file, there are these lines 321 & 322

Code:

                            echo ($match->bonus1 && $match->bonus1 != '0.00')?"<font style='font-size:75%;'>".floatval($match->bonus1).":</font>":"";

                            echo ($match->bonus2 && $match->bonus2 != '0.00')?"<font style='font-size:75%;'>".floatval($match->bonus2)."</font>":"";

The first test is wrong in both lines. It sould be ($match->bonus1 && $match->bonus2 != '0.00').

Replace the line 321 & 322 by these new lines and the result will be ok :

Code:

                            echo ($match->bonus1 && $match->bonus2 != '0.00')?"<font style='font-size:75%;'>".floatval($match->bonus1).":</font>":"";

                            echo ($match->bonus1 && $match->bonus2 != '0.00')?"<font style='font-size:75%;'>".floatval($match->bonus2)."</font>":"";

For the table layout, it's not a bug but a choice of presentation done by Joomsport team. In ALL match results, the symbol ET is printed AFTER the score. It indicates that the matches ended after Extra time but this symbol doesn't indicate the winner.
If you have a look on a match result (http://www.fcr-04.de/die-mannschaft/tur … /1594.html), it's the same present but the score of Extra time is also presentation and indicates the winner.

I hope that it can help you.

Jojo

jojo
French user of Free Joomsport
JoomSport Guru
ranks
useravatar
Offline
782 Posts
User info in posts
Administrator has disabled public posting

Re: Bug: Extratime Results

Hello Irene,

A new bug to correct in the future bugfix release : In file components\com_joomsport\views\calendar\tmpl\default.php file, lines 321 & 322 must have this content :

Code:


                           echo ($match->bonus1 && $match->bonus2 != '0.00')?"<font style='font-size:75%;'>".floatval($match->bonus1).":</font>":"";
                            echo ($match->bonus1 && $match->bonus2 != '0.00')?"<font style='font-size:75%;'>".floatval($match->bonus2)."</font>":"";

Jojo

jojo
French user of Free Joomsport
JoomSport Guru
ranks
useravatar
Offline
782 Posts
User info in posts
Administrator has disabled public posting

Re: Bug: Extratime Results

Hello Tenarro,

Sorry but I made a mistake in previous message and proposed solution.

On your website, in the calendar on the top of symbol ET, it's not the final result which has to be printed but it's the bonus points. Even in case of ET, you have to enter the final score and not the score at the end of Normal Time (see here Joomsport documenation http://joomsport.com/joomsport-professi … ion.html#4). I think that there is Extra Time score only for Knockout.

You can set Bonus values without ET flag set to ON.

Thus when you have a result '2:', it's not the final score but it's the Bonus points associated to this match. The bonus points are used in the table result.

Now, when you set a Bonus point for one team and 0 for the other team, the result is 2: and it's not beautifull result. If you want to print 0 bonus when at least one team has bonus points, you have to replace the line 321 & 322 by these new lines :

Code:

                            if ( ($match->bonus1 && $match->bonus1 != '0.00') ||

                                 ($match->bonus2 && $match->bonus2 != '0.00') )
                            {
                                echo "<font style='font-size:75%;'>".floatval($match->bonus1).":</font>";
                                echo "<font style='font-size:75%;'>".floatval($match->bonus2)."</font>";
                          }   

Sorry for the first wrong proposition.

Jojo

jojo
French user of Free Joomsport
JoomSport Guru
ranks
useravatar
Offline
782 Posts
User info in posts
Administrator has disabled public posting

Re: Bug: Extratime Results

Hello,

1)    table view: playoff matches with extratime shows wrong winner team ("ET" on the wrong site) only the first match is righ.

Jojo is right in his last message.

2)    calendar view: bonus results dont show 0

Thank you for reporting. It's a bug it will be fixed in the next version of JoomSport component.

Apologies for inconveniences.

Let me know if there are any questions.

Jojo,

Thank you for cooperation.

Kind Regards,
Irene
The BearDev Support Team

Irene
Administrator
useravatar
Online
2198 Posts
User info in posts
Administrator has disabled public posting

Re: Bug: Extratime Results

Thank you very much, jojo and Irene!

I have tested jojos code but it works only for results 0:X. After changing this if a match has bonus points X:0 it shows nothing.

And "ET" is still on wrong site.

Link here again
(match "Spiel um Platz 5" @14-07-2012 14:04 and "Spiel um Platz 7" @14-07-2012 14:21)

But i dont understand why only knockout matches can handle extra time. When a match is set to playoff it can be a knockout match too.


Sincerely
Ten


edit:

I have fixed it with an additional OR:

Code:

                            echo ($match->bonus1 && $match->bonus2 != '0.00' || $match->bonus2 && $match->bonus1 != '0.00' )?"<font style='font-size:75%;'>".floatval($match->bonus1).":</font>":"";

                            echo ($match->bonus1 && $match->bonus2 != '0.00' || $match->bonus2 && $match->bonus1 != '0.00' )?"<font style='font-size:75%;'>".floatval($match->bonus2)."</font>":"";                       

Now left bugs are in table view and calendar view the "ET"s on wrong site.

Greetings again smile

edit²:

fixed Bug no.2 by replacing following line in components/com_joomsport/calendar/views/tmpl/default.php
Line 168

Code:

$class_ext = ($match->score1 > $match->score2)?"extra-time-h":"extra-time-g";

change to:

Code:

$class_ext = ($match->score1 > $match->score2 || $match->bonus1 > $match->bonus2)?"extra-time-h":"extra-time-g";

Bug no3 fixed: "ET" in match view on wrong site

In components/com_joomsport/views/match/tmpl/default.php from Line 131 to 136:

Code:

<?php

            $etclass="extra-time-g";
            if($match->score1 > $match->score2){
                        $etclass="extra-time-h";
            }
?>

change to:

Code:

<?php

            $etclass="extra-time-g";
            if($match->score1 > $match->score2 || $match->bonus1 > $match->bonus2){
                        $etclass="extra-time-h";
            }
?>

edit³:
Bug fixed: "ET" in table view on wrong site
in components/com_joomsport/table/views/tmpl/default.php from line 571 to 577

Code:

<?php

            if(@$lists["enbl_extra"] && $playoff_match->is_extra)
            {
                        $class_ext = ($playoff_match->score1 > $playoff_match->score2)?"extra-time-h":"extra-time-g";
                        echo '<span class="'.$class_ext.'" title="'.JText::_('BLFA_TEAM_WON_ET').'">'.JText::_('BL_RES_EXTRA').'</span>';                       
            }
?>

change to:

Code:

<?php

            if(@$lists["enbl_extra"] && $playoff_match->is_extra)
            {
                        $class_ext = ($playoff_match->score1 > $playoff_match->score2 || $playoff_match->bonus1 > $playoff_match->bonus2)?"extra-time-h":"extra-time-g";
                        echo '<span class="'.$class_ext.'" title="'.JText::_('BLFA_TEAM_WON_ET').'">'.JText::_('BL_RES_EXTRA').'</span>';                       
            }
?>

Bug left:
- "ET" in tooltip on wrong site (calendar view)

Joomla! 2.5.8
Joomsport Pro 2.7

Tenarro
JoomSport Master
ranks
useravatar
Offline
120 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
2754
Total Polls:
0
Total Posts:
16786139
Total Posts Today:
2
User Info:
 
Total Users:
10608
Newest User:
joshua
Members Online:
3
Guests Online:
1170


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked
top

JoomSport.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries