本文整理汇总了PHP中Countries::getCountryFlag方法的典型用法代码示例。如果您正苦于以下问题:PHP Countries::getCountryFlag方法的具体用法?PHP Countries::getCountryFlag怎么用?PHP Countries::getCountryFlag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Countries
的用法示例。
在下文中一共展示了Countries::getCountryFlag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLogo
/**
* get img for team
* @param object ranking row
* @param int type = 1 for club small logo, 2 for country
* @return html string
*/
public static function getLogo($item, $type = 1)
{
if ($type == 1) {
if (!empty($item->logo_small)) {
return JHtml::image($item->logo_small, $item->short_name, 'class="teamlogo"');
}
} else {
if ($type == 2 && !empty($item->country)) {
return Countries::getCountryFlag($item->country, 'class="teamcountry"');
} else {
if ($type == 3) {
if (!empty($item->team_picture)) {
return JHtml::image($item->team_picture, $item->short_name, 'class="teamlogo"');
}
} else {
if ($type == 4) {
if (!empty($item->projectteam_picture)) {
return JHtml::image($item->projecteam_picture, $item->short_name, 'class="teamlogo"');
}
}
}
}
}
return '';
}
示例2: getLogo
/**
* get img for team
* @param object ranking row
* @param int type = 1 for club small logo, 2 for country
* @return html string
*/
function getLogo($item, $type = 1)
{
if ($type == 1) {
if (!empty($item->logo_small)) {
return JHTML::image(JURI::root() . $item->logo_small, $item->short_name, 'class="teamlogo"');
}
} else {
if ($type == 2 && !empty($item->country)) {
return Countries::getCountryFlag($item->country, 'class="teamcountry"');
}
}
return '';
}
示例3: getStaffLink
public static function getStaffLink($item, $params)
{
$flag = "";
if ($params->get('show_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_staff_link')) {
$link = JoomleagueHelperRoute::getStaffRoute($params->get('p'), $params->get('team'), $item->slug);
echo $flag . JHtml::link($link, $text);
} else {
echo '<i>' . JText::sprintf('%1$s', $flag . $text) . '</i>';
}
}
示例4: convertAddressString
public static function convertAddressString($name = '', $address = '', $state = '', $zipcode = '', $location = '', $country = '', $addressString = 'COM_JOOMLEAGUE_ADDRESS_FORM')
{
$resultString = '';
if (!empty($address) || !empty($state) || !empty($zipcode) || !empty($location)) {
$countryFlag = Countries::getCountryFlag($country);
$countryName = Countries::getCountryName($country);
$dummy = Countries::removeEmptyFields($name, $address, $state, $zipcode, $location, $countryFlag, $countryName, JText::_($addressString));
$dummy = str_replace('%NAME%', $name, $dummy);
$dummy = str_replace('%ADDRESS%', $address, $dummy);
$dummy = str_replace('%STATE%', $state, $dummy);
$dummy = str_replace('%ZIPCODE%', $zipcode, $dummy);
$dummy = str_replace('%LOCATION%', $location, $dummy);
$dummy = str_replace('%FLAG%', $countryFlag, $dummy);
$dummy = str_replace('%COUNTRY%', $countryName, $dummy);
$resultString .= $dummy;
}
$resultString .= ' ';
return $resultString;
}
示例5: array
if ($this->overallconfig['show_project_heading'] == 1 && $this->project) {
?>
<div class="componentheading">
<table class="contentpaneopen">
<tbody>
<?php
if ($this->overallconfig['show_project_country'] == 1) {
?>
<tr class="contentheading">
<td colspan="<?php
echo $nbcols;
?>
">
<?php
$country = $this->project->country;
echo Countries::getCountryFlag($country) . ' ' . Countries::getCountryName($country);
?>
</td>
</tr>
<?php
}
?>
<tr class="contentheading">
<?php
if ($this->overallconfig['show_project_sporttype_picture'] == 1) {
?>
<td>
<?php
// diddipoeler
echo JHTML::image($this->project->sport_type_picture, $this->project->sport_type_name, array('title' => $this->project->sport_type_name, 'width' => $this->overallconfig['picture_width']));
/*
示例6: getTeamClubIcon
/**
* returns html <img> for club assigned to team
* @param object team
* @param int type=1 for club small image,or 2 for club country
* @param boolean $with_space
* @return unknown_type
*/
public function getTeamClubIcon($team, $type = 1, $attribs = array())
{
if (!isset($team->name)) {
return "";
}
$title = $team->name;
$attribs = array_merge(array('title' => $title, $attribs));
if ($type == 1) {
if (!empty($team->logo_small) && JFile::exists($team->logo_small)) {
$image = JHTML::image($team->logo_small, $title, $attribs);
} else {
$image = JHTML::image(JURI::root() . JoomleagueHelper::getDefaultPlaceholder("clublogosmall"), $title, $attribs);
}
} elseif ($type == 2 && !empty($team->country)) {
$image = Countries::getCountryFlag($team->country);
if (empty($image)) {
$image = JHTML::image(JURI::root() . JoomleagueHelper::getDefaultPlaceholder("icon"), $title, $attribs);
}
} elseif ($type == 3 && !empty($team->country) && !empty($team->logo_small) && JFile::exists($team->logo_small)) {
//$image = Countries::getCountryFlag($team->country);
if (empty($image)) {
$image = JHTML::image($team->logo_small, $title, $attribs) . ' ' . Countries::getCountryFlag($team->country);
}
} elseif ($type == 3 && !empty($team->country) && !empty($team->logo_small) && !JFile::exists($team->logo_small)) {
//$image = Countries::getCountryFlag($team->country);
if (empty($image)) {
$image = JHTML::image(JURI::root() . JoomleagueHelper::getDefaultPlaceholder("icon"), $title, $attribs) . ' ' . Countries::getCountryFlag($team->country);
}
} elseif ($type == 4 && !empty($team->country) && !empty($team->logo_small) && JFile::exists($team->logo_small)) {
//$image = Countries::getCountryFlag($team->country);
if (empty($image)) {
$image = Countries::getCountryFlag($team->country) . ' ' . JHTML::image($team->logo_small, $title, $attribs);
}
} elseif ($type == 4 && !empty($team->country) && !empty($team->logo_small) && !JFile::exists($team->logo_small)) {
//$image = Countries::getCountryFlag($team->country);
if (empty($image)) {
$image = Countries::getCountryFlag($team->country) . ' ' . JHTML::image(JURI::root() . JoomleagueHelper::getDefaultPlaceholder("icon"), $title, $attribs);
}
} else {
$image = '';
}
return $image;
}
示例7:
?>
<span class='hasTip' title="<?php
echo JText::sprintf('COM_JOOMLEAGUE_PRED_RESULTS_RESULT_HINT', $match->homeName, $match->awayName, $outputStr);
?>
"><?php
echo $outputStr;
?>
</span><?php
if ($this->config['show_logo_small_overview'] == 1) {
echo '<br />' . JoomleagueModelPredictionResults::showClubLogo($match->awayLogo, $match->awayName) . '<br />';
if ($this->config['show_team_names'] == 1) {
echo $match->awayShortName . '<br />';
}
}
if ($this->config['show_logo_small_overview'] == 2) {
echo '<br />' . Countries::getCountryFlag($match->awayCountry);
if ($this->config['show_team_names'] == 1) {
echo $match->awayCountry . '<br />';
}
}
?>
</td>
<?php
}
?>
<?php
if ($this->config['show_points']) {
?>
<td <?php
echo $tdClassStr;
?>
示例8: foreach
?>
<?php
if (count($clubs) > 0) {
foreach ($clubs as $club) {
$idstring = $id . $params->get('moduleclass_sfx');
if ($mode == 'T') {
$birthdaytext .= '<div id="' . $idstring . '" class="textdiv">';
}
$club->default_picture = JoomleagueHelper::getDefaultPlaceholder('clublogobig');
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_club_flag') ? Countries::getCountryFlag($club->country) . " " : "";
$text = $club->name;
$usedname = $flag . $text;
$club_link = "";
$club_link = JoomleagueHelperRoute::getClubInfoRoute($club->project_id, $club->id);
$showname = JHTML::link($club_link, $usedname);
$birthdaytext .= '<div class="qslide">';
$birthdaytext .= '<div class="tckproject"><p>' . $showname . '</p></div>';
if ($params->get('show_picture') == 1) {
if (file_exists(JPATH_BASE . '/' . $club->picture) && $club->picture != '') {
$thispic = $club->picture;
} elseif (file_exists(JPATH_BASE . '/' . $club->default_picture) && $club->default_picture != '') {
$thispic = $club->default_picture;
}
$birthdaytext .= '<div style="width:100%"><center><img style="" src="' . JURI::base() . '/' . $thispic . '" alt="' . $text . '" title="' . $text . '"';
if ($params->get('picture_width') != '') {
示例9:
}
?>
<td class="info">
<table class="plinfo table">
<?php
if (!empty($this->person->country) && $this->config["show_nationality"] == 1) {
?>
<tr>
<td class=""><span class="label"><?php
echo JText::_('COM_JOOMLEAGUE_PERSON_NATIONALITY');
?>
</span>
</td>
<td class="data">
<?php
echo Countries::getCountryFlag($this->person->country) . " " . JText::_(Countries::getCountryName($this->person->country));
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="">
<span class="label"><?php
echo JText::_('COM_JOOMLEAGUE_PERSON_NAME');
?>
</span>
</td>
<td class="data">
<?php
示例10: array
</td>
<td nowrap='nowrap' class="td_c">
<?php
// clublogo oder vereinsflagge
if ($this->config['show_logo_small'] == 1) {
$logo_away = $this->model->getMatchTeamClubLogo($result->projectteam2_id);
if ($logo_away == '' || !file_exists($logo_away)) {
$logo_away = 'images/com_joomleague/database/placeholders/placeholder_small.gif';
}
$imgTitle = JText::sprintf('COM_JOOMLEAGUE_PRED_ENTRY_LOGO_OF', $awayName);
echo ' ';
echo JHTML::image($logo_away, $imgTitle, array(' title' => $imgTitle));
}
if ($this->config['show_logo_small'] == 2) {
$country_away = $this->model->getMatchTeamClubFlag($result->projectteam2_id);
echo Countries::getCountryFlag($country_away);
}
?>
</td>
<td nowrap='nowrap' class="td_l">
<?php
if (isset($favTeamsList[$predictionProject->project_id]) && $favTeamsList[$predictionProject->project_id] == $result->projectteam2_id) {
?>
<span style='background-color:yellow; color:black; padding:2px; '><?php
echo $awayName;
?>
</span>
<?php
} else {
echo $awayName;
}
示例11:
?>
</td>
</tr>
<tr>
<td class="key"><?php
echo $this->form->getLabel('alias');
?>
</td>
<td><?php
echo $this->form->getInput('alias');
?>
</td>
</tr>
<tr>
<td class="key"><?php
echo $this->form->getLabel('country');
?>
</td>
<td><?php
echo $this->form->getInput('country');
?>
<?php
echo Countries::getCountryFlag($this->form->getValue('country'));
?>
(<?php
echo $this->form->getValue('country');
?>
)</td>
</tr>
</table>
</fieldset>
示例12: switch
switch ($this->config['show_user_profile']) {
case 1:
// Link to Joomla Contact Page
$link = JoomleagueHelperRoute::getContactRoute($this->person->user_id);
$outputName = JHtml::link($link, $outputName);
break;
case 2:
// Link to CBE User Page with support for JoomLeague Tab
$link = JoomleagueHelperRoute::getUserProfileRouteCBE($this->person->user_id, $this->project->id, $this->person->id);
$outputName = JHtml::link($link, $outputName);
break;
default:
break;
}
}
echo $outputName . ' ' . Countries::getCountryFlag($this->person->country);
if (!empty($this->person->nickname)) {
?>
<tr>
<td align="right">
<b>
<?php
echo JText::_('Nickname');
?>
</b>
</td>
<td class="td_l">
<?php
echo $this->person->nickname;
?>
</td>
示例13: onContentSearch
//.........这里部分代码省略.........
$word = $db->Quote('%' . $db->getEscaped($word, true) . '%', false);
$wheres2 = array();
$wheres2[] = 'prj.name LIKE ' . $word;
$whereproject[] = implode(' OR ', $wheres2);
}
}
$where = '(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $wheres) . ')';
$whereteam = '(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $wheresteam) . ')';
$whereperson = '(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $whereperson) . ')';
$whereplayground = '(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $whereplayground) . ')';
$whereproject = '(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $whereproject) . ')';
break;
}
$rows = array();
if ($search_clubs) {
$query = "SELECT 'Club' as section, c.name AS title," . " c.founded AS created," . " c.country," . " c.logo_big AS picture," . " CONCAT( ' Address: ',c.address,' ',c.zipcode,' ',c.location,' Phone: ',c.phone,' Fax: ',c.fax,' E-Mail: ',c.email) AS text," . " pt.project_id AS project_id, c.id AS club_id, " . " '' AS href," . " '2' AS browsernav " . " FROM #__joomleague_club AS c" . " LEFT JOIN #__joomleague_team AS t ON c.id = t.club_id" . " LEFT JOIN #__joomleague_project_team AS pt ON pt.team_id = t.id" . " WHERE ( " . $where . " ) " . " GROUP BY c.name ORDER BY c.name";
$db->setQuery($query);
$list = $db->loadObjectList();
for ($i = 0; $i < count($list); $i++) {
$list[$i]->href = JoomLeagueHelperRoute::getClubInfoRoute($list[$i]->project_id, $list[$i]->club_id);
}
$rows[] = $list;
}
if ($search_teams) {
$query = "SELECT 'Team' as section, t.name AS title," . " t.checked_out_time AS created, t.notes AS text, t.id AS team_id, " . " CONCAT( ' Info: ',t.info , ' Notes: ', t.notes ) AS text," . " pt.project_id AS project_id, " . " pt.picture AS picture, " . " '' AS href, c.country AS country, " . " '2' AS browsernav" . " FROM #__joomleague_team AS t " . " LEFT JOIN #__joomleague_project_team AS pt ON pt.team_id = t.id" . " LEFT JOIN #__joomleague_club AS c ON t.club_id = c.id" . " WHERE ( " . $whereteam . " ) " . " GROUP BY t.name ORDER BY t.name";
$db->setQuery($query);
$list = $db->loadObjectList();
for ($i = 0; $i < count($list); $i++) {
$list[$i]->href = JoomLeagueHelperRoute::getTeamInfoRoute($list[$i]->project_id, $list[$i]->team_id);
}
$rows[] = $list;
}
if ($search_players) {
$query = "SELECT 'Person' as section, REPLACE(CONCAT(pe.firstname, ' \\'', pe.nickname, '\\' ' , pe.lastname ),'\\'\\'','') AS title," . " pe.birthday AS created," . " pe.country," . " pe.picture AS picture, " . " CONCAT( ' Birthday:',pe.birthday , ' Notes:', pe.notes ) AS text," . " pt.project_id AS project_id, pt.team_id as team_id, pe.id as person_id, " . " '' AS href," . " '2' AS browsernav" . " FROM #__joomleague_person AS pe" . " LEFT JOIN #__joomleague_team_player AS tp" . " ON tp.person_id = pe.id" . " LEFT JOIN #__joomleague_project_team AS pt ON pt.id = tp.projectteam_id" . " WHERE ( " . $whereperson . " ) " . " AND pe.published = '1' " . " GROUP BY pe.lastname, pe.firstname, pe.nickname " . " ORDER BY pe.lastname,pe.firstname,pe.nickname";
$db->setQuery($query);
$list = $db->loadObjectList();
for ($i = 0; $i < count($list); $i++) {
$list[$i]->href = JoomLeagueHelperRoute::getPlayerRoute($list[$i]->project_id, $list[$i]->team_id, $list[$i]->person_id);
}
$rows[] = $list;
}
if ($search_staffs) {
$query = "SELECT 'Staff' as section, REPLACE(CONCAT(pe.firstname, ' \\'', pe.nickname, '\\' ' , pe.lastname ),'\\'\\'','') AS title," . " pe.birthday AS created," . " pe.country," . " pe.picture AS picture, " . " CONCAT( ' Birthday:',pe.birthday , ' Notes:', pe.notes ) AS text," . " pt.project_id AS project_id, pt.team_id as team_id, pe.id as person_id, " . " '' AS href," . " '2' AS browsernav" . " FROM #__joomleague_person AS pe" . " LEFT JOIN #__joomleague_team_staff AS ts" . " ON ts.person_id = pe.id " . " LEFT JOIN #__joomleague_project_team AS pt" . " ON pt.id = tp.projectteam_id" . " WHERE ( " . $whereperson . " ) " . " AND pe.published = '1' " . " GROUP BY pe.lastname, pe.firstname, pe.nickname " . " ORDER BY pe.lastname,pe.firstname,pe.nickname";
$db->setQuery($query);
$list = $db->loadObjectList();
for ($i = 0; $i < count($list); $i++) {
$list[$i]->href = JoomLeagueHelperRoute::getStaffRoute($list[$i]->project_id, $list[$i]->team_id, $list[$i]->person_id);
}
$rows[] = $list;
}
if ($search_referees) {
$query = "SELECT 'Referee' as section, REPLACE(CONCAT(pe.firstname, ' \\'', pe.nickname, '\\' ' , pe.lastname ),'\\'\\'','') AS title," . " pe.birthday AS created," . " pe.country," . " pe.picture AS picture, " . " CONCAT( 'Birthday:', pe.birthday, ' Notes:', pe.notes ) AS text," . " pt.project_id AS project_id, pe.id as person_id, " . " ''AS href," . " '2' AS browsernav" . " FROM #__joomleague_person AS pe" . " LEFT JOIN #__joomleague_project_referee AS pr" . " ON pr.person_id = pe.id" . " WHERE ( " . $whereperson . " ) " . " AND pe.published = '1' " . " AND pr.published = '1' " . " GROUP BY pe.lastname, pe.firstname, pe.nickname " . " ORDER BY pe.lastname,pe.firstname,pe.nickname";
$db->setQuery($query);
$list = $db->loadObjectList();
for ($i = 0; $i < count($list); $i++) {
$list[$i]->href = JoomLeagueHelperRoute::getRefereeRoute($list[$i]->project_id, $list[$i]->team_id, $list[$i]->person_id);
}
$rows[] = $list;
}
if ($search_playgrounds) {
$query = "SELECT 'Playground' as section, pl.name AS title," . " pl.checked_out_time AS created," . " pl.country," . " pl.picture AS picture, " . " pl.notes AS text," . " pt.project_id AS project_id, pl.id as playground_id, " . " '' AS href," . " '2' AS browsernav" . " FROM #__joomleague_playground AS pl" . " LEFT JOIN #__joomleague_club AS c" . " ON c.id = pl.club_id" . " LEFT JOIN #__joomleague_match AS m" . " ON m.playground_id = pl.id" . " LEFT JOIN #__joomleague_round AS r" . " ON m.round_id = r.id" . " WHERE ( " . $whereplayground . " ) " . " GROUP BY pl.name ORDER BY pl.name ";
$db->setQuery($query);
$list = $db->loadObjectList();
for ($i = 0; $i < count($list); $i++) {
$list[$i]->href = JoomLeagueHelperRoute::getPlaygroundRoute($list[$i]->project_id, $list[$i]->playgroundid);
}
$rows[] = $list;
}
if ($search_projects) {
$query = "SELECT 'Project' as section, prj.name AS title," . " prj.checked_out_time AS created," . " l.country," . " prj.picture AS picture, " . " prj.project_id AS project_id, " . " '' AS href," . " '2' AS browsernav" . " FROM #__joomleague_project AS prj" . " LEFT JOIN #__joomleague_league AS l" . " ON l.id = prj.league_id" . " WHERE ( " . $whereproject . " ) " . " GROUP BY prj.name ";
" ORDER BY prj.name ";
$db->setQuery($query);
$list = $db->loadObjectList();
for ($i = 0; $i < count($list); $i++) {
$list[$i]->href = JoomLeagueHelperRoute::getRankingRoute($list[$i]->project_id);
}
$rows[] = $list;
}
$results = array();
if (count($rows)) {
foreach ($rows as $row) {
if ($row) {
foreach ($row as $output) {
if ($output->country) {
$flag = Countries::getCountryFlag($output->country);
$output->flag = $flag;
$output->text = $flag . ' ' . $output->text;
}
if ($output->picture) {
$output->text = '<p><img style="float: left;" src="' . $output->picture . '" alt="" width="50" height="" >' . $output->text . '</p>';
}
}
}
}
foreach ($rows as $row) {
$results = array_merge($results, (array) $row);
}
}
return $results;
}
示例14:
$picture = $game->{$pic};
$type = 1;
echo JoomleagueHelper::getPictureThumb($picture, $game->tname1, $this->config['picture_width'], $this->config['picture_height'], $type);
break;
case 'country_small':
$type = 6;
$pic = 'away_country';
if ($game->{$pic} != '' && !empty($game->{$pic})) {
echo Countries::getCountryFlag($game->{$pic}, 'height="11"');
}
break;
case 'country_big':
$type = 7;
$pic = 'away_country';
if ($game->{$pic} != '' && !empty($game->{$pic})) {
echo Countries::getCountryFlag($game->{$pic}, 'height="50"');
}
break;
}
?>
</td>
<?php
}
?>
<td class="td_l">
<?php
echo $tname2;
?>
</td>
<?php
if ($this->config['show_referee'] == 1) {
示例15:
<li class="modjlgrandomplayer"><?php
$picturetext = JText::_('JL_PERSON_PICTURE');
$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) . " ";