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


PHP JoomleagueHelper::getDefaultPlaceholder方法代码示例

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


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

示例1: getLogo

 /**
  * get img for team
  * @param object teams row
  * @param int type = 0 for club small logo, 1 for medium logo, 2 for big logo
  * @return html string
  */
 function getLogo($item, $type = 1)
 {
     if ($type == 0) {
         $picture = $item->logo_small;
         if (is_null($item->logo_small) || !file_exists($picture)) {
             $picture = JoomleagueHelper::getDefaultPlaceholder('clublogosmall');
         }
         echo JHTML::image($picture, $item->team_name, 'class="logo_small" title="View ' . $item->team_name . '"');
     } else {
         if ($type == 1) {
             $picture = $item->logo_middle;
             if (is_null($item->logo_middle) || !file_exists($picture)) {
                 $picture = JoomleagueHelper::getDefaultPlaceholder('clublogomedium');
             }
             echo JHTML::image($picture, $item->team_name, 'class="logo_middle" title="View ' . $item->team_name . '"');
         } else {
             if ($type == 2) {
                 $picture = $item->logo_big;
                 if (is_null($item->logo_big) || !file_exists($picture)) {
                     $picture = JoomleagueHelper::getDefaultPlaceholder('clublogobig');
                 }
                 echo JHTML::image($picture, $item->team_name, 'class="logo_big" title="View ' . $item->team_name . '"');
             } else {
                 if ($type == 3) {
                     $picture = $item->team_picture;
                     if (is_null($item->team_picture) || !file_exists($picture)) {
                         $picture = JoomleagueHelper::getDefaultPlaceholder('team');
                     }
                     echo JHTML::image($picture, $item->team_name, 'class="team_picture" title="View ' . $item->team_name . '"');
                 } else {
                     if ($type == 4) {
                         $picture = $item->projectteam_picture;
                         if (is_null($item->projectteam_picture) || !file_exists($picture)) {
                             $picture = JoomleagueHelper::getDefaultPlaceholder('team');
                         }
                         echo JHTML::image($picture, $item->team_name, 'class="projecteam_picture" title="View ' . $item->team_name . '"');
                     }
                 }
             }
         }
     }
     return '';
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:49,代码来源:helper.php

示例2: display

 function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $model = $this->getModel();
     $item =& $this->get('item');
     $form =& $this->get('form');
     $isNew = $item->id < 1;
     $edit = JRequest::getVar('edit', true);
     // fail if checked out not by 'me'
     if ($model->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('The item'), $item->name);
         $mainframe->redirect('index.php?option=' . $option . '&view=statistics', $msg, 'error');
     }
     // Edit or Create?
     if (!$isNew) {
         $model->checkout($user->get('id'));
     }
     // icon
     //if there is no icon selected, use default icon
     $default = JoomleagueHelper::getDefaultPlaceholder("icon");
     if (empty($item->icon)) {
         $item->icon = $default;
     }
     if (!empty($item->class)) {
         /*
          * statistic class parameters
          */
         $class =& JLGStatistic::getInstance($item->class);
         $this->assign('calculated', $class->getCalculated());
     }
     $this->assignRef('item', $item);
     $this->assignRef('edit', $edit);
     $this->assignRef('form', $form);
     $this->assignRef('fieldsets', $form->getFieldsets());
     $this->assign('cfg_which_media_tool', JComponentHelper::getParams($option)->get('cfg_which_media_tool', 0));
     $this->addToolbar();
     JHTML::_('behavior.tooltip');
     parent::display($tpl);
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:43,代码来源:view.html.php

示例3: display

 function display($tpl = null)
 {
     $this->form = $this->get('form');
     $this->edit = JRequest::getVar('edit', true);
     // icon
     //if there is no icon selected, use default icon
     $default = JoomleagueHelper::getDefaultPlaceholder("icon");
     $icon = $this->form->getValue('icon');
     if (empty($icon)) {
         $this->form->setValue('icon', $default);
     }
     $class = $this->form->getValue('class');
     if (!empty($class)) {
         /*
          * statistic class parameters
          */
         $class = JLGStatistic::getInstance($class);
         $this->calculated = $class->getCalculated();
     }
     $this->addToolbar();
     JHtml::_('behavior.tooltip');
     parent::display($tpl);
 }
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:23,代码来源:view.html.php

示例4: save

 function save()
 {
     $mainframe = JFactory::getApplication();
     // Check for request forgeries
     JRequest::checkToken() or die('COM_JOOMLEAGUE_GLOBAL_INVALID_TOKEN');
     // Sanitize
     $task = JRequest::getVar('task');
     //$mainframe->enqueueMessage(JText::_('settings task -> '.'<pre>'.print_r($task,true).'</pre>' ),'');
     $data = JRequest::get('post');
     $data['option'] = 'com_joomleague';
     $params = JRequest::getVar('params', array(), 'post', 'array');
     $model = $this->getModel('settings');
     $defPh = JoomleagueHelper::getDefaultPlaceholder('player');
     $newPh = $params['ph_player'];
     if ($newPh != $defPh) {
         if (!$model->updatePlaceholder('#__joomleague_person', 'picture', $defPh, $newPh)) {
             $msg = $model->getError();
         }
         if (!$model->updatePlaceholder('#__joomleague_team_player', 'picture', $defPh, $newPh)) {
             $msg = $model->getError();
         }
         if (!$model->updatePlaceholder('#__joomleague_team_staff', 'picture', $defPh, $newPh)) {
             $msg = $model->getError();
         }
         if (!$model->updatePlaceholder('#__joomleague_project_referee', 'picture', $defPh, $newPh)) {
             $msg = $model->getError();
         }
     }
     $defPh = JoomleagueHelper::getDefaultPlaceholder('clublogobig');
     $newPh = $params['ph_logo_big'];
     if ($newPh != $defPh) {
         if (!$model->updatePlaceholder('#__joomleague_club', 'logo_big', $defPh, $newPh)) {
             $msg = $model->getError();
         }
         if (!$model->updatePlaceholder('#__joomleague_playground', 'picture', $defPh, $newPh)) {
             $msg = $model->getError();
         }
     }
     $defPh = JoomleagueHelper::getDefaultPlaceholder('clublogomedium');
     $newPh = $params['ph_logo_medium'];
     if ($newPh != $defPh) {
         if (!$model->updatePlaceholder('#__joomleague_club', 'logo_middle', $defPh, $newPh)) {
             $msg = $model->getError();
         }
     }
     $defPh = JoomleagueHelper::getDefaultPlaceholder('clublogosmall');
     $newPh = $params['ph_logo_small'];
     if ($newPh != $defPh) {
         if (!$model->updatePlaceholder('#__joomleague_club', 'logo_small', $defPh, $newPh)) {
             $msg = $model->getError();
         }
     }
     $defPh = JoomleagueHelper::getDefaultPlaceholder('icon');
     $newPh = $params['ph_icon'];
     if ($newPh != $defPh) {
         if (!$model->updatePlaceholder('#__joomleague_statistic', 'icon', $defPh, $newPh)) {
             $msg = $model->getError();
         }
         if (!$model->updatePlaceholder('#__joomleague_sports_type', 'icon', $defPh, $newPh)) {
             $msg = $model->getError();
         }
         if (!$model->updatePlaceholder('#__joomleague_eventtype', 'icon', $defPh, $newPh)) {
             $msg = $model->getError();
         }
     }
     $defPh = JoomleagueHelper::getDefaultPlaceholder('team');
     $newPh = $params['ph_team'];
     if ($newPh != $defPh) {
         if (!$model->updatePlaceholder('#__joomleague_team', 'picture', $defPh, $newPh)) {
             $msg = $model->getError();
         }
         if (!$model->updatePlaceholder('#__joomleague_project_team', 'picture', $defPh, $newPh)) {
             $msg = $model->getError();
         }
     }
     $xmlfile = JPATH_ADMINISTRATOR . DS . 'components' . DS . $data['option'] . DS . 'config.xml';
     $form =& JForm::getInstance($data['option'], $xmlfile, array('control' => 'params'), false, "/config");
     $data['params'] = $model->validate($form, $params);
     // Save the rules.
     if (isset($data['params']['rules'])) {
         $rules = new JAccessRules($data['params']['rules']);
         $asset = JTable::getInstance('asset');
         if (!$asset->loadByName($data['option'])) {
             $root = JTable::getInstance('asset');
             $root->loadByName('root.1');
             $asset->name = $data['option'];
             $asset->title = $data['option'];
             $asset->setLocation($root->id, 'last-child');
         }
         $asset->rules = (string) $rules;
         if (!$asset->check() || !$asset->store()) {
             $this->setError($asset->getError());
             return false;
         }
     }
     unset($data['params']['rules']);
     $table =& JTable::getInstance('extension');
     if (!$table->load(array("element" => "com_joomleague", "type" => "component"))) {
         JError::raiseWarning(500, 'Not a valid component');
         return false;
//.........这里部分代码省略.........
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:101,代码来源:settings.php

示例5: defined

<?php

defined('_JEXEC') or die('Restricted access');
?>

<?php 
if ($this->playground->picture) {
    ?>

 <h2><?php 
    echo JText::_('COM_JOOMLEAGUE_PLAYGROUND_CLUB_PICTURE');
    ?>
</h2>  
		<div class="venuecontent picture">
                <?php 
    if ($this->playground->picture) {
        echo JHTML::image(JURI::root() . $this->playground->picture, $this->playground->name);
    } else {
        echo JHTML::image(JURI::root() . JoomleagueHelper::getDefaultPlaceholder("team"), $this->playground->name);
    }
    ?>
		</div>
    <?php 
}
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:24,代码来源:default_picture.php

示例6: showEvents_Timelines2

 function showEvents_Timelines2($eventid = 0, $projectteamid = 0)
 {
     $result = '';
     $eventcounter = array();
     foreach ($this->eventtypes as $event) {
         foreach ($this->matchevents as $me) {
             if ($me->event_type_id == $event->id && $me->ptid == $this->match->projectteam2_id) {
                 $placeholder = JoomleagueHelper::getDefaultPlaceholder("player");
                 // set teamplayer picture
                 if ($me->tppicture1 != $placeholder && !empty($me->tppicture1)) {
                     $picture = $me->tppicture1;
                 } elseif (($me->tppicture1 == $placeholder || empty($me->tppicture1)) && ($me->picture1 != $placeholder && !empty($me->picture1))) {
                     $picture = $me->picture1;
                 } else {
                     $picture = '';
                 }
                 if (in_array($me->event_time, $eventcounter)) {
                     $result .= JoomleagueViewMatchReport::_formatTimelineEvent($me, $event, $me->firstname1, $me->nickname1, $me->lastname1, $picture, 2);
                 } else {
                     $result .= JoomleagueViewMatchReport::_formatTimelineEvent($me, $event, $me->firstname1, $me->nickname1, $me->lastname1, $picture, 0);
                 }
                 $eventcounter[] = $me->event_time;
             }
         }
     }
     return $result;
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:27,代码来源:view.html.php

示例7:

</h2>

<table class="plgeneralinfo table">
	<tr>
	<?php 
if ($this->config['show_player_photo'] == 1) {
    ?>
		<td class="picture"><?php 
    $picturetext = JText::_('COM_JOOMLEAGUE_PERSON_PICTURE');
    $imgTitle = JText::sprintf($picturetext, JoomleagueHelper::formatName(null, $this->person->firstname, $this->person->nickname, $this->person->lastname, $this->config["name_format"]));
    $picture = $this->teamPlayer ? $this->teamPlayer->picture : null;
    if (empty($picture) || $picture == JoomleagueHelper::getDefaultPlaceholder("player")) {
        $picture = $this->person->picture;
    }
    if (!file_exists($picture)) {
        $picture = JoomleagueHelper::getDefaultPlaceholder("player");
    }
    echo JoomleagueHelper::getPictureThumb($picture, $imgTitle, $this->config['picture_width'], $this->config['picture_height']);
    ?>
</td>
		<?php 
}
?>
		<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');
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:31,代码来源:default_info.php

示例8: defined

<?php

/**
 * Joomleague
 *
 * @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;
?>

<?php 
$picture = $this->projectteam->projectteam_picture;
// only show projectteam picture when the user has uploaded one (showing a placeholder here doesn't make sense)
if (!empty($picture) && $picture != JoomleagueHelper::getDefaultPlaceholder("team")) {
    ?>
	<table width="96%" align="center" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td align="center">
				<?php 
    $imgTitle = JText::sprintf('COM_JOOMLEAGUE_TEAMPLAN_PICTURE_TEAM', $this->projectteam->name);
    echo JoomleagueHelper::getPictureThumb($picture, $imgTitle, $this->config['page_header_team_picture_width'], $this->config['page_header_team_picture_height']);
    ?>
			</td>
		</tr>
	</table>
<?php 
}
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:29,代码来源:default_picture.php

示例9: getDefaultLogos

 public function getDefaultLogos()
 {
     return array("club_big" => JoomleagueHelper::getDefaultPlaceholder('clublogobig'), "club_middle" => JoomleagueHelper::getDefaultPlaceholder('clublogomedium'), "club_small" => JoomleagueHelper::getDefaultPlaceholder('clublogosmall'), "team_picture" => JoomleagueHelper::getDefaultPlaceholder('team'), "country" => JoomleagueHelper::getDefaultPlaceholder('icon'));
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:4,代码来源:joomleague.php

示例10: getClubIconHtmlSimple

 function getClubIconHtmlSimple($logo_small, $country, $type = 1, $with_space = 0)
 {
     if ($type == 1) {
         $params = array();
         $params["align"] = "top";
         $params["border"] = 0;
         if ($with_space == 1) {
             $params["style"] = "padding:1px;";
         }
         if ($logo_small == "") {
             $logo_small = JoomleagueHelper::getDefaultPlaceholder("clublogosmall");
         }
         return JHTML::image($logo_small, "", $params);
     } elseif ($type == 2 && isset($country)) {
         return Countries::getCountryFlag($team->country);
     }
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:17,代码来源:clubplan.php

示例11: foreach

} else {
    $birthdaytext = "";
}
$id = 1;
$idstring = '';
$idstring = $id . $params->get('moduleclass_sfx');
?>

<?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) . "&nbsp;" : "";
        $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 != '') {
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:31,代码来源:default.php

示例12: array

?>

<?php 
// Show team-picture if defined.
if ($this->config['show_team_logo'] == 1) {
    ?>
		<table width="96%" align="center" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td align="center">
					<?php 
    $picture = $this->projectteam->picture;
    if (empty($picture) || $picture == JoomleagueHelper::getDefaultPlaceholder("team")) {
        $picture = $this->team->picture;
    }
    if (!file_exists($picture)) {
        $picture = JoomleagueHelper::getDefaultPlaceholder("team");
    }
    $imgTitle = JText::sprintf('COM_JOOMLEAGUE_ROSTER_PICTURE_TEAM', $this->team->name);
    if (!$this->config['show_highslide'] || !$this->config['show_team_logo_highslide']) {
        /*
                  echo JoomleagueHelper::getPictureThumb($picture, $imgTitle,
        										$this->config['team_picture_width'],
        										$this->config['team_picture_height']);
        */
        echo JHTML::image($picture, $imgTitle, array('title' => $imgTitle, 'width' => $this->config['team_picture_width']));
    } else {
        ?>
<a href="<?php 
        echo $picture;
        ?>
" alt="<?php 
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:31,代码来源:default_picture.php

示例13:

<?php

/**
 * Joomleague
 *
 * @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
 */
?>

<?php 
if ($this->playground->picture) {
    ?>

 <h2><?php 
    echo JText::_('COM_JOOMLEAGUE_PLAYGROUND_CLUB_PICTURE');
    ?>
</h2>  
		<div class="venuecontent picture">
                <?php 
    if ($this->playground->picture) {
        echo JHtml::image($this->playground->picture, $this->playground->name);
    } else {
        echo JHtml::image(JoomleagueHelper::getDefaultPlaceholder("team"), $this->playground->name);
    }
    ?>
		</div>
    <?php 
}
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:30,代码来源:default_picture.php

示例14: getClubIconHtml

 public static function getClubIconHtml(&$team, $type = 1, $with_space = 0)
 {
     $small_club_icon = $team->logo_small;
     if ($type == 1) {
         $params = array();
         $params['align'] = "top";
         $params['border'] = 0;
         if ($with_space == 1) {
             $params['style'] = 'padding:1px;';
         }
         if ($small_club_icon == '') {
             $small_club_icon = JoomleagueHelper::getDefaultPlaceholder("clublogosmall");
         }
         return JHtml::image($small_club_icon, '', $params);
     } elseif ($type == 2 && isset($team->country)) {
         return Countries::getCountryFlag($team->country);
     }
 }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:18,代码来源:project.php

示例15: array

    $clubTitle = JText::sprintf('COM_JOOMLEAGUE_TEAMS_CLUB_PROJECT_INFO', $team->club_name);
    if ($this->config['show_small_logo']) {
        $teampic = $this->config['team_picture'];
        $picture = $team->{$teampic};
        if (is_null($picture) || !file_exists($picture)) {
            $picture = JoomleagueHelper::getDefaultPlaceholder("clublogosmall");
            $image = JHTML::image($picture, $teamTitle, array('title' => $teamTitle, ' border' => 0));
        } else {
            $image = JoomleagueHelper::getPictureThumb($picture, $team->team_name, $this->config['team_picture_width'], $this->config['team_picture_height'], 1);
        }
        $smallTeamLogoLink = JHTML::link($teaminfo_link, $image);
    }
    if ($this->config['show_medium_logo']) {
        $picture = $team->logo_middle;
        if (is_null($picture) || !file_exists($picture)) {
            $picture = JoomleagueHelper::getDefaultPlaceholder("clublogomedium");
        }
        $image = JHTML::image($picture, $clubTitle, array('title' => $clubTitle, ' border' => 0));
        $mediumClubLogoLink = JHTML::link($clubinfo_link, $image);
    }
    ?>
		<tr class="<?php 
    echo $k == 0 ? $this->config['style_class1'] : $this->config['style_class2'];
    ?>
">
			<?php 
    if ($this->config['show_small_logo']) {
        ?>
			<td class="team_logo"><?php 
        echo $smallTeamLogoLink;
        ?>
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:31,代码来源:default_teams.php


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