public static function getTeamLink($item, $params, $project) { switch ($params->get('teamlink')) { case 'teaminfo': return JoomleagueHelperRoute::getTeamInfoRoute($project->slug, $item->team_slug); case 'roster': return JoomleagueHelperRoute::getPlayersRoute($project->slug, $item->team_slug); case 'teamplan': return JoomleagueHelperRoute::getTeamPlanRoute($project->slug, $item->team_slug); case 'clubinfo': return JoomleagueHelperRoute::getClubInfoRoute($project->slug, $item->club_slug); } }
public function getroute() { $view = Jrequest::getCmd('view'); switch ($view) { case "matrix": $link = JoomleagueHelperRoute::getMatrixRoute(JRequest::getVar('p'), JRequest::getVar('division'), JRequest::getVar('r')); break; case "teaminfo": $link = JoomleagueHelperRoute::getTeamInfoRoute(JRequest::getVar('p'), JRequest::getVar('tid')); break; case "referees": $link = JoomleagueHelperRoute::getRefereesRoute(JRequest::getVar('p')); break; case "results": $link = JoomleagueHelperRoute::getResultsRoute(JRequest::getVar('p'), JRequest::getVar('r'), JRequest::getVar('division')); break; case "resultsranking": $link = JoomleagueHelperRoute::getResultsRankingRoute(JRequest::getVar('p')); break; case "rankingmatrix": $link = JoomleagueHelperRoute::getRankingMatrixRoute(JRequest::getVar('p'), JRequest::getVar('r'), JRequest::getVar('division')); break; case "resultsrankingmatrix": $link = JoomleagueHelperRoute::getResultsRankingMatrixRoute(JRequest::getVar('p'), JRequest::getVar('r'), JRequest::getVar('division')); break; case "teamplan": $link = JoomleagueHelperRoute::getTeamPlanRoute(JRequest::getVar('p'), JRequest::getVar('tid'), JRequest::getVar('division')); break; case "roster": $link = JoomleagueHelperRoute::getPlayersRoute(JRequest::getVar('p'), JRequest::getVar('tid'), null, JRequest::getVar('division')); break; case "eventsranking": $link = JoomleagueHelperRoute::getEventsRankingRoute(JRequest::getVar('p'), JRequest::getVar('division'), JRequest::getVar('tid')); break; case "curve": $link = JoomleagueHelperRoute::getCurveRoute(JRequest::getVar('p'), JRequest::getVar('tid'), 0, JRequest::getVar('division')); break; case "statsranking": $link = JoomleagueHelperRoute::getStatsRankingRoute(JRequest::getVar('p'), JRequest::getVar('division')); break; default: case "ranking": $link = JoomleagueHelperRoute::getRankingRoute(JRequest::getVar('p'), JRequest::getVar('r'), null, null, 0, JRequest::getVar('division')); } // echo json_encode($link); // Use the correct json mime-type header('Content-Type: application/json'); // Send the response. echo json_encode($link); JFactory::getApplication()->close(); }
function getroute() { $app =& JFactory::getApplication(); $view = Jrequest::getCmd('view'); switch ($view) { case "teaminfo": $link = JoomleagueHelperRoute::getTeamInfoRoute(JRequest::getVar('p'), JRequest::getVar('tid')); break; case "resultsranking": $link = JoomleagueHelperRoute::getResultsRankingRoute(JRequest::getVar('p')); break; case "rankingmatrix": $link = JoomleagueHelperRoute::getRankingMatrixRoute(JRequest::getVar('p')); break; case "resultsrankingmatrix": $link = JoomleagueHelperRoute::getResultsRankingMatrixRoute(JRequest::getVar('p')); break; case "teamplan": $link = JoomleagueHelperRoute::getTeamPlanRoute(JRequest::getVar('p'), JRequest::getVar('tid'), JRequest::getVar('division')); break; case "roster": $link = JoomleagueHelperRoute::getPlayersRoute(JRequest::getVar('p'), JRequest::getVar('tid')); break; case "eventsranking": $link = JoomleagueHelperRoute::getEventsRankingRoute(JRequest::getVar('p'), JRequest::getVar('division')); break; case "curve": $link = JoomleagueHelperRoute::getCurveRoute(JRequest::getVar('p'), 0, 0, JRequest::getVar('division')); break; case "statsranking": $link = JoomleagueHelperRoute::getStatsRankingRoute(JRequest::getVar('p'), JRequest::getVar('division')); break; default: case "ranking": $link = JoomleagueHelperRoute::getRankingRoute(JRequest::getVar('p'), null, null, null, 0, JRequest::getVar('division')); } echo json_encode($link); $app->close(); }
<?php echo JText::_('Team of Player'); ?> </th> <th class="td_l"> <?php echo JText::_('Position in Team'); ?> </th> </tr> <?php $k = 0; foreach ($this->historyPlayer as $station) { #$link1 = JoomleagueHelperRoute::getPlayerRoute( $station->project_id, $this->person->id , '1' ); $link1 = JoomleagueHelperRoute::getPlayerRoute($station->project_id, $station->person_id, '1'); $link2 = JoomleagueHelperRoute::getPlayersRoute($station->project_id, $station->team_id); ?> <tr class="<?php echo $k == 0 ? 'sectiontableentry1' : 'sectiontableentry2'; ?> "> <td class="td_l"> <?php echo JHtml::link($link1, $station->project_name); ?> </td> <td class="td_l"> <?php echo $station->season_name; ?> </td>
static function showTeamIcons(&$team, &$config) { if (!isset($team->projectteamid)) { return ""; } $projectteamid = $team->projectteamid; $teamname = $team->name; $teamid = $team->team_id; $teamSlug = isset($team->team_slug) ? $team->team_slug : $teamid; $clubSlug = isset($team->club_slug) ? $team->club_slug : $team->club_id; $division_slug = isset($team->division_slug) ? $team->division_slug : $team->division_id; $projectSlug = isset($team->project_slug) ? $team->project_slug : $team->project_id; $output = ''; if ($config['show_team_link']) { $link = JoomleagueHelperRoute::getPlayersRoute($projectSlug, $teamSlug); $title = JText::_('COM_JOOMLEAGUE_TEAMICONS_ROSTER_LINK') . ' ' . $teamname; $picture = 'media/com_joomleague/jl_images/team_icon.png'; $desc = self::getPictureThumb($picture, $title, 0, 0, 4); $output .= JHtml::link($link, $desc); } if ((!isset($team_plan) || $teamid != $team_plan->id) && $config['show_plan_link']) { $link = JoomleagueHelperRoute::getTeamPlanRoute($projectSlug, $teamSlug, $division_slug); $title = JText::_('COM_JOOMLEAGUE_TEAMICONS_TEAMPLAN_LINK') . ' ' . $teamname; $picture = 'media/com_joomleague/jl_images/calendar_icon.gif'; $desc = self::getPictureThumb($picture, $title, 0, 0, 4); $output .= JHtml::link($link, $desc); } if ($config['show_curve_link']) { $link = JoomleagueHelperRoute::getCurveRoute($projectSlug, $teamSlug, 0, $division_slug); $title = JText::_('COM_JOOMLEAGUE_TEAMICONS_CURVE_LINK') . ' ' . $teamname; $picture = 'media/com_joomleague/jl_images/curve_icon.gif'; $desc = self::getPictureThumb($picture, $title, 0, 0, 4); $output .= JHtml::link($link, $desc); } if ($config['show_teaminfo_link']) { $link = JoomleagueHelperRoute::getTeamInfoRoute($projectSlug, $teamid); $title = JText::_('COM_JOOMLEAGUE_TEAMICONS_TEAMINFO_LINK') . ' ' . $teamname; $picture = 'media/com_joomleague/jl_images/teaminfo_icon.png'; $desc = self::getPictureThumb($picture, $title, 0, 0, 4); $output .= JHtml::link($link, $desc); } if ($config['show_club_link']) { $link = JoomleagueHelperRoute::getClubInfoRoute($projectSlug, $clubSlug); $title = JText::_('COM_JOOMLEAGUE_TEAMICONS_CLUBINFO_LINK') . ' ' . $teamname; $picture = 'media/com_joomleague/jl_images/mail.gif'; $desc = self::getPictureThumb($picture, $title, 0, 0, 4); $output .= JHtml::link($link, $desc); } if ($config['show_teamstats_link']) { $link = JoomleagueHelperRoute::getTeamStatsRoute($projectSlug, $teamSlug); $title = JText::_('COM_JOOMLEAGUE_TEAMICONS_TEAMSTATS_LINK') . ' ' . $teamname; $picture = 'media/com_joomleague/jl_images/teamstats_icon.png'; $desc = self::getPictureThumb($picture, $title, 0, 0, 4); $output .= JHtml::link($link, $desc); } if ($config['show_clubplan_link']) { $link = JoomleagueHelperRoute::getClubPlanRoute($projectSlug, $clubSlug); $title = JText::_('COM_JOOMLEAGUE_TEAMICONS_CLUBPLAN_LINK') . ' ' . $teamname; $picture = 'media/com_joomleague/jl_images/clubplan_icon.png'; $desc = self::getPictureThumb($picture, $title, 0, 0, 4); $output .= JHtml::link($link, $desc); } if ($config['show_rivals_link']) { $link = JoomleagueHelperRoute::getRivalsRoute($projectSlug, $teamSlug); $title = JText::_('COM_JOOMLEAGUE_TEAMICONS_RIVALS_LINK') . ' ' . $teamname; $picture = 'media/com_joomleague/jl_images/rivals.png'; $desc = self::getPictureThumb($picture, $title, 0, 0, 4); $output .= JHtml::link($link, $desc); } return $output; }
<?php defined('_JEXEC') or die('Restricted access'); ?> <table class="contentpaneopen"> <tr> <td class="contentheading"> <?php echo $this->pagetitle; if ($this->showediticon) { $modalheight = JComponentHelper::getParams('com_joomleague')->get('modal_popup_height', 600); $modalwidth = JComponentHelper::getParams('com_joomleague')->get('modal_popup_width', 900); $link = JoomleagueHelperRoute::getPlayersRoute($this->project->id, $this->team->id, 'teamplayer.select', $this->projectteam->division_id, $this->projectteam->ptid); echo ' <a rel="{handler: \'iframe\',size: {x:' . $modalwidth . ',y:' . $modalheight . '}}" href="' . $link . '" class="modal">'; echo JHtml::image("media/com_joomleague/jl_images/edit.png", JText::_('COM_JOOMLEAGUE_ROSTER_EDIT'), array("title" => JText::_("COM_JOOMLEAGUE_ROSTER_EDIT"))); echo '</a>'; } ?> </td> </tr> </table> <br />
$header .= $desc; $header .= '</div></th>'; $matrix .= $header; } } $matrix .= '</tr>'; } $class = $k_r % 2 == 0 ? $this->config['style_class1'] : $this->config['style_class2']; $trow = $team_row; $matrix .= '<tr class="' . $class . '">'; $k_c = 0; //count columns foreach ($this->teams as $team_col_id => $team_col) { if ($k_c == 0) { $title = JText::_('COM_JOOMLEAGUE_MATRIX_PLAYERS_PAGE_LINK') . ' ' . $trow->name; $link = JoomleagueHelperRoute::getPlayersRoute($this->project->id, $trow->id); $desc = $trow->short_name; if ($crosstable_icons_vertical) { $picture = $trow->logo_small; $desc = JoomleagueHelper::getPictureThumb($picture, $title, 0, 0, 3); } if ($this->config['link_teams'] == 1) { $tValue = '<th class="teamsleft">'; $tValue .= JHTML::link($link, $desc); $tValue .= '</th>'; $matrix .= $tValue; } else { $tValue = '<th class="teamsleft">'; $tValue .= $desc; $tValue .= '</th>'; $matrix .= $tValue;
/** * return link for specified view - allow seo consistency * * @param string $view * @return string url */ public function getLink($view) { if (!$this->_project_id) { return false; } // echo 'getLink <br>'; // echo 'round_id ->'.$this->_round_id.'<br>'; // echo 'project_id ->'.$this->_project_id.'<br>'; // echo 'division_id ->'.$this->_division_id.'<br>'; // echo 'team_id ->'.$this->_team_id.'<br>'; switch ($view) { case "calendar": $link = JoomleagueHelperRoute::getTeamPlanRoute($this->_project_id, $this->_team_id, $this->_division_id); break; case "curve": $link = JoomleagueHelperRoute::getCurveRoute($this->_project_id, $this->_team_id, 0, $this->_division_id); break; case "eventsranking": $link = JoomleagueHelperRoute::getEventsRankingRoute($this->_project_id, $this->_division_id, $this->_team_id); break; case "matrix": $link = JoomleagueHelperRoute::getMatrixRoute($this->_project_id, $this->_division_id); break; case "referees": $link = JoomleagueHelperRoute::getRefereesRoute($this->_project_id); break; case "results": $link = JoomleagueHelperRoute::getResultsRoute($this->_project_id, $this->_round_id, $this->_division_id); break; case "resultsmatrix": $link = JoomleagueHelperRoute::getResultsMatrixRoute($this->_project_id, $this->_round_id, $this->_division_id); break; case "resultsranking": $link = JoomleagueHelperRoute::getResultsRankingRoute($this->_project_id, $this->_round_id, $this->_division_id); break; case "rankingalltime": $link = JoomleagueHelperRoute::getRankingAllTimeRoute($this->_league_id, $this->getParam('show_alltimetable_points'), $this->_project_id); break; case "resultsrankingmatrix": $link = JoomleagueHelperRoute::getResultsRankingMatrixRoute($this->_project_id, $this->_round_id, $this->_division_id); break; case "roster": if (!$this->_team_id) { return false; } $link = JoomleagueHelperRoute::getPlayersRoute($this->_project_id, $this->_team_id); break; case "stats": $link = JoomleagueHelperRoute::getStatsRoute($this->_project_id, $this->_division_id); break; case "statsranking": $link = JoomleagueHelperRoute::getStatsRankingRoute($this->_project_id, $this->_division_id); break; case "teaminfo": if (!$this->_team_id) { return false; } $link = JoomleagueHelperRoute::getTeamInfoRoute($this->_project_id, $this->_team_id); break; case "teamplan": if (!$this->_team_id) { return false; } $link = JoomleagueHelperRoute::getTeamPlanRoute($this->_project_id, $this->_team_id, $this->_division_id); break; case "clubinfo": if (!$this->_team_id) { return false; } $this->getClubId(); $link = JoomleagueHelperRoute::getClubInfoRoute($this->_project_id, $this->_club_id); break; case "clubplan": if (!$this->_team_id) { return false; } $this->getClubId(); $link = JoomleagueHelperRoute::getClubPlanRoute($this->_project_id, $this->_club_id); break; case "teamstats": if (!$this->_team_id) { return false; } $link = JoomleagueHelperRoute::getTeamStatsRoute($this->_project_id, $this->_team_id); break; case "treetonode": $link = JoomleagueHelperRoute::getBracketsRoute($this->_project_id); break; case "jltournamenttree": $link = JoomleagueHelperRoute::getTournamentRoute($this->_project_id, $this->_round_id); break; case "separator": return false; default: case "ranking": $link = JoomleagueHelperRoute::getRankingRoute($this->_project_id, $this->_round_id, null, null, 0, $this->_division_id); } return $link; }
echo $this->team->id . $season->projectid; ?> " align="center" style="display: none"><?php if ($this->config['show_teams_logos']) { $picture = $season->picture; if (@is_null($picture) or strpos($picture, "/com_joomleague/images/placeholders/placeholder_450.png") or strpos($picture, "/joomleague/placeholders/placeholder_450.png")) { $picture = JoomleagueHelper::getDefaultPlaceholder("team"); } $picture_descr = JText::_("COM_JOOMLEAGUE_TEAMINFO_PLAYERS_PICTURE") . " " . $this->team->name . " (" . $season->projectname . ")"; echo JHtml::image($picture, $picture_descr, array("title" => $picture_descr)); } ?> <br /> <?php $link = JoomleagueHelperRoute::getPlayersRoute($season->project_slug, $season->team_slug); echo JHtml::link($link, JText::_('COM_JOOMLEAGUE_TEAMINFO_SEASON_PLAYERS')); ?> <br /> <?php $link = JoomleagueHelperRoute::getResultsRoute($season->project_slug); echo JHtml::link($link, JText::_('COM_JOOMLEAGUE_TEAMINFO_SEASON_RESULTS')); ?> <br /> <?php $link = JoomleagueHelperRoute::getRankingRoute($season->project_slug); echo JHtml::link($link, JText::_('COM_JOOMLEAGUE_TEAMINFO_SEASON_TABLES')); ?> <br /> </div> <?php
function getLink(&$item) { switch ($this->params->get('teamlink')) { case 0: return ''; case 1: return JoomleagueHelperRoute::getTeamInfoRoute($this->project->slug, $item->team_slug); case 2: return JoomleagueHelperRoute::getPlayersRoute($this->project->slug, $item->team_slug); case 3: return JoomleagueHelperRoute::getTeamPlanRoute($this->project->slug, $item->team_slug); case 4: return JoomleagueHelperRoute::getClubInfoRoute($this->project->slug, $item->club_slug); case 5: return isset($item->club_www) ? $item->club_www : $item->website; } }
/** * return link for specified view - allow seo consistency * * @param string $view * @return string url */ public function getLink($view) { if (!$this->_project_id) { return false; } switch ($view) { case "calendar": $link = JoomleagueHelperRoute::getTeamPlanRoute($this->_project_id, $this->_team_id, $this->_division_id); break; case "curve": $link = JoomleagueHelperRoute::getCurveRoute($this->_project_id, $this->_team_id, 0, $this->_division_id); break; case "eventsranking": $link = JoomleagueHelperRoute::getEventsRankingRoute($this->_project_id, $this->_division_id, $this->_team_id); break; case "matrix": $link = JoomleagueHelperRoute::getMatrixRoute($this->_project_id, $this->_division_id); break; case "referees": $link = JoomleagueHelperRoute::getRefereesRoute($this->_project_id); break; case "results": $link = JoomleagueHelperRoute::getResultsRoute($this->_project_id, $this->_round_id, $this->_division_id); break; case "resultsmatrix": $link = JoomleagueHelperRoute::getResultsMatrixRoute($this->_project_id, $this->_round_id, $this->_division_id); break; case "resultsranking": $link = JoomleagueHelperRoute::getResultsRankingRoute($this->_project_id, $this->_round_id, $this->_division_id); break; case "resultsrankingmatrix": $link = JoomleagueHelperRoute::getResultsRankingMatrixRoute($this->_project_id, $this->_round_id, $this->_division_id); break; case "roster": if (!$this->_team_id) { return false; } $link = JoomleagueHelperRoute::getPlayersRoute($this->_project_id, $this->_team_id, null, $this->_division_id); break; case "stats": $link = JoomleagueHelperRoute::getStatsRoute($this->_project_id, $this->_division_id); break; case "statsranking": $link = JoomleagueHelperRoute::getStatsRankingRoute($this->_project_id, $this->_division_id); break; case "teaminfo": if (!$this->_team_id) { return false; } $link = JoomleagueHelperRoute::getTeamInfoRoute($this->_project_id, $this->_team_id); break; case "teamplan": if (!$this->_team_id) { return false; } $link = JoomleagueHelperRoute::getTeamPlanRoute($this->_project_id, $this->_team_id, $this->_division_id); break; case "teamstats": if (!$this->_team_id) { return false; } $link = JoomleagueHelperRoute::getTeamStatsRoute($this->_project_id, $this->_team_id); break; case "treetonode": $link = JoomleagueHelperRoute::getBracketsRoute($this->_project_id); break; case "separator": return false; default: case "ranking": $link = JoomleagueHelperRoute::getRankingRoute($this->_project_id, $this->_round_id, null, null, 0, $this->_division_id); } return $link; }