当前位置: 首页>>代码示例>>PHP>>正文


PHP JoomleagueHelper::formatTeamName方法代码示例

本文整理汇总了PHP中JoomleagueHelper::formatTeamName方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomleagueHelper::formatTeamName方法的具体用法?PHP JoomleagueHelper::formatTeamName怎么用?PHP JoomleagueHelper::formatTeamName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JoomleagueHelper的用法示例。


在下文中一共展示了JoomleagueHelper::formatTeamName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showNotPlayingTeams

 /**
  * return html code for not playing teams
  * 
  * @param array $games
  * @param array $teams
  * @param array $config
  * @param array $favteams
  * @param object $project
  * @return string html
  */
 public function showNotPlayingTeams(&$games, &$teams, &$config, &$favteams, &$project)
 {
     $output = '';
     $playing_teams = array();
     foreach ($games as $game) {
         self::addPlayingTeams($playing_teams, $game->projectteam1_id, $game->projectteam2_id, $game->published);
     }
     $x = 0;
     $not_playing = count($teams) - count($playing_teams);
     if ($not_playing > 0) {
         $output .= '<b>' . JText::sprintf('COM_JOOMLEAGUE_RESULTS_TEAMS_NOT_PLAYING', $not_playing) . '</b> ';
         foreach ($teams as $id => $team) {
             if (isset($team->projectteamid) && in_array($team->projectteamid, $playing_teams)) {
                 continue;
                 //if team is playing,go to next
             }
             if ($x > 0) {
                 $output .= ', ';
             }
             if ($config['show_logo_small'] > 0 && $config['show_dnp_teams_icons']) {
                 $output .= self::getTeamClubIcon($team, $config['show_logo_small']) . '&nbsp;';
             }
             $isFavTeam = in_array($team->id, $favteams);
             $output .= JoomleagueHelper::formatTeamName($team, 't' . $team->id, $config, $isFavTeam);
             $x++;
         }
     }
     return $output;
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:39,代码来源:view.html.php

示例2: in_array

         					$config['team_picture_height'],3);
         */
     }
     echo '</td>';
     echo "\n";
 }
 //**************Team name
 echo '<td class="rankingrow_teamname" nowrap="nowrap"';
 if ($color != '' && $config['use_background_row_color']) {
     echo ' style="background-color: ' . $color . '"';
 }
 echo ">";
 $isFavTeam = in_array($team->team->id, explode(",", $this->project->fav_team));
 // TODO: ranking deviates from the other views, regarding highlighting of the favorite team(s). Align this...
 $config['highlight_fav'] = $isFavTeam;
 echo JoomleagueHelper::formatTeamName($team->team, 'tr' . $team->team->id, $config, $isFavTeam);
 echo '</td>';
 echo "\n";
 //**********START OPTIONAL COLUMNS DISPLAY
 foreach ($columns as $c) {
     switch (trim(strtoupper($c))) {
         case 'PLAYED':
             echo '<td class="rankingrow_played" ';
             if ($color != '' && $config['use_background_row_color']) {
                 echo 'style="background-color:' . $color . '"';
             }
             echo '>';
             printf($format, $team->cnt_matches);
             echo '</td>';
             echo "\n";
             break;
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:31,代码来源:default_rankingrows.php

示例3: in_array

         $teamB .= '<td class="' . $class2 . '">';
         $teamB .= Countries::getCountryFlag($guestteam->country);
         $teamB .= '</td>';
         break;
     case 3:
         $teamA .= '<td class="' . $class1 . '">';
         $teamA .= JoomleagueHelper::getPictureThumb($hometeam->picture, $hometeam->name, $this->config['team_picture_width'], $this->config['team_picture_height'], 1);
         $teamA .= '</td>';
         $teamB .= '<td class="' . $class2 . '">';
         $teamB .= JoomleagueHelper::getPictureThumb($guestteam->picture, $guestteam->name, $this->config['team_picture_width'], $this->config['team_picture_height'], 1);
         $teamB .= '</td>';
         break;
 }
 $seperator = '<td width="10">' . $this->config['seperator'] . '</td>';
 $isFavTeam = in_array($guestteam->id, $this->favteams);
 $away = JoomleagueHelper::formatTeamName($guestteam, "g" . $match->id . "t" . $guestteam->id, $this->config, $isFavTeam, $awaylink);
 $teamB .= '<td class="' . $class2 . '">' . $away . '</td>';
 if (!$match->cancel) {
     // In case show_part_results is true, then first check if the part results are available;
     // 'No part results available' occurs when teamX_result_split ONLY consists of zero or more ";"
     // (zero for projects with a single playing period, one or more for projects with two or more playing periods)
     $team1_result_split_present = preg_match('/^;*$/', $match->team1_result_split) == 0;
     $team2_result_split_present = preg_match('/^;*$/', $match->team2_result_split) == 0;
     if ($this->config['switch_home_guest']) {
         $result = $match->team2_result . '&nbsp;' . $this->config['seperator'] . '&nbsp;' . $match->team1_result;
         $part_results_left = explode(";", $match->team2_result_split);
         $part_results_right = explode(";", $match->team1_result_split);
         $leftResultOT = $match->team2_result_ot;
         $rightResultOT = $match->team1_result_ot;
         $leftResultSO = $match->team2_result_so;
         $rightResultSO = $match->team1_result_so;
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:31,代码来源:default_plan.php

示例4:

                echo Countries::getCountryFlag($row->country);
                ?>
</td>
		<?php 
            }
            ?>

		<td class="td_l playerteam" width="30%">
			<?php 
            $team = $this->teams[$row->tid];
            if ($this->config['link_to_team'] == 1 && $this->project->id > 0 && $row->tid > 0) {
                $link = JoomleagueHelperRoute::getTeamInfoRoute($this->project->id, $row->tid);
            } else {
                $link = null;
            }
            $teamName = JoomleagueHelper::formatTeamName($team, "t" . $row->tid, $this->config, $highlightFavTeam, $link);
            echo $teamName;
            ?>
		</td>

		<?php 
            $value = $row->p > 9 ? $row->p : '&nbsp;' . $row->p;
            ?>
		<td class="td_c playertotal"><?php 
            echo $value;
            ?>
</td>
	</tr>
	<?php 
            $k = 1 - $k;
        }
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:31,代码来源:default_eventsrank.php

示例5: array

				<?php 
                echo $this->getTeamClubIcon($team1, $this->config['show_logo_small'], array('class' => 'teamlogo'));
                ?>
			</td>
			<td width='5'>
			-
			</td>
			<td width='20'>
				<?php 
                echo $this->getTeamClubIcon($team2, $this->config['show_logo_small'], array('class' => 'teamlogo'));
                ?>
			</td>
			<td class='left'>
				<?php 
                $isFavTeam = in_array($team2->id, $this->favteams);
                echo JoomleagueHelper::formatTeamName($team2, 'g' . $game->id, $this->config, $isFavTeam);
                ?>
			</td>
			<!-- show match score -->
			<td width='5' class='score' nowrap='nowrap'>
				<?php 
                echo '&nbsp;';
                echo $this->formatResult($this->teams[$game->projectteam1_id], $this->teams[$game->projectteam2_id], $game, $report_link);
                echo '&nbsp;';
                ?>
			</td>
			<?php 
            }
            //--------------------------------------------------------------------------------------------------------------
            ?>
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:30,代码来源:default_results_style_dfcday.php

示例6: in_array

 $hometeam->club_slug = $game->club1_slug;
 $hometeam->team_slug = $game->team1_slug;
 $tname1 = JoomleagueHelper::formatTeamName($hometeam, 'clubplanhome' . $cnt++, $this->config, $isFavTeam, $link1);
 $isFavTeam = false;
 $isFavTeam = in_array($game->team2_id, $favteams);
 $awayteam->name = $game->tname2;
 $awayteam->team_id = $game->team2_id;
 $awayteam->id = $game->team2_id;
 $awayteam->short_name = $game->tname2_short;
 $awayteam->middle_name = $game->tname2_middle;
 $awayteam->project_id = $game->prid;
 $awayteam->club_id = $game->t2club_id;
 $awayteam->projectteamid = $game->projectteam2_id;
 $awayteam->club_slug = $game->club2_slug;
 $awayteam->team_slug = $game->team2_slug;
 $tname2 = JoomleagueHelper::formatTeamName($awayteam, 'clubplanaway' . $cnt++, $this->config, $isFavTeam, $link2);
 $favStyle = '';
 if ($this->config['highlight_fav'] == 1 && !$club_id) {
     $isFavTeam = in_array($game->team1_id, $favteams) || in_array($game->team2_id, $favteams);
     if ($isFavTeam && $favs->fav_team_highlight_type == 1) {
         if (trim($favs->fav_team_color) != "") {
             $color = trim($favs->fav_team_color);
         }
         $format = "%s";
         $favStyle = ' style="';
         $favStyle .= $favs->fav_team_text_bold != '' ? 'font-weight:bold;' : '';
         $favStyle .= trim($favs->fav_team_text_color) != '' ? 'color:' . trim($favs->fav_team_text_color) . ';' : '';
         $favStyle .= $color != '' ? 'background-color:' . $color . ';' : '';
         if ($favStyle != ' style="') {
             $favStyle .= '"';
         } else {
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:31,代码来源:default_matches.php

示例7:

		<?php 
            }
            ?>

		<?php 
            if ($this->config['show_team'] == 1) {
                ?>
		<td class="td_l playerteam">
			<?php 
                $team = $this->teams[$row->team_id];
                if ($this->config['link_to_team'] == 1 && $this->project->id > 0 && $row->team_id > 0) {
                    $link = JoomleagueHelperRoute::getTeamInfoRoute($this->project->id, $row->team_id);
                } else {
                    $link = null;
                }
                $teamName = JoomleagueHelper::formatTeamName($team, "t" . $row->team_id, $this->config, $isFavTeam, $link);
                echo $teamName;
                ?>
		</td>
		<?php 
            }
            ?>

		<td class="td_r playertotal"><?php 
            echo $row->total;
            ?>
</td>
	</tr>
	<?php 
            $k = 1 - $k;
        }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:31,代码来源:default_stats.php

示例8: in_array

        continue;
    }
    $team = JArrayHelper::toObject($v);
    if (empty($team->id)) {
        continue;
    }
    ?>
	<tr class="<?php 
    echo $k == 0 ? $this->config['style_class1'] : $this->config['style_class2'];
    ?>
">
		<td class="name_row"><?php 
    $isFavTeam = in_array($team->id, explode(",", $this->project->fav_team));
    // TODO: ranking deviates from the other views, regarding highlighting of the favorite team(s). Align this...
    $config['highlight_fav'] = $isFavTeam;
    echo JoomleagueHelper::formatTeamName($team, 'tr' . $k, $this->config, $isFavTeam);
    //echo $v['name'];
    ?>
</td>
		<td class="match_row"><?php 
    echo $v['match'];
    ?>
</td>
		<td class="win_row"><?php 
    echo $v['win'] != 0 ? $v['win'] : 0;
    ?>
</td>
		<td class="tie_row"><?php 
    echo $v['tie'] != 0 ? $v['tie'] : 0;
    ?>
</td>
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:31,代码来源:default_rivals.php

示例9: in_array

 $hometeam->middle_name = $game->tname1_middle;
 $hometeam->project_id = $game->prid;
 $hometeam->club_id = $game->t1club_id;
 $hometeam->projectteamid = $game->projectteam1_id;
 $tname1 = JoomleagueHelper::formatTeamName($hometeam, "c" . $counter . "g" . $game->id, $this->config, $isFavTeam);
 $isFavTeam = false;
 $isFavTeam = in_array($game->team2_id, $this->favteams);
 $awayteam->name = $game->tname2;
 $awayteam->team_id = $game->team2_id;
 $awayteam->id = $game->team2_id;
 $awayteam->short_name = $game->tname2_short;
 $awayteam->middle_name = $game->tname2_middle;
 $awayteam->project_id = $game->prid;
 $awayteam->club_id = $game->t2club_id;
 $awayteam->projectteamid = $game->projectteam2_id;
 $tname2 = JoomleagueHelper::formatTeamName($awayteam, "c" . $counter . "g" . $game->id, $this->config, $isFavTeam);
 $favStyle = '';
 if ($this->config['highlight_fav'] == 1 && !$club_id) {
     $isFavTeam = in_array($game->team1_id, $this->favteams) ? 1 : in_array($game->team2_id, $this->favteams);
     if ($isFavTeam && $this->project->fav_team_highlight_type == 1) {
         if (trim($this->project->fav_team_color) != "") {
             $color = trim($this->project->fav_team_color);
         }
         $format = "%s";
         $favStyle = ' style="';
         $favStyle .= $this->project->fav_team_text_bold != '' ? 'font-weight:bold;' : '';
         $favStyle .= trim($this->project->fav_team_text_color) != '' ? 'color:' . trim($this->project->fav_team_text_color) . ';' : '';
         $favStyle .= $color != '' ? 'background-color:' . $color . ';' : '';
         if ($favStyle != ' style="') {
             $favStyle .= '"';
         } else {
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:31,代码来源:default_matches_sorted_by_date.php

示例10: in_array

 $hometeam->middle_name = $game->tname1_middle;
 $hometeam->project_id = $game->prid;
 $hometeam->club_id = $game->t1club_id;
 $hometeam->projectteamid = $game->projectteam1_id;
 $tname1 = JoomleagueHelper::formatTeamName($hometeam, 'clubplan', $this->config, $isFavTeam);
 $isFavTeam = false;
 $isFavTeam = in_array($game->team2_id, $this->favteams);
 $awayteam->name = $game->tname2;
 $awayteam->team_id = $game->team2_id;
 $awayteam->id = $game->team2_id;
 $awayteam->short_name = $game->tname2_short;
 $awayteam->middle_name = $game->tname2_middle;
 $awayteam->project_id = $game->prid;
 $awayteam->club_id = $game->t2club_id;
 $awayteam->projectteamid = $game->projectteam2_id;
 $tname2 = JoomleagueHelper::formatTeamName($awayteam, 'clubplan', $this->config, $isFavTeam);
 $favStyle = '';
 if ($this->config['highlight_fav'] == 1 && !$club_id) {
     $isFavTeam = in_array($game->team1_id, $this->favteams) ? 1 : in_array($game->team2_id, $this->favteams);
     if ($isFavTeam && $this->project->fav_team_highlight_type == 1) {
         if (trim($this->project->fav_team_color) != "") {
             $color = trim($this->project->fav_team_color);
         }
         $format = "%s";
         $favStyle = ' style="';
         $favStyle .= $this->project->fav_team_text_bold != '' ? 'font-weight:bold;' : '';
         $favStyle .= trim($this->project->fav_team_text_color) != '' ? 'color:' . trim($this->project->fav_team_text_color) . ';' : '';
         $favStyle .= $color != '' ? 'background-color:' . $color . ';' : '';
         if ($favStyle != ' style="') {
             $favStyle .= '"';
         } else {
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:31,代码来源:default_matches_sorted_by_date.php


注:本文中的JoomleagueHelper::formatTeamName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。