/** * display method of Stats view * @return void **/ function display($tpl = null) { /* Load Javascript and CSS files */ RaidPlannerHelper::loadJSFramework(); /* Get state, and params */ $app = JFactory::getApplication(); $params = $app->getParams(); $state = $this->get('state'); $guild_id = $params->get('guild_id', '0'); $groups = $params->get('allowed_groups'); $by_chars = $params->get('stats_by_chars', 0); $show_rating = $params->get('show_rating', 0); /* Get the values from the state object that were inserted in the model's construct function */ $lists['filter_start_time'] = $state->get('filter_start_time'); $lists['filter_end_time'] = $state->get('filter_end_time'); $lists['filter_character_id'] = $state->get('filter_character_id'); $lists['filter_group_id'] = $state->get('filter_group_id'); $this->assign('guilds', RaidPlannerHelper::getGuilds()); $this->assign('groups', RaidPlannerHelper::getGroups(true, $groups)); $this->assign('characters', RaidPlannerHelper::getCharacters()); $this->assignRef('lists', $lists); $this->assignRef('by_chars', $by_chars); $this->assignRef('show_rating', $show_rating); $this->assignRef('guild_id', $guild_id); parent::display($tpl); }
function display($tpl = null) { /* Load required javascripts */ RaidPlannerHelper::loadJSFramework(true); JHTML::script('com_raidplanner/HtmlTable.Extended.js', false, true); $model = $this->getModel(); $paramsObj = JComponentHelper::getParams('com_raidplanner'); $menuitemid = JRequest::getInt('Itemid'); if ($menuitemid) { $menu = JFactory::getApplication()->getMenu(); $menuparams = $menu->getParams($menuitemid); $paramsObj->merge($menuparams); } $guild_id = $paramsObj->get('guild_id', '0'); $show_account = $paramsObj->get('show_account', '0'); $initial_sort = $paramsObj->get('initial_sort', '0'); $guild_plugin = RaidPlannerHelper::getGuildPlugin($guild_id); if ($guild_plugin != null) { $sync_interval = $paramsObj->get('sync_interval', 4); $sync_enabled = $paramsObj->get('armory_sync', '0') == 1; if ($sync_enabled) { $guild_plugin->trigger('onRPSyncGuild', array($guild_id, $sync_interval, false)); } $guild_plugin->trigger('onRPLoadCSS'); } $this->assignRef('guild_plugin', $guild_plugin); $this->assign('characters', $model->getGuildCharacters($guild_id)); $this->assign('guildinfo', $model->getGuildInfo($guild_id)); $this->assign('ranks', RaidPlannerHelper::getRanks()); $this->assignRef('show_account', $show_account); $this->assignRef('initial_sort', $initial_sort); parent::display($tpl); }
/** * display method of Stats view * @return void **/ function display($tpl = null) { /* Load Javascript and CSS files */ RaidPlannerHelper::loadJSFramework(); JHTML::stylesheet('com_raidplanner/raidplanner_admin.css', false, true, false); //get the data JToolBarHelper::title(JText::_('COM_RAIDPLANNER_STATS')); RaidPlannerHelper::showToolbarButtons(); /* Call the state object */ $state = $this->get('state'); /* Get the values from the state object that were inserted in the model's construct function */ $lists['filter_start_time'] = $state->get('filter_start_time'); $lists['filter_end_time'] = $state->get('filter_end_time'); $lists['filter_character_id'] = $state->get('filter_character_id'); $lists['filter_group_id'] = $state->get('filter_group_id'); $this->assign('guilds', RaidPlannerHelper::getGuilds()); $this->assign('groups', RaidPlannerHelper::getGroups()); $this->assign('characters', RaidPlannerHelper::getCharacters()); $this->assignRef('lists', $lists); parent::display($tpl); }
<?php /*------------------------------------------------------------------------ # com_raidplanner - RaidPlanner Component # ------------------------------------------------------------------------ # author Taracque # copyright Copyright (C) 2011 Taracque. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Website: http://www.taracque.hu/raidplanner -------------------------------------------------------------------------*/ // no direct access defined('_JEXEC') or die('Restricted access'); // register the helper JLoader::register('RaidPlannerHelper', JPATH_ADMINISTRATOR . '/components/com_raidplanner/helper.php'); RaidPlannerHelper::loadJSFramework(); // add css and js $paramsObj = JComponentHelper::getParams('com_raidplanner'); if ($paramsObj->get('load_css', '1')) { JHTML::stylesheet('com_raidplanner/raidplanner.css', false, true, false); } JHTML::script('com_raidplanner/raidplanner.js', false, true); // Require the base controller require_once JPATH_COMPONENT . '/controller.php'; // Require specific controller if requested if ($controller = JRequest::getWord('controller')) { $path = JPATH_COMPONENT . '/controllers/' . $controller . '.php'; if (file_exists($path)) { require_once $path; } else { $controller = ''; }