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


PHP JoomleagueHelper::getVersion方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $css = 'components/com_joomleague/assets/css/tabs.css?v=' . $version;
     $document->addStyleSheet($css);
     // Joomleague model
     $model = $this->getModel();
     $user = JFactory::getUser();
     $rankingconfig = $model->getTemplateConfig("ranking");
     $this->assignRef('project', $model->getProject());
     $this->assignRef('overallconfig', $model->getTemplateConfig('overall'));
     $this->assignRef('rankingconfig', $rankingconfig);
     $this->assignRef('playgrounds', $model->getPlaygrounds());
     $this->assignRef('match', $model->getMatch());
     $this->assignRef('team1', $model->getTeaminfo($this->match->projectteam1_id));
     $this->assignRef('team2', $model->getTeaminfo($this->match->projectteam2_id));
     $isAllowed = $model->isAllowed() || $model->isMatchAdmin($this->match->id, $user->id);
     $this->assignRef('showediticon', $isAllowed);
     //echo '<br /><pre>~' . print_r( $this->match, true ) . '~</pre><br />';
     // extended match data
     $xmlfile = JLG_PATH_ADMIN . DS . 'assets' . DS . 'extended' . DS . 'match.xml';
     $jRegistry = new JRegistry();
     $jRegistry->loadString($this->match->extended, 'ini');
     $extended =& JForm::getInstance('extended', $xmlfile, array('control' => 'extended'), false, '/config');
     $extended->bind($jRegistry);
     $lists = array();
     // build the html select booleanlist for cancel
     $lists['cancel'] = JHTML::_('select.booleanlist', 'cancel', 'class="inputbox"', $this->match->cancel);
     $playgrounds[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PLAYGROUND'));
     if (!empty($this->playgrounds)) {
         $playgrounds = array_merge($playgrounds, $this->playgrounds);
     }
     $lists['playgrounds'] = JHTML::_('select.genericlist', $playgrounds, 'playground_id', 'class="inputbox" size="1"', 'value', 'text', $this->match->playground_id);
     //match relation lists
     //$mdlMatch = $model->getMatch();
     $oldmatches[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_EDITMATCH_SELECT_PREV_MATCH'));
     $res = array();
     $new_match_id = $this->match->new_match_id ? $this->match->new_match_id : 0;
     if ($res =& $model->getMatchRelationsOptions($this->project->id, $this->match->id . "," . $new_match_id)) {
         $oldmatches = array_merge($oldmatches, $res);
     }
     unset($res);
     $lists['old_match'] = JHTML::_('select.genericlist', $oldmatches, 'old_match_id', 'class="inputbox" size="1"', 'value', 'text', $this->match->old_match_id);
     $newmatches[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_EDITMATCH_SELECT_NEW_MATCH'));
     $res = array();
     $old_match_id = $this->match->old_match_id ? $this->match->old_match_id : 0;
     if ($res =& $model->getMatchRelationsOptions($this->project->id, $this->match->id . "," . $old_match_id)) {
         $newmatches = array_merge($newmatches, $res);
     }
     unset($res);
     $lists['new_match'] = JHTML::_('select.genericlist', $newmatches, 'new_match_id', 'class="inputbox" size="1"', 'value', 'text', $this->match->new_match_id);
     $this->assignRef('form', $this->get('form'));
     $this->assignRef('extended', $extended);
     $this->assignRef('lists', $lists);
     $pageTitle = JText::_('COM_JOOMLEAGUE_EDITMATCH_MATCHDETAILS');
     $document->setTitle($pageTitle);
     parent::display($tpl);
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:60,代码来源:view.html.php

示例2: getAbout

 function getAbout()
 {
     $about = new stdClass();
     //Translations Hosted by
     $about->translations = '<a href="https://opentranslators.transifex.com/projects/p/joomleague/">https://opentranslators.transifex.com/projects/p/joomleague/</a>';
     //Repository Hosted by
     $about->repository = '<a href="http://gitorious.org/joomleague">http://gitorious.org/joomleague</a>';
     //version
     $version = JoomleagueHelper::getVersion();
     $revision = explode('.', $version);
     $about->version = '<a href="http://gitorious.org/joomleague/joomleague/commits/' . $revision[0] . '.' . $revision[1] . '.0/">' . $version . '</a>';
     //author
     $about->author = '<a href="http://stats.joomleague.net/authors.html">Joomleague-Team</a>';
     //page
     $about->page = 'http://www.joomleague.net';
     //e-mail
     $about->email = 'http://www.JoomLeague.net/forum/index.php?action=contact';
     //forum
     $about->forum = 'http://forum.joomleague.net';
     //bugtracker
     $about->bugs = 'http://bugtracker.joomleague.net';
     //wiki
     $about->wiki = 'http://wiki.joomleague.net';
     //date
     $about->date = '2013-01-07';
     //developer
     $about->developer = '<a href="http://stats.joomleague.net/authors.html" target="_blank">JoomLeague-Team</a>';
     /*
     		//designer
     		$about->designer = 'Kasi';
     		$about->designer .= ', <a href="http://www.cg-design.net" target="_blank">cg design</a>&nbsp;(Carsten Grob) ';
     */
     //designer
     $about->designer = 'DonClumsy';
     $about->designer .= ', (Tim Keller) ';
     //icons
     $about->icons = '<a href="http://www.hollandsevelden.nl/iconset/" target="_blank">Jersey Icons</a> (Hollandsevelden.nl)';
     $about->icons .= ', <a href="http://www.famfamfam.com/lab/icons/silk/" target="_blank">Silk / Flags Icons</a> (Mark James)';
     $about->icons .= ', Panel images (Kasi)';
     //flash
     $about->flash = '<a href="http://teethgrinder.co.uk/open-flash-chart-2/" target="_blank">Open Flash Chart 2.x</a>';
     //graphoc library
     $about->graphic_library = '<a href="http://www.walterzorn.com" target="_blank">www.walterzorn.com</a>';
     //phpthumb class
     $about->phpthumb = '<a href="http://phpthumb.gxdlabs.com/" target="_blank">phpthumb.gxdlabs.com</a>';
     //page
     $about->github = 'https://github.com/diddipoeler/joomleague-2-komplettpaket';
     $about->diddipoelerpage = 'http://www.fussballineuropa.de';
     //e-mail
     $about->diddipoeleremail = 'diddipoeler@gmx.de';
     //forum
     $about->diddipoelerforum = 'http://www.fussballineuropa.de/index.php?option=com_kunena&view=category&catid=247&Itemid=530';
     $this->_about = $about;
     return $this->_about;
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:55,代码来源:about.php

示例3: display

 function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $model = $this->getModel();
     $lists = array();
     //get the project
     $project =& $this->get('data');
     $project->fav_team = explode(",", $project->fav_team);
     $isNew = $project->id < 1;
     $append = '';
     if ($isNew) {
         $append = ' style="background-color:#FFCCCC;"';
     }
     $edit = JRequest::getVar('edit');
     $copy = JRequest::getVar('copy');
     // fail if checked out not by 'me'
     if ($model->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('COM_JOOMLEAGUE_ADMIN_PROJECT_THE_PROJECT'), $project->name);
         $mainframe->redirect('index.php?option=' . $option, $msg);
     }
     // Edit or Create?
     if (!$isNew) {
         $model->checkout($user->get('id'));
     } else {
         // initialise new record
         $project->published = 1;
         $project->order = 0;
     }
     // add javascript
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $document->addScript(JURI::root() . 'administrator/components/com_joomleague/models/forms/project.js');
     $this->assignRef('edit', $edit);
     $this->assignRef('copy', $copy);
     $this->assignRef('lists', $lists);
     $this->assignRef('project', $project);
     $this->assignRef('leagues', $res);
     // 'regular' joomla 2.5 form associated to view
     // TODO: all fields should be migrated to this xml file !
     $this->assignRef('form', $this->get('form'));
     $extended = $this->getExtended($project->extended, 'project');
     $this->assignRef('extended', $extended);
     $this->assign('cfg_which_media_tool', JComponentHelper::getParams($option)->get('cfg_which_media_tool', 0));
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:49,代码来源:view.html.php

示例4: getAbout

 function getAbout()
 {
     $about = new stdClass();
     //Translations Hosted by
     $about->translations = '<a href="https://opentranslators.transifex.com/projects/p/joomleague/" target="_blank">https://opentranslators.transifex.com/projects/p/joomleague/</a>';
     //Repository Hosted by
     $about->repository = '<a href="https://gitlab.com/joomleague/joomleague" target="_blank">https://gitlab.com/joomleague/joomleague</a>';
     //version
     $version = JoomleagueHelper::getVersion();
     $revision = explode('.', $version);
     $about->version = $version;
     //author
     $about->author = 'Joomleague-Team';
     //page
     $about->page = 'http://www.joomleague.at';
     //e-mail
     $about->email = 'http://www.joomleague.at/forum/index.php?action=contact';
     //forum
     $about->forum = 'http://forum.joomleague.at';
     //bugtracker
     $about->bugs = 'http://tracker.joomleague.at/projects/joomleague';
     //wiki
     $about->wiki = 'http://wiki.joomleague.at';
     //date
     $about->date = '2013-01-07';
     //developer
     $about->developer = '<a href="https://gitlab.com/joomleague/joomleague/graphs/master" target="_blank">JoomLeague-Team</a>';
     //designer
     $about->designer = 'Kasi';
     $about->designer .= ', <a href="http://www.cg-design.net" target="_blank">cg design</a>&nbsp;(Carsten Grob) ';
     //icons
     $about->icons = '<a href="http://www.hollandsevelden.nl/iconset/" target="_blank">Jersey Icons</a> (Hollandsevelden.nl)';
     $about->icons .= ', <a href="http://www.famfamfam.com/lab/icons/silk/" target="_blank">Silk / Flags Icons</a> (Mark James)';
     $about->icons .= ', Panel images (Kasi)';
     //flash
     $about->flash = 'Open Flash Chart 2.x';
     //graphoc library
     $about->graphic_library = '<a href="http://www.walterzorn.com" target="_blank">www.walterzorn.com</a>';
     //phpthumb class
     $about->phpthumb = 'phpthumb.gxdlabs.com';
     $this->_about = $about;
     return $this->_about;
 }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:43,代码来源:about.php

示例5: display

 public function display($tpl = null)
 {
     $this->form = $this->get('form');
     $isNew = $this->form->getValue('id') < 1;
     if ($isNew) {
         $this->form->setValue('is_utc_converted', null, 1);
     }
     $edit = JRequest::getVar('edit');
     $copy = JRequest::getVar('copy');
     // add javascript
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $this->edit = $edit;
     $this->copy = $copy;
     $extended = $this->getExtended($this->form->getValue('extended'), 'project');
     $this->extended = $extended;
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:19,代码来源:view.html.php

示例6: display

 function display($tpl = null)
 {
     $this->form = $this->get('form');
     $isNew = $this->form->getValue('id') < 1;
     if ($isNew) {
         $this->form->setValue('is_utc_converted', null, 1);
     }
     $edit = JRequest::getVar('edit');
     $copy = JRequest::getVar('copy');
     // add javascript
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $document->addScript(JUri::root() . 'administrator/components/com_joomleague/models/forms/project.js?v=' . $version);
     $this->edit = $edit;
     $this->copy = $copy;
     $extended = $this->getExtended($this->form->getValue('extended'), 'project');
     $this->extended = $extended;
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:20,代码来源:view.html.php

示例7: _displayMenu

 function _displayMenu($tpl = null)
 {
     $option = $this->input->getCmd('option');
     $app = JFactory::getApplication();
     JHtml::_('behavior.framework');
     $db = JFactory::getDbo();
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $document->addScript(JUri::base() . 'components/com_joomleague/assets/js/quickmenu.js?v=' . $version);
     $uri = JFactory::getURI();
     $model = $this->getModel('project');
     $params = JComponentHelper::getParams($option);
     // catch variables
     $pid = JRequest::getVar('pid', array(0), '', 'array');
     $stid = JRequest::getVar('stid', array(0), '', 'array');
     // Project variable request + Sporttype variable request = ''
     if ($pid[0] > 0 && $stid[0] == '') {
         $model->setId($pid[0]);
         $project = $this->get('Data');
         $sports_type_id = $project->sports_type_id;
     } else {
         // defaulting to state
         $sports_type_id = $app->getUserState($option . 'sportstypes', 0);
     }
     // Sporttype variable request + sporttypeid
     if ($stid[0] > 0 || $sports_type_id > 0) {
         if ($stid[0] > 0) {
             $app->setUserState($option . 'sportstypes', $stid[0]);
         }
         if ($sports_type_id > 0) {
             $app->setUserState($option . 'sportstypes', $sports_type_id);
         }
     } else {
         $defsportstype = $params->get("defsportstype");
         $defsportstype = empty($defsportstype) ? "1" : $params->get("defsportstype");
         $app->setUserState($option . 'sportstypes', $defsportstype);
     }
     $seasonnav = $app->getUserState($option . 'seasonnav');
     $pid = JRequest::getVar('pid', array(0), '', 'array');
     if ($pid[0] > 0) {
         $app->setUserState($option . 'project', $pid[0]);
         $model->setId($pid[0]);
     }
     $project = $this->get('Data');
     $model = $this->getModel();
     $use_seasons = $params->get('cfg_show_seasons_in_project_drop_down', 0);
     //Use seasons in dropdown or not
     //build the html select list for sports-types
     $sports_type_id = $app->getUserState($option . 'sportstypes', 0);
     $project_id = $pid[0];
     if ($sports_type_id > 0) {
         $project_id = $app->getUserState($option . 'project', 0);
     }
     $allSportstypes = JoomleagueModelSportsTypes::getSportsTypes();
     $sportstypes[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_SPORTSTYPE'), 'id', 'name');
     $allSportstypes = array_merge($sportstypes, $allSportstypes);
     $lists['sportstypes'] = JHtml::_('select.genericList', $allSportstypes, 'stid[]', 'class="inputbox" style="width:100%"', 'id', 'name', $sports_type_id);
     if ($app->getUserState($option . 'sportstypes', 0)) {
         // seasons
         $seasons[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_SEASON'), 'id', 'name');
         $seasons = array_merge($seasons, $model->getSeasons());
         $lists['seasons'] = JHtml::_('select.genericList', $seasons, 'seasonnav', 'class="inputbox" style="width:100%"', 'id', 'name', $seasonnav);
         //build the html select list for projects
         $projects[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PROJECT'), 'id', 'name');
         //check if the season filter is set and select the needed projects
         if (!$use_seasons) {
             if ($res = $model->getProjectsBySportsType($sports_type_id, $seasonnav)) {
                 $projects = array_merge($projects, $res);
             }
         } else {
             if ($res = $model->getSeasonProjects($seasonnav)) {
                 $projects = array_merge($projects, $res);
             }
         }
         $lists['projects'] = JHtml::_('select.genericList', $projects, 'pid[]', 'class="inputbox" style="width:100%"', 'id', 'name', $project_id);
     }
     // if a project is active we create the teams and rounds select lists
     if ($project_id > 0) {
         $team_id = JRequest::getInt("ptid", 0);
         if ($team_id == 0) {
             $team_id = $app->getUserState($option . 'project_team_id');
         }
         $projectteams[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'), 'value', 'text');
         if ($res = $model->getProjectteams()) {
             $projectteams = array_merge($projectteams, $res);
         }
         $lDummy = 'class="inputbox" ';
         $lDummy .= 'style="width:100%"';
         $lists['projectteams'] = JHtml::_('select.genericList', $projectteams, 'tid[]', 'class="inputbox" style="width:100%"', 'value', 'text', $team_id);
         $round_id = $app->getUserState($option . 'round_id');
         $projectrounds[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_ROUND'), 'value', 'text');
         $mdlRound = JModelLegacy::getInstance("Round", "JoomleagueModel");
         $mdlRound->setId($project->current_round);
         $round = $mdlRound->getData();
         $projectrounds[] = JHtml::_('select.option', $round->id, JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_CURRENT_ROUND'), 'value', 'text');
         if ($ress = JoomleagueHelper::getRoundsOptions($project_id, 'ASC', true)) {
             foreach ($ress as $res) {
                 $project_roundslist[] = JHtml::_('select.option', $res->value, $res->text);
             }
             $projectrounds = array_merge($projectrounds, $project_roundslist);
//.........这里部分代码省略.........
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:101,代码来源:view.html.php

示例8: _displayMenu

 function _displayMenu($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     JHTML::_('behavior.mootools');
     $db = JFactory::getDBO();
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $document->addScript(JURI::base() . 'components/com_joomleague/assets/js/quickmenu.js?v=' . $version);
     $uri = JFactory::getURI();
     $model = $this->getModel('project');
     $params = JComponentHelper::getParams($option);
     $stid = JRequest::getVar('stid', array(0), '', 'array');
     $sports_type_id = $mainframe->getUserState($option . 'sportstypes', 0);
     if ($stid[0] > 0 || $sports_type_id > 0) {
         if ($stid[0] > 0) {
             $mainframe->setUserState($option . 'sportstypes', $stid[0]);
         }
     } else {
         $defsportstype = $params->get("defsportstype");
         $defsportstype = empty($defsportstype) ? "1" : $params->get("defsportstype");
         $mainframe->setUserState($option . 'sportstypes', $defsportstype);
     }
     $seasonnav = $mainframe->getUserState($option . 'seasonnav');
     $pid = JRequest::getVar('pid', array(0), '', 'array');
     if ($pid[0] > 0) {
         $mainframe->setUserState($option . 'project', $pid[0]);
         $model->setId($pid[0]);
     }
     $project = $this->get('Data');
     $model = $this->getModel();
     $use_seasons = $params->get('cfg_show_seasons_in_project_drop_down', 0);
     //Use seasons in dropdown or not
     //build the html select list for sports-types
     $sports_type_id = $mainframe->getUserState($option . 'sportstypes', 0);
     $project_id = $pid[0];
     if ($sports_type_id > 0) {
         $project_id = $mainframe->getUserState($option . 'project', 0);
     }
     $allSportstypes = JoomleagueModelSportsTypes::getSportsTypes();
     $sportstypes[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_SPORTSTYPE'), 'id', 'name');
     $allSportstypes = array_merge($sportstypes, $allSportstypes);
     $lists['sportstypes'] = JHTML::_('select.genericList', $allSportstypes, 'stid[]', 'class="inputbox" style="width:100%"', 'id', 'name', $sports_type_id);
     if ($mainframe->getUserState($option . 'sportstypes', 0)) {
         // seasons
         $seasons[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_SEASON'), 'id', 'name');
         $seasons = array_merge($seasons, $model->getSeasons());
         $lists['seasons'] = JHTML::_('select.genericList', $seasons, 'seasonnav', 'class="inputbox" style="width:100%"', 'id', 'name', $seasonnav);
         //build the html select list for projects
         $projects[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PROJECT'), 'id', 'name');
         //check if the season filter is set and select the needed projects
         if (!$use_seasons) {
             if ($res = $model->getProjectsBySportsType($sports_type_id, $seasonnav)) {
                 $projects = array_merge($projects, $res);
             }
         } else {
             if ($res = $model->getSeasonProjects($seasonnav)) {
                 $projects = array_merge($projects, $res);
             }
         }
         $lists['projects'] = JHTML::_('select.genericList', $projects, 'pid[]', 'class="inputbox" style="width:100%"', 'id', 'name', $project_id);
     }
     // if a project is active we create the teams and rounds select lists
     if ($project_id > 0) {
         $team_id = JRequest::getInt("ptid", 0);
         if ($team_id == 0) {
             $team_id = $mainframe->getUserState($option . 'project_team_id');
         }
         $projectteams[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'), 'value', 'text');
         if ($res = $model->getProjectteams()) {
             $projectteams = array_merge($projectteams, $res);
         }
         $lDummy = 'class="inputbox" ';
         $lDummy .= 'style="width:100%"';
         $lists['projectteams'] = JHTML::_('select.genericList', $projectteams, 'tid[]', 'class="inputbox" style="width:100%"', 'value', 'text', $team_id);
         $round_id = $mainframe->getUserState($option . 'round_id');
         $projectrounds[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_ROUND'), 'value', 'text');
         $mdlRound = JModel::getInstance("Round", "JoomleagueModel");
         $mdlRound->setId($project->current_round);
         $round = $mdlRound->getData();
         $projectrounds[] = JHTML::_('select.option', $round->id, JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_CURRENT_ROUND'), 'value', 'text');
         if ($ress = JoomleagueHelper::getRoundsOptions($project_id, 'ASC', true)) {
             foreach ($ress as $res) {
                 $project_roundslist[] = JHTML::_('select.option', $res->value, $res->text);
             }
             $projectrounds = array_merge($projectrounds, $project_roundslist);
         }
         $lists['projectrounds'] = JHTML::_('select.genericList', $projectrounds, 'rid[]', 'class="inputbox" style="width:100%"', 'value', 'text', $round_id);
     }
     $imagePath = 'administrator/components/com_joomleague/assets/images/';
     $tabs = array();
     $pane = new stdClass();
     $pane->title = JText::_('COM_JOOMLEAGUE_D_MENU_GENERAL');
     $pane->name = 'General data';
     $pane->alert = false;
     $tabs[] = $pane;
     $content['General data'] = $link = array();
     $label = array();
     $limage = array();
     $link1 = array();
//.........这里部分代码省略.........
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:101,代码来源:view.html.php

示例9: _displayEditlineup

 function _displayEditlineup($tpl)
 {
     $option = JRequest::getCmd('option');
     $app = JFactory::getApplication();
     $project_id = $app->getUserState($option . 'project');
     $document = JFactory::getDocument();
     $tid = JRequest::getVar('team', '0');
     $params = JComponentHelper::getParams($option);
     $default_name_format = $params->get("name_format");
     $default_name_dropdown_list_order = $params->get("cfg_be_name_dropdown_list_order", "lastname");
     // add the js script
     $version = urlencode(JoomleagueHelper::getVersion());
     $document->addScript(JUri::base() . 'components/com_joomleague/assets/js/startinglineup.js?v=' . $version);
     $model = $this->getModel();
     $teams = $model->getMatchTeams();
     if (is_null($teams)) {
         JError::raiseWarning(440, '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_NO_TEAM_MATCH') . '<br /><br />');
         return false;
     }
     $teamname = $tid == $teams->projectteam1_id ? $teams->team1 : $teams->team2;
     $this->_handlePreFillRoster($teams, $model, $params, $tid, $teamname);
     // get starters
     $starters = $model->getRoster($tid);
     $starters_id = array_keys($starters);
     // get players not already assigned to starter
     $not_assigned = $model->getTeamPlayers($tid, $starters_id, $default_name_dropdown_list_order);
     if (!$not_assigned && !$starters_id) {
         JError::raiseWarning(440, '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_NO_PLAYERS_MATCH') . '<br /><br />');
         return false;
     }
     $projectpositions = $model->getProjectPositions();
     if (!$projectpositions) {
         JError::raiseWarning(440, '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_NO_POS') . '<br /><br />');
         return false;
     }
     // build select list for not assigned players
     $not_assigned_options = array();
     foreach ((array) $not_assigned as $p) {
         if ($p->jerseynumber > 0) {
             $jerseynumber = '[' . $p->jerseynumber . '] ';
         } else {
             $jerseynumber = '';
         }
         switch ($default_name_dropdown_list_order) {
             case 'lastname':
             case 'firstname':
                 $not_assigned_options[] = JHtml::_('select.option', $p->value, $jerseynumber . JoomleagueHelper::formatName(null, $p->firstname, $p->nickname, $p->lastname, $default_name_format));
                 break;
             case 'position':
                 $not_assigned_options[] = JHtml::_('select.option', $p->value, '(' . JText::_($p->positionname) . ') - ' . $jerseynumber . JoomleagueHelper::formatName(null, $p->firstname, $p->nickname, $p->lastname, $default_name_format));
                 break;
         }
     }
     $lists['team_players'] = JHtml::_('select.genericlist', $not_assigned_options, 'roster[]', 'style="font-size:12px;height:auto;min-width:15em;" class="inputbox" multiple="true" size="18"', 'value', 'text');
     // build position select
     $selectpositions[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_IN_POSITION'));
     $selectpositions = array_merge($selectpositions, $model->getProjectPositionsOptions(0, 1));
     $lists['projectpositions'] = JHtml::_('select.genericlist', $selectpositions, 'project_position_id', 'class="inputbox" size="1"', 'value', 'text', NULL, false, true);
     // build player select for substitutions
     // starters + came in (because of multiple substitutions possibility in amateur soccer clubs for example)
     $substitutions = $model->getSubstitutions($tid);
     $starters = array_merge($starters, $substitutions[$tid]);
     // not assigned players + went out (because of multiple substitutions possibility in amateur soccer clubs for example)
     $not_assigned = array_merge($not_assigned, $substitutions[$tid]);
     // filter out duplicates $starters
     $new_starters = array();
     $exclude = array("");
     for ($i = 0; $i <= count($starters) - 1; $i++) {
         if (!in_array(trim($starters[$i]->value), $exclude)) {
             $new_starters[] = $starters[$i];
             $exclude[] = trim($starters[$i]->value);
         }
     }
     // filter out duplicates $not_assigned
     $new_not_assigned = array();
     $exclude = array("");
     for ($i = 0; $i <= count($not_assigned) - 1; $i++) {
         if (array_key_exists('came_in', $not_assigned[$i]) && $not_assigned[$i]->came_in == 1) {
             if (!in_array(trim($not_assigned[$i]->in_for), $exclude)) {
                 $new_not_assigned[] = $not_assigned[$i];
                 $exclude[] = trim($not_assigned[$i]->in_for);
             }
         } elseif (!array_key_exists('came_in', $not_assigned[$i])) {
             if (!in_array(trim($not_assigned[$i]->value), $exclude)) {
                 $new_not_assigned[] = $not_assigned[$i];
                 $exclude[] = trim($not_assigned[$i]->value);
             }
         }
     }
     $playersoptions_subs_out = array();
     $playersoptions_subs_out[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PLAYER'));
     $i = 0;
     foreach ((array) $new_starters as $player) {
         switch ($default_name_dropdown_list_order) {
             case 'lastname':
             case 'firstname':
                 if (array_key_exists('came_in', $player)) {
                     $i++;
                     if ($i == 1) {
                         $playersoptions_subs_out[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_ELUSUBST_SELECT_PLAYER_ALREADY_IN'));
//.........这里部分代码省略.........
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:101,代码来源:view.html.php

示例10: display

 function display($tpl = null)
 {
     JHtml::_('behavior.framework');
     $mainframe = JFactory::getApplication();
     $params =& $mainframe->getParams();
     // get a reference of the page instance in joomla
     $document = JFactory::getDocument();
     $uri = JFactory::getURI();
     // add the css files
     $version = urlencode(JoomleagueHelper::getVersion());
     $css = 'components/com_joomleague/assets/css/tabs.css?v=' . $version;
     $document->addStyleSheet($css);
     // add some javascript
     $version = urlencode(JoomleagueHelper::getVersion());
     $document->addScript(JUri::base(true) . '/components/com_joomleague/assets/js/results.js?v=' . $version);
     // add the ranking model
     $rankingmodel = new JoomleagueModelRanking();
     $project = $rankingmodel->getProject();
     // add the ranking config file
     $rankingconfig = $rankingmodel->getTemplateConfig('ranking');
     $rankingmodel->computeRanking();
     // add the results model
     $resultsmodel = new JoomleagueModelResults();
     // add the results config file
     $mdlRound = JModelLegacy::getInstance("Round", "JoomleagueModel");
     $roundcode = $mdlRound->getRoundcode($rankingmodel->round);
     $rounds = JoomleagueHelper::getRoundsOptions($project->id, 'ASC', true);
     $resultsconfig = $resultsmodel->getTemplateConfig('results');
     if (!isset($resultsconfig['switch_home_guest'])) {
         $resultsconfig['switch_home_guest'] = 0;
     }
     if (!isset($resultsconfig['show_dnp_teams_icons'])) {
         $resultsconfig['show_dnp_teams_icons'] = 0;
     }
     if (!isset($resultsconfig['show_results_ranking'])) {
         $resultsconfig['show_results_ranking'] = 0;
     }
     // merge the 2 config files
     $config = array_merge($rankingconfig, $resultsconfig);
     $this->model = $rankingmodel;
     $this->project = $resultsmodel->getProject();
     $this->overallconfig = $resultsmodel->getOverallConfig();
     $this->config = array_merge($this->overallconfig, $config);
     $this->tableconfig = $rankingconfig;
     $this->params = $params;
     $this->showediticon = $resultsmodel->getShowEditIcon();
     $this->division = $resultsmodel->getDivision();
     $this->divisions = $rankingmodel->getDivisions();
     $this->divLevel = $rankingmodel->divLevel;
     $this->matches = $resultsmodel->getMatches();
     $this->round = $resultsmodel->roundid;
     $this->roundid = $resultsmodel->roundid;
     $this->roundcode = $roundcode;
     $rounds = $resultsmodel->getRoundOptions();
     $options = $this->getRoundSelectNavigation($rounds);
     $this->matchdaysoptions = $options;
     $this->currenturl = JoomleagueHelperRoute::getResultsRankingRoute($resultsmodel->getProject()->slug, $this->round);
     $this->rounds = $resultsmodel->getRounds();
     $this->favteams = $resultsmodel->getFavTeams($this->project);
     $this->projectevents = $resultsmodel->getProjectEvents();
     $this->model = $resultsmodel;
     $this->isAllowed = $resultsmodel->isAllowed();
     $this->type = $rankingmodel->type;
     $this->from = $rankingmodel->from;
     $this->to = $rankingmodel->to;
     $this->currentRanking = $rankingmodel->currentRanking;
     $this->previousRanking = $rankingmodel->previousRanking;
     $this->homeRanking = $rankingmodel->homeRank;
     $this->awayRanking = $rankingmodel->awayRank;
     $this->current_round = $rankingmodel->current_round;
     $this->teams = $rankingmodel->getTeamsIndexedByPtid($resultsmodel->getDivisionID());
     $this->previousgames = $rankingmodel->getPreviousGames();
     $this->action = $uri->toString();
     //rankingcolors
     if (!isset($this->config['colors'])) {
         $this->config['colors'] = "";
     }
     $this->colors = $rankingmodel->getColors($this->config['colors']);
     // Set page title
     if ($this->params->get('what_to_show_first', 0) == 0) {
         $prefix = JText::_('COM_JOOMLEAGUE_RESULTS_PAGE_TITLE') . ' & ' . JText::_('COM_JOOMLEAGUE_RANKING_PAGE_TITLE');
         $pageTitleFormat = $resultsconfig["page_title_format"];
     } else {
         $prefix = JText::_('COM_JOOMLEAGUE_RANKING_PAGE_TITLE') . ' & ' . JText::_('COM_JOOMLEAGUE_RESULTS_PAGE_TITLE');
         $pageTitleFormat = $rankingconfig["page_title_format"];
     }
     $titleInfo = JoomleagueHelper::createTitleInfo($prefix);
     if (!empty($this->project)) {
         $titleInfo->projectName = $this->project->name;
         $titleInfo->leagueName = $this->project->league_name;
         $titleInfo->seasonName = $this->project->season_name;
     }
     if (!empty($this->division) && $this->division->id != 0) {
         $titleInfo->divisionName = $this->division->name;
     }
     $this->pagetitle = JoomleagueHelper::formatTitle($titleInfo, $pageTitleFormat);
     $document->setTitle($this->pagetitle);
     /*
     //build feed links
     $feed = 'index.php?option=com_joomleague&view=results&p='.$this->project->id.'&format=feed';
//.........这里部分代码省略.........
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:101,代码来源:view.html.php

示例11: _displayEditlineup

 function _displayEditlineup($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->getUserState($option . 'project');
     $document = JFactory::getDocument();
     $tid = JRequest::getVar('team', '0');
     $params =& JComponentHelper::getParams($option);
     $default_name_format = $params->get("name_format");
     //add the js script
     $version = urlencode(JoomleagueHelper::getVersion());
     $document->addScript(JURI::base() . 'components/com_joomleague/assets/js/startinglineup.js?v=' . $version);
     $model = $this->getModel();
     $match =& $model->getMatchTeams();
     if (!$match) {
         JError::raiseWarning(440, '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_NO_TEAM_MATCH') . '<br /><br />');
     }
     $teamname = $tid == $match->projectteam1_id ? $match->team1 : $match->team2;
     if ($params->get('use_prefilled_match_roster') > 0) {
         $bDeleteCurrrentRoster = $params->get('on_prefill_delete_current_match_roster', 0);
         $prefillType = JRequest::getInt('prefill', 0);
         if ($prefillType == 0) {
             $prefillType = $params->get('use_prefilled_match_roster');
         }
         $projectteam_id = $tid == $match->projectteam1_id ? $match->projectteam1_id : $match->projectteam2_id;
         if ($prefillType == 2) {
             $preFillSuccess = false;
             if (!$model->prefillMatchPlayersWithProjectteamPlayers($projectteam_id, $bDeleteCurrrentRoster)) {
                 if ($model->getError() != '') {
                     JError::raiseWarning(440, '<br />' . $model->getError() . '<br /><br />');
                     return;
                 } else {
                     $preFillSuccess = false;
                 }
             } else {
                 $preFillSuccess = true;
             }
         } elseif ($prefillType == 1) {
             if (!$model->prefillMatchPlayersWithLastMatch($projectteam_id, $bDeleteCurrrentRoster)) {
                 if ($model->getError() != '') {
                     JError::raiseWarning(440, '<br />' . $model->getError() . '<br /><br />');
                     return;
                 } else {
                     $preFillSuccess = false;
                 }
             } else {
                 $preFillSuccess = true;
             }
         }
     }
     // get starters
     $starters = $model->getRoster($tid);
     $starters_id = array_keys($starters);
     // get players not already assigned to starter
     $not_assigned = $model->getTeamPlayers($tid, $starters_id);
     if (!$not_assigned && !$starters_id) {
         JError::raiseWarning(440, '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_NO_PLAYERS_MATCH') . '<br /><br />');
         return;
     }
     $projectpositions =& $model->getProjectPositions();
     if (!$projectpositions) {
         JError::raiseWarning(440, '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_NO_POS') . '<br /><br />');
         return;
     }
     // build select list for not assigned players
     $not_assigned_options = array();
     foreach ((array) $not_assigned as $p) {
         $not_assigned_options[] = JHTML::_('select.option', $p->value, '[' . $p->jerseynumber . '] ' . JoomleagueHelper::formatName(null, $p->firstname, $p->nickname, $p->lastname, $default_name_format) . ' - (' . JText::_($p->positionname) . ')');
     }
     $lists['team_players'] = JHTML::_('select.genericlist', $not_assigned_options, 'roster[]', 'style="font-size:12px;height:auto;min-width:15em;" class="inputbox" multiple="true" size="18"', 'value', 'text');
     // build position select
     $selectpositions[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_IN_POSITION'));
     $selectpositions = array_merge($selectpositions, $model->getProjectPositionsOptions(0, 1));
     $lists['projectpositions'] = JHTML::_('select.genericlist', $selectpositions, 'project_position_id', 'class="inputbox" size="1"', 'value', 'text', NULL, false, true);
     // build player select
     $allplayers = $model->getTeamPlayers($tid);
     $playersoptions = array();
     $playersoptions[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PLAYER'));
     foreach ((array) $allplayers as $player) {
         $playersoptions[] = JHTML::_('select.option', $player->value, JoomleagueHelper::formatName(null, $player->firstname, $player->nickname, $player->lastname, $default_name_format) . ' - (' . JText::_($player->positionname) . ')');
     }
     $lists['all_players'] = JHTML::_('select.genericlist', $playersoptions, 'roster[]', 'id="roster" style="font-size:12px;height:auto;min-width:15em;" class="inputbox" size="4"', 'value', 'text');
     // generate selection list for each position
     $starters = array();
     foreach ($projectpositions as $position_id => $pos) {
         // get players assigned to this position
         $starters[$position_id] = $model->getRoster($tid, $pos->pposid);
     }
     foreach ($starters as $position_id => $players) {
         $options = array();
         foreach ((array) $players as $p) {
             $options[] = JHTML::_('select.option', $p->value, '[' . $p->jerseynumber . '] ' . JoomleagueHelper::formatName(null, $p->firstname, $p->nickname, $p->lastname, $default_name_format));
         }
         $lists['team_players' . $position_id] = JHTML::_('select.genericlist', $options, 'position' . $position_id . '[]', 'style="font-size:12px;height:auto;min-width:15em;" size="4" class="inputbox position-starters" multiple="true" ', 'value', 'text');
     }
     $substitutions = $model->getSubstitutions($tid);
     /**
      * staff positions
      */
     $staffpositions =& $model->getProjectStaffPositions();
//.........这里部分代码省略.........
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:101,代码来源:view.html.php

示例12: 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;
if (JComponentHelper::getParams('com_joomleague')->get('show_footer', 1)) {
    ?>
	<br />
		<div class="poweredby">
			<?php 
    echo ' :: Powered by ';
    echo JHtml::link('http://www.joomleague.at', 'JoomLeague', array('target' => '_blank'));
    echo ' - ';
    echo JHtml::link('index.php?option=com_joomleague&amp;view=about', sprintf('Version %1$s', JoomleagueHelper::getVersion()));
    echo ' :: ';
    ?>
		</div>
<?php 
}
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:24,代码来源:default_footer.php

示例13: display

 public function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $option = JRequest::getCmd('option');
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $css = 'components/' . $option . '/assets/css/tabs.css?v=' . $version;
     $document->addStyleSheet($css);
     //add js file
     JHtml::_('behavior.framework');
     $model = $this->getModel();
     $division_id = $model->getDivisionID();
     $matches = $model->getMatches();
     $config = $model->getTemplateConfig($this->getName());
     $project = $model->getProject();
     $mdlRound = JModelLegacy::getInstance("Round", "JoomleagueModel");
     $roundcode = $mdlRound->getRoundcode($model->roundid);
     $rounds = JoomleagueHelper::getRoundsOptions($project->id, 'ASC', true);
     $this->roundsoptions = $rounds;
     $this->project = $project;
     $lists = array();
     if (isset($this->project)) {
         $this->overallconfig = $model->getOverallConfig();
         $this->config = array_merge($this->overallconfig, $config);
         $this->teams = $model->getTeamsIndexedByPtid($division_id);
         $this->showediticon = $model->getShowEditIcon();
         $this->division = $model->getDivision();
         $this->matches = $matches;
         $this->roundid = $model->roundid;
         $this->roundcode = $roundcode;
         $this->rounds = $model->getRounds();
         $this->favteams = $model->getFavTeams($project);
         $this->projectevents = $model->getProjectEvents();
         $this->model = $model;
         $this->isAllowed = $model->isAllowed();
         $lists['rounds'] = JHtml::_('select.genericlist', $rounds, 'current_round', 'class="inputbox" size="1" onchange="joomleague_changedoc(this);', 'value', 'text', $project->current_round);
         $this->lists = $lists;
         if (!isset($this->config['switch_home_guest'])) {
             $this->config['switch_home_guest'] = 0;
         }
         if (!isset($this->config['show_dnp_teams_icons'])) {
             $this->config['show_dnp_teams_icons'] = 0;
         }
         if (!isset($this->config['show_results_ranking'])) {
             $this->config['show_results_ranking'] = 0;
         }
     }
     // Set page title
     $titleInfo = JoomleagueHelper::createTitleInfo(JText::_('COM_JOOMLEAGUE_RESULTS_PAGE_TITLE'));
     if (!empty($this->project)) {
         $titleInfo->projectName = $this->project->name;
         $titleInfo->leagueName = $this->project->league_name;
         $titleInfo->seasonName = $this->project->season_name;
     }
     if (!empty($this->division) && $this->division->id != 0) {
         $titleInfo->divisionName = $this->division->name;
     }
     $this->pagetitle = JoomleagueHelper::formatTitle($titleInfo, $this->config["page_title_format"]);
     $document->setTitle($this->pagetitle);
     //build feed links
     $feed = 'index.php?option=' . $option . '&view=results&p=' . $this->project->id . '&format=feed';
     $rss = array('type' => 'application/rss+xml', 'title' => JText::_('COM_JOOMLEAGUE_RESULTS_RSSFEED'));
     // add the links
     $document->addHeadLink(JRoute::_($feed . '&type=rss'), 'alternate', 'rel', $rss);
     parent::display($tpl);
 }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:66,代码来源:view.html.php

示例14: _setJoomLeagueVersion

 /**
  * _setJoomLeagueVersion
  *
  * set the version data and actual date, time and
  * Joomla systemName from the joomleague_version table
  *
  * @access private
  * @since  2010-08-26
  *
  * @return array
  */
 private function _setJoomLeagueVersion()
 {
     $exportRoutine = '2010-09-23 15:00:00';
     /*
     		$query = "SELECT CONCAT(major,'.',minor,'.',build,'.',revision) AS version FROM #__joomleague_version ORDER BY date DESC LIMIT 1";
     		$this->_db->setQuery($query);
     		$this->_db->query();
     		if ($this->_db->getNumRows() > 0)
     		{
     			$result = $this->_db->loadAssocList();
     			$result[0]['exportRoutine']=$exportRoutine;
     			$result[0]['exportDate']=date('Y-m-d');
     			$result[0]['exportTime']=date('H:i:s');
     			$result[0]['exportSystem']=JFactory::getConfig()->getValue('config.sitename');
     			$result[0]['object']='JoomLeagueVersion';
     			return $result;
     		}
     		return false;
     */
     $result[0]['version'] = JoomleagueHelper::getVersion();
     $result[0]['exportRoutine'] = $exportRoutine;
     $result[0]['exportDate'] = date('Y-m-d');
     $result[0]['exportTime'] = date('H:i:s');
     $result[0]['exportSystem'] = JFactory::getConfig()->getValue('config.sitename');
     $result[0]['object'] = 'JoomLeagueVersion';
     return $result;
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:38,代码来源:jlextdbbimports.php

示例15: display

 public function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $app = JFactory::getApplication();
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     //support for global client side lang res
     JHtml::_('behavior.formvalidation');
     // Load the modal behavior script.
     JHtml::_('behavior.modal', 'a.modal');
     $lang = JFactory::getLanguage();
     $jllang = new JLLanguage();
     $jllang->setLanguage($lang);
     $props = $jllang->getProperties();
     $strings =& $props['strings'];
     foreach ($strings as $key => $value) {
         if ($app->isAdmin()) {
             if (strpos($key, 'COM_JOOMLEAGUE_ADMIN_' . strtoupper($this->getName()) . '_CSJS') !== false) {
                 JText::script($key, true);
             }
         } else {
             if (strpos($key, 'COM_JOOMLEAGUE_' . strtoupper($this->getName()) . '_CSJS_') !== false) {
                 JText::script($key, true);
             }
         }
     }
     // General Joomleague CSS include
     $file = JPATH_COMPONENT . '/assets/css/joomleague.css';
     if (file_exists(JPath::clean($file))) {
         $document->addStyleSheet($this->baseurl . '/components/' . $option . '/assets/css/joomleague.css?v=' . $version);
     }
     // Genereal CSS include per view
     $file = JPATH_COMPONENT . '/assets/css/' . $this->getName() . '.css';
     if (file_exists(JPath::clean($file))) {
         //add css file
         $document->addStyleSheet($this->baseurl . '/components/' . $option . '/assets/css/' . $this->getName() . '.css?v=' . $version);
     }
     // General Joomleague JS include
     $file = JPATH_COMPONENT . '/assets/js/joomleague.js';
     if (file_exists(JPath::clean($file))) {
         $js = $this->baseurl . '/components/' . $option . '/assets/js/joomleague.js?v=' . $version;
         $document->addScript($js);
     }
     // General JS include per view
     self::includeLanguageStrings();
     $file = JPATH_COMPONENT . '/assets/js/' . $this->getName() . '.js';
     if (file_exists(JPath::clean($file))) {
         $js = $this->baseurl . '/components/' . $option . '/assets/js/' . $this->getName() . '.js?v=' . $version;
         $document->addScript($js);
     }
     //extension management
     $extensions = JoomleagueHelper::getExtensions(JRequest::getInt('p'));
     foreach ($extensions as $e => $extension) {
         $JLGPATH_EXTENSION = JPATH_COMPONENT_SITE . '/extensions/' . $extension;
         //General extension CSS include
         $file = $JLGPATH_EXTENSION . '/assets/css/' . $extension . '.css';
         if (file_exists(JPath::clean($file))) {
             $document->addStyleSheet($this->baseurl . '/components/' . $option . '/extensions/' . $extension . '/assets/css/' . $extension . '.css?v=' . $version);
         }
         //CSS override
         $file = $JLGPATH_EXTENSION . '/assets/css/' . $this->getName() . '.css';
         if (file_exists(JPath::clean($file))) {
             //add css file
             $document->addStyleSheet($this->baseurl . '/components/' . $option . '/extensions/' . $extension . '/assets/css/' . $this->getName() . '.css?v=' . $version);
         }
         //General extension JS include
         $file = $JLGPATH_EXTENSION . '/assets/js/' . $extension . '.js';
         if (file_exists(JPath::clean($file))) {
             //add js file
             $document->addScript($this->baseurl . '/components/' . $option . '/extensions/' . $extension . '/assets/js/' . $extension . '.js?v=' . $version);
         }
         //JS override
         $file = $JLGPATH_EXTENSION . '/assets/js/' . $this->getName() . '.js';
         if (file_exists(JPath::clean($file))) {
             //add js file
             $document->addScript($this->baseurl . '/components/' . $option . '/extensions/' . $extension . '/assets/js/' . $this->getName() . '.js?v=' . $version);
         }
         if ($app->isAdmin()) {
             $JLGPATH_EXTENSION = JPATH_COMPONENT_SITE . '/extensions/' . $extension . '/admin';
             //General extension CSS include
             $file = $JLGPATH_EXTENSION . '/assets/css/' . $extension . '.css';
             if (file_exists(JPath::clean($file))) {
                 $document->addStyleSheet($this->baseurl . '/../components/' . $option . '/extensions/' . $extension . '/admin/assets/css/' . $extension . '.css?v=' . $version);
             }
             //CSS override
             $file = $JLGPATH_EXTENSION . '/assets/css/' . $this->getName() . '.css';
             if (file_exists(JPath::clean($file))) {
                 //add css file
                 $document->addStyleSheet($this->baseurl . '/../components/' . $option . '/extensions/' . $extension . '/admin/assets/css/' . $this->getName() . '.css?v=' . $version);
             }
             //General extension JS include
             $file = $JLGPATH_EXTENSION . '/assets/js/' . $extension . '.js';
             if (file_exists(JPath::clean($file))) {
                 //add js file
                 $document->addScript($this->baseurl . '/../components/' . $option . '/extensions/' . $extension . '/admin/assets/js/' . $extension . '.js?v=' . $version);
             }
             //JS override
             $file = $JLGPATH_EXTENSION . '/assets/js/' . $this->getName() . '.js';
             if (file_exists(JPath::clean($file))) {
                 //add js file
//.........这里部分代码省略.........
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:101,代码来源:jlgview.php


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