* to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ // no direct access defined('_JEXEC') or die('Restricted access'); // Include the syndicate functions only once require_once dirname(__FILE__) . '/helper.php'; $season_id = $params->get('season_id'); $team_id = $params->get('team_id'); $embl_is = $params->get('embl_is'); $match_count = $params->get('match_count'); $single = modBlResHelper::getStype($params); $list = modBlResHelper::getList($params); $et = modBlResHelper::getET($params); // New parameters added for Match Result Configuration $emblem_width = $params->get('emblem_width'); $emblem_height = $params->get('emblem_height'); $result_layout = $params->get('result_layout'); $matchday_reference = $params->get('matchday_reference'); $align_matchday_ref = $params->get('align_matchday_ref'); $align_home_emblem = $params->get('align_home_emblem'); $align_away_emblem = $params->get('align_away_emblem'); $align_home_team = $params->get('align_home_team'); $align_away_team = $params->get('align_away_team'); $link_emblem = $params->get('link_emblem'); $tooltip_emblem = $params->get('tooltip_emblem'); $link_team = $params->get('link_team'); $link_score = $params->get('link_score'); $border_score = $params->get('border_score');
if ($old_md != $match->mdid || $old_date != $match->m_date . ' ' . $match->m_time) { $date_matchday_ouput = date_bl($match->m_date, $match->m_time) . ' - ' . $match->m_name; } break; case 3: // Matchday - Date output if ($old_md != $match->mdid || $old_date != $match->m_date . ' ' . $match->m_time) { $date_matchday_ouput = $match->m_name . ' - ' . date_bl($match->m_date, $match->m_time); } break; } $old_date = $match->m_date . ' ' . $match->m_time; $old_md = $match->mdid; if ($single || isset($match->ssingle) && $match->ssingle) { $match->emb1 = modBlResHelper::getPhoto($match->hm_id); $match->emb2 = modBlResHelper::getPhoto($match->aw_id); } // -------------------------------------------------------------------------- // Presentation of match results depending of configuration parameters // -------------------------------------------------------------------------- switch ($result_layout) { case 0: case 1: case 2: default: // ------------------------------------------------------------------------------------ // Joomsport presentation on several lines // Print results layout: // Case 0 : Matchday separation Case 1 : Matchday separation // Home_Emblem Away_Emblem Home_Emblem Score Away_Emblem // Home_Team Score Away_Team Home_Team Away_Team
<?php if (count($list)) { foreach ($list as $match) { // ---------------------------------------------------------------- // Common configuration for one match - all kind of layout // ---------------------------------------------------------------- if ($tooltip_emblem_next) { // Generate CSS Emblem tooltip $tooltip_home = 'title="' . htmlspecialchars($match->home) . '"'; $tooltip_away = 'title="' . htmlspecialchars($match->away) . '"'; } // Check if teams names are not too long : if YES, insert a 'blank' in team name to generate a carriage return in the layout result if ($team_name_max_length_next) { // check Home and Away Team names and split if necessary $match->home = modBlResHelper::checkTEAMLength($match->home, $team_name_max_length_next); $match->away = modBlResHelper::checkTEAMLength($match->away, $team_name_max_length_next); } // Generate the hyperlink on teams ? if ($link_team_next) { if ($single || isset($match->ssingle) && $match->ssingle) { $link_team_home_a = '<a href="' . JRoute::_('index.php?option=com_joomsport&task=player&id=' . $match->hm_id . '&sid=' . $s_id . '&Itemid=' . $cItemId) . '">' . $match->home . '</a>'; $link_team_away_a = '<a href="' . JRoute::_('index.php?option=com_joomsport&task=player&id=' . $match->aw_id . '&sid=' . $s_id . '&Itemid=' . $cItemId) . '">' . $match->away . '</a>'; } else { $link_team_home_a = '<a href="' . JRoute::_('index.php?option=com_joomsport&task=team&tid=' . $match->hm_id . '&sid=' . $s_id . '&Itemid=' . $cItemId) . '">' . $match->home . '</a>'; $link_team_away_a = '<a href="' . JRoute::_('index.php?option=com_joomsport&task=team&tid=' . $match->aw_id . '&sid=' . $s_id . '&Itemid=' . $cItemId) . '">' . $match->away . '</a>'; } } else { $link_team_home_a = $match->home; $link_team_away_a = $match->away; } // Generate the hyperlink on emblems ?