本文整理汇总了PHP中JoomleagueHelperRoute::getPlayerRoute方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomleagueHelperRoute::getPlayerRoute方法的具体用法?PHP JoomleagueHelperRoute::getPlayerRoute怎么用?PHP JoomleagueHelperRoute::getPlayerRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JoomleagueHelperRoute
的用法示例。
在下文中一共展示了JoomleagueHelperRoute::getPlayerRoute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPlayerLink
function getPlayerLink($item, $params)
{
$flag = "";
if ($params->get('show_player_flag')) {
$flag = Countries::getCountryFlag($item->country) . " ";
}
$text = "<i>" . JoomleagueHelper::formatName(null, $item->firstname, $item->nickname, $item->lastname, $params->get("name_format")) . "</i>";
if ($params->get('show_player_link')) {
$link = JoomleagueHelperRoute::getPlayerRoute($params->get('p'), $params->get('team'), $item->slug);
echo $flag . JHtml::link($link, $text);
} else {
echo '<i>' . JText::sprintf('%1$s', $flag . $text) . '</i>';
}
}
示例2: foreach
<td class="list">
<div style="text-align: left;">
<ul style="list-style-type: none;">
<?php
foreach ($this->matchplayers as $player) {
if ($player->trikot_number != 0) {
$player->jerseynumber = $player->trikot_number;
}
if ($player->pposid == $pos->pposid && $player->ptid == $this->match->projectteam2_id) {
?>
<li <?php
echo $this->config['show_player_picture'] == 2 ? 'class="list_pictureonly_right"' : 'class="list"';
?>
>
<?php
$player_link = JoomleagueHelperRoute::getPlayerRoute($this->project->slug, $player->team_slug, $player->person_slug);
$prefix = $player->jerseynumber ? $player->jerseynumber . "." : null;
$match_player = JoomleagueHelper::formatName($prefix, $player->firstname, $player->nickname, $player->lastname, $this->config["name_format"]);
$isFavTeam = in_array($player->team_id, explode(",", $this->project->fav_team));
if ($this->config['show_player_picture'] == 1 || $this->config['show_player_picture'] == 2) {
$imgTitle = $this->config['show_player_profile_link'] == 1 ? JText::sprintf('COM_JOOMLEAGUE_MATCHREPORT_PIC', $match_player) : $match_player;
$picture = $player->picture;
if (empty($picture) || $picture == JoomleagueHelper::getDefaultPlaceholder("player") || !file_exists($picture)) {
$picture = $player->ppic;
}
if (!file_exists($picture)) {
$picture = JoomleagueHelper::getDefaultPlaceholder("player");
}
if ($this->config['show_player_picture'] == 2 && $this->config['show_player_profile_link'] == 1) {
/*
echo JHTML::link($player_link,JoomleagueHelper::getPictureThumb($picture,
示例3: array
$career = array();
$career['played'] = 0;
$career['started'] = 0;
$career['in'] = 0;
$career['out'] = 0;
$career['playedtime'] = 0;
$player = JLGModel::getInstance("Person", "JoomleagueModel");
if (count($this->historyPlayer) > 0) {
foreach ($this->historyPlayer as $player_hist) {
$model = $this->getModel();
$this->inoutstat = $model->getInOutStats($player_hist->project_id, $player_hist->ptid, $player_hist->tpid);
// time played
$timePlayed = 0;
$this->timePlayed = $model->getTimePlayed($player_hist->tpid, $this->project->game_regular_time);
$timePlayed = $this->timePlayed;
$link1 = JoomleagueHelperRoute::getPlayerRoute($player_hist->project_slug, $player_hist->team_slug, $this->person->slug);
$link2 = JoomleagueHelperRoute::getTeamInfoRoute($player_hist->project_slug, $player_hist->team_slug);
?>
<tr class="<?php
echo $k == 0 ? $this->config['style_class1'] : $this->config['style_class2'];
?>
">
<td class="td_l" nowrap="nowrap"><?php
echo JHtml::link($link1, $player_hist->project_name);
?>
</td>
<td class="td_l" class="nowrap">
<?php
if ($this->config['show_playerstats_teamlink'] == 1) {
echo JHtml::link($link2, $player_hist->team_name);
} else {
示例4: _getShowPlayerLink
private function _getShowPlayerLink()
{
$p = JRequest::getInt("p", 0);
$tid = JRequest::getInt("tid", 0);
$pid = JRequest::getInt("pid", 0);
$link = JoomleagueHelperRoute::getPlayerRoute($p, $tid, $pid);
return $link;
}
示例5: foreach
<table class="birthday">
<?php
if (count($persons) > 0) {
foreach ($persons as $person) {
if ($params->get('limit') > 0 && $counter == intval($params->get('limit'))) {
break;
}
$class = $k == 0 ? $params->get('sectiontableentry1') : $params->get('sectiontableentry2');
$thispic = "";
$flag = $params->get('show_player_flag') ? Countries::getCountryFlag($person['country']) . " " : "";
$text = htmlspecialchars(JoomleagueHelper::formatName(null, $person['firstname'], $person['nickname'], $person['lastname'], $params->get("name_format")), ENT_QUOTES, 'UTF-8');
$usedname = $flag . $text;
$person_link = "";
$person_type = $person['type'];
if ($person_type == 1) {
$person_link = JoomleagueHelperRoute::getPlayerRoute($person['project_id'], $person['team_id'], $person['id']);
} else {
if ($person_type == 2) {
$person_link = JoomleagueHelperRoute::getStaffRoute($person['project_id'], $person['team_id'], $person['id']);
} else {
if ($person_type == 3) {
$person_link = JoomleagueHelperRoute::getRefereeRoute($person['project_id'], $person['team_id'], $person['id']);
}
}
}
$showname = JHtml::link($person_link, $usedname);
?>
<tr class="<?php
echo $params->get('heading_style');
?>
">
示例6: defined
*
* @copyright Copyright (C) 2006-2015 joomleague.at. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @link http://www.joomleague.at
*/
defined('_JEXEC') or die;
?>
<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::getPlayerRoute($this->project->id, $this->teamPlayer->team_id, $this->person->id, 'person.edit');
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_PERSON_EDIT'), array("title" => JText::_("COM_JOOMLEAGUE_PERSON_EDIT")));
echo '</a>';
}
if (isset($this->teamPlayer->injury) && $this->teamPlayer->injury) {
$imageTitle = JText::_('COM_JOOMLEAGUE_PERSON_INJURED');
echo " " . JHtml::image('images/com_joomleague/database/events/' . $this->project->fs_sport_type_name . '/injured.gif', $imageTitle, array('title' => $imageTitle));
}
if (isset($this->teamPlayer->suspension) && $this->teamPlayer->suspension) {
$imageTitle = JText::_('COM_JOOMLEAGUE_PERSON_SUSPENDED');
echo " " . JHtml::image('images/com_joomleague/database/events/' . $this->project->fs_sport_type_name . '/suspension.gif', $imageTitle, array('title' => $imageTitle));
}
if (isset($this->teamPlayer->away) && $this->teamPlayer->away) {
$imageTitle = JText::_('COM_JOOMLEAGUE_PERSON_AWAY');
echo " " . JHtml::image('images/com_joomleague/database/events/' . $this->project->fs_sport_type_name . '/away.gif', $imageTitle, array('title' => $imageTitle));
示例7: printName
public static function printName($item, $team, $params, $project)
{
$name = JoomleagueHelper::formatName(null, $item->firstname, $item->nickname, $item->lastname, $params->get("name_format"));
if ($params->get('show_player_link')) {
return JHtml::link(JoomleagueHelperRoute::getPlayerRoute($project->slug, $team->team_slug, $item->person_id), $name);
} else {
echo $name;
}
}
示例8: in_array
?>
-tpidout<?php
echo $me->in_for;
?>
">
<?php
echo '<td> </td>';
echo '<td class="ecenter">' . $txt_tab_in . '</td>';
echo '<td class="ecenter">' . JoomleagueModelProject::getClubIconHtml($eventteam, 1) . '</td>';
//Subs in
$inName = JoomleagueHelper::formatName(null, $me->firstname, $me->nickname, $me->lastname, $this->config["name_format"]);
if ($inName != '') {
$isFavTeam = in_array($me->team_id, explode(",", $this->project->fav_team));
if ($this->config['event_link_player'] == 1) {
if ($this->config['show_player_profile_link'] == 1 || $this->config['show_player_profile_link'] == 2 && $isFavTeam) {
$inName = JHtml::link(JoomleagueHelperRoute::getPlayerRoute($this->project->slug, $me->ptid, $me->person_id), $inName);
}
if ($me->in_position != '') {
$inName .= ' (' . JText::_($me->in_position) . ')';
}
}
}
echo '<td>' . $inName . '</td>';
echo '</tr>';
}
$k = 1 - $k;
}
function compareMatchEventsSubs($a, $b)
{
global $sortEventsDesc;
$a_value = null;
示例9: urlencode
<?php
$pnr = !empty($row->position_number) ? $row->position_number : ' ';
if ($this->config['show_player_numbers']) {
if ($this->config['player_numbers_pictures']) {
$value = JHtml::image(JURI::root() . 'components/com_joomleague/helpers/shirt.php?text=' . $pnr . '&picpath=' . urlencode($this->config['player_numbers_picture']), $pnr, array('title' => $pnr));
} else {
$value = $pnr;
}
?>
<td width="30" class="td_c"><?php
echo $value;
?>
</td><?php
}
$playerName = JoomleagueHelper::formatName(null, $row->firstname, $row->nickname, $row->lastname, $this->config["name_format"]);
$link = JoomleagueHelperRoute::getPlayerRoute($this->project->slug, $this->team->slug, $row->slug);
if ($this->config['show_player_icon']) {
$picture = $row->picture;
if (empty($picture) || $picture == JoomleagueHelper::getDefaultPlaceholder("player")) {
$picture = $row->ppic;
}
$playerPicture = JoomleagueHelper::getPictureThumb($picture, $playerName, $this->config['player_picture_width'], $this->config['player_picture_height'], 0);
?>
<td width="40" class="td_c" nowrap="nowrap"><?php
if ($this->config['link_player'] == 1) {
echo JHtml::link($link, $playerPicture);
} else {
echo $playerPicture;
}
?>
</td><?php
示例10: formatBirthdays
function formatBirthdays($rows, &$matches, $dates)
{
$newrows = array();
$year = substr($dates['start'], 0, 4);
foreach ($rows as $key => $row) {
$newrows[$key]['type'] = 'jlb';
$newrows[$key]['homepic'] = '';
$newrows[$key]['awaypic'] = '';
$newrows[$key]['date'] = $year . '-' . $row->month_day;
$newrows[$key]['age'] = '(' . $row->age . ')';
$newrows[$key]['headingtitle'] = $this->xparams->get('birthday_text', 'Birthday');
$newrows[$key]['name'] = '';
if ($row->picture != '' and file_exists(JPATH_BASE . DS . $row->picture)) {
$linkit = 1;
$newrows[$key]['name'] = '<img src="' . JUri::root(true) . '/' . $row->picture . '" alt="Picture" style="height:40px; vertical-align:middle;margin:0 5px;" />';
//echo $newrows[$key]['name'].'</br>';
}
$newrows[$key]['name'] .= parent::jl_utf8_convert($row->firstname, 'iso-8859-1', 'utf-8') . ' ';
$newrows[$key]['name'] .= parent::jl_utf8_convert($row->lastname, 'iso-8859-1', 'utf-8') . ' - ' . parent::jl_utf8_convert($row->short_name, 'iso-8859-1', 'utf-8');
//$newrows[$key]['name'] .= ' ('..')';
$newrows[$key]['matchcode'] = 0;
$newrows[$key]['project_id'] = $row->project_id;
// new insert for link to player profile
//$newrows[$key]['link'] = 'index.php?option=com_joomleague&view=player&p='.$row->project_id.'&pid='.$row->id;
$newrows[$key]['link'] = JoomleagueHelperRoute::getPlayerRoute($row->project_id, $row->teamid, $row->id);
$matches[] = $newrows[$key];
}
return $newrows;
}
示例11: function_exists
<?php
if ($this->config['show_player_numbers']) {
$pnr = $this->row->position_number != '' ? $this->row->position_number : ' ';
?>
<span class="jl_rosterperson_position_number">
<?php
$playerNumber = ($this->config['player_numbers_pictures'] and function_exists('imagecreatefrompng')) ? JHTML::image(JURI::root() . 'images/com_joomleague/database/teamplayers/shirt.php?text=' . $pnr, $pnr, array('title' => $pnr)) : $pnr;
echo $playerNumber;
?>
</span><!-- /.jl_rosterperson_position_number -->
<?php
}
?>
<span class="jl_rosterperson_name">
<?php
echo $this->config['link_player'] == 1 ? JHTML::link(JoomleagueHelperRoute::getPlayerRoute($this->project->slug, $this->team->slug, $this->row->slug), $personName) : $personName;
?>
<br />
</span>
</h3>
<div class="jl_roster_persondetails">
<?php
if (isset($this->row->is_injured) && $this->row->is_injured > 0 or $this->row->suspension > 0 && $this->row->suspension_end > $joomleague->current_round) {
?>
<div>
<span class="jl_roster_persondetails_label">
<?php
echo JText::_('COM_JOOMLEAGUE_PERSON_STATUS');
?>
</span><!-- /.jl_roster_persondetails_label -->
<span class="jl_roster_persondetails_data">
示例12: printName
function printName($item, $team, $params, $project)
{
$name = JoomleagueHelper::formatName(null, $item->fname, $item->nname, $item->lname, $params->get("name_format"));
if ($params->get('show_player_link')) {
return JHTML::link(JoomleagueHelperRoute::getPlayerRoute($project->slug, $team->team_slug, $item->pid), $name);
} else {
echo $name;
}
}
示例13:
$text = JoomleagueHelper::formatName(null, $person->firstname, $person->nickname, $person->lastname, $params->get("name_format"));
$imgTitle = JText::sprintf($picturetext . ' %1$s', $text);
if (isset($list['inprojectinfo']->picture)) {
$picture = $list['inprojectinfo']->picture;
$pic = JoomleagueHelper::getPictureThumb($picture, $imgTitle, $params->get('picture_width'), $params->get('picture_heigth'));
echo '<a href="' . $link . '">' . $pic . '</a>';
}
?>
</li>
<li class="playerlink">
<?php
if ($params->get('show_player_flag')) {
echo Countries::getCountryFlag($person->country) . " ";
}
if ($params->get('show_player_link')) {
$link = JoomleagueHelperRoute::getPlayerRoute($list['project']->slug, $list['infoteam']->team_id, $person->slug);
echo JHtml::link($link, $text);
} else {
echo JText::sprintf('%1$s', $text);
}
?>
</li>
<?php
if ($params->get('show_team_name')) {
?>
<li class="teamname">
<?php
echo JoomleagueHelper::getPictureThumb($list['infoteam']->team_picture, $list['infoteam']->name, $params->get('team_picture_width', 21), $params->get('team_picture_height', 0), 1) . " ";
$text = $list['infoteam']->name;
if ($params->get('show_team_link')) {
$link = JoomleagueHelperRoute::getTeamInfoRoute($list['project']->slug, $list['infoteam']->team_id);
示例14: foreach
}
echo '</ul>';
echo '</td>';
echo '<td class="list">';
echo '<ul>';
foreach ($this->matchevents as $me) {
if ($me->event_type_id == $event->id && $me->ptid == $this->match->projectteam2_id) {
echo '<li class="list">';
if ($this->config['show_event_minute'] == 1 && $me->event_time > 0) {
$prefix = str_pad($me->event_time, 2, '0', STR_PAD_LEFT) . "' ";
} else {
$prefix = null;
}
$match_player = JoomleagueHelper::formatName($prefix, $me->firstname1, $me->nickname1, $me->lastname1, $this->config["name_format"]);
if ($this->config['event_link_player'] == 1 && $me->playerid != 0) {
$player_link = JoomleagueHelperRoute::getPlayerRoute($this->project->slug, $me->team_id, $me->playerid);
$match_player = JHtml::link($player_link, $match_player);
}
echo $match_player;
// only show event sum and match notice when set to on in template cofig
$sum_notice = "";
if ($this->config['show_event_sum'] == 1 || $this->config['show_event_notice'] == 1) {
if ($this->config['show_event_sum'] == 1 && $me->event_sum > 0 || $this->config['show_event_notice'] == 1 && strlen($me->notice) > 0) {
$sum_notice .= ' (';
if ($this->config['show_event_sum'] == 1 && $me->event_sum > 0) {
$sum_notice .= $me->event_sum;
}
if ($this->config['show_event_sum'] == 1 && $me->event_sum > 0 && ($this->config['show_event_notice'] == 1 && strlen($me->notice) > 0)) {
$sum_notice .= ' | ';
}
if ($this->config['show_event_notice'] == 1 && strlen($me->notice) > 0) {
示例15:
$picture = $row->picture;
}
if (!file_exists($picture)) {
$picture = JoomleagueHelper::getDefaultPlaceholder("player");
}
echo JoomleagueHelper::getPictureThumb($picture, $playerName, $this->config['player_picture_width'], $this->config['player_picture_height']);
?>
</td>
<?php
}
?>
<td class="td_l playername" width="30%">
<?php
if ($this->config['link_to_player'] == 1) {
$link = JoomleagueHelperRoute::getPlayerRoute($this->project->id, $row->tid, $row->pid);
echo JHtml::link($link, $playerName);
} else {
echo $playerName;
}
?>
</td>
<?php
if ($this->config['show_nation'] == 1) {
?>
<td class="td_c playercountry"><?php
echo Countries::getCountryFlag($row->country);
?>
</td>
<?php