/** * Dispatch the application * * @param string $component The component which is being rendered. * * @return void * * @since 3.2 */ public function dispatch($component = null) { if ($component === null) { $component = JAdministratorHelper::findOption(); } // Load the document to the API $this->loadDocument(); // Set up the params $document = JFactory::getDocument(); // Register the document object with JFactory JFactory::$document = $document; switch ($document->getType()) { case 'html': $document->setMetaData('keywords', $this->get('MetaKeys')); // Get the template $template = $this->getTemplate(true); // Store the template and its params to the config $this->set('theme', $template->template); $this->set('themeParams', $template->params); break; default: break; } $document->setTitle($this->get('sitename') . ' - ' . JText::_('JADMINISTRATION')); $document->setDescription($this->get('MetaDesc')); $document->setGenerator('Joomla! - Open Source Content Management'); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); }
/** * Dispatch the application. * * Dispatching is the process of pulling the option from the request object and * mapping them to a component. If the component does not exist, it handles * determining a default component to dispatch. * * @param string $component The component to dispatch. * * @return void * * @since 11.1 * @deprecated 4.0 */ public function dispatch($component = null) { $document = JFactory::getDocument(); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); }
/** * Dispatch the application * * @param string */ public function dispatch($component = null) { // Get the component if not set. if (!$component) { $component = $this->input->get('option'); } $document = JFactory::getDocument(); $router = $this->getRouter(); $params = $this->getParams(); switch ($document->getType()) { case 'html': // Get language $lang_code = JFactory::getLanguage()->getTag(); $languages = JLanguageHelper::getLanguages('lang_code'); // Set metadata if (isset($languages[$lang_code]) && $languages[$lang_code]->metakey) { $document->setMetaData('keywords', $languages[$lang_code]->metakey); } else { $document->setMetaData('keywords', $this->getCfg('MetaKeys')); } $document->setMetaData('rights', $this->getCfg('MetaRights')); if ($router->getMode() == JROUTER_MODE_SEF) { $document->setBase(htmlspecialchars(JUri::current())); } break; case 'feed': $document->setBase(htmlspecialchars(JUri::current())); break; } $document->setTitle($params->get('page_title')); $document->setDescription($params->get('page_description')); // Add version number or not based on global configuration if ($this->getCfg('MetaVersion', 0)) { $document->setGenerator('Joomla! - Open Source Content Management - Version ' . JVERSION); } else { $document->setGenerator('Joomla! - Open Source Content Management'); } $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); }
/** * Dispatch the application * * @access public */ function dispatch($component) { $document =& JFactory::getDocument(); $user =& JFactory::getUser(); switch ($document->getType()) { case 'html': $document->setMetaData('keywords', $this->getCfg('MetaKeys')); if ($user->get('id')) { $document->addScript(JURI::root(true) . '/includes/js/joomla.javascript.js'); } JHTML::_('behavior.mootools'); break; default: break; } $document->setTitle(htmlspecialchars_decode($this->getCfg('sitename')) . ' - ' . JText::_('Administration')); $document->setDescription($this->getCfg('MetaDesc')); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); }
/** * Dispatch the application * * @param string */ public function dispatch($component = null) { try { // Get the component if not set. if (!$component) { $component = JRequest::getCmd('option'); } $document = JFactory::getDocument(); $user = JFactory::getUser(); $router = $this->getRouter(); $params = $this->getParams(); switch ($document->getType()) { case 'html': // Get language $lang_code = JFactory::getLanguage()->getTag(); $languages = JLanguageHelper::getLanguages('lang_code'); // Set metadata if (isset($languages[$lang_code]) && $languages[$lang_code]->metakey) { $document->setMetaData('keywords', $languages[$lang_code]->metakey); } else { $document->setMetaData('keywords', $this->getCfg('MetaKeys')); } $document->setMetaData('rights', $this->getCfg('MetaRights')); if ($router->getMode() == JROUTER_MODE_SEF) { $document->setBase(htmlspecialchars(JURI::current())); } break; case 'feed': $document->setBase(htmlspecialchars(JURI::current())); break; } $document->setTitle($params->get('page_title')); $document->setDescription($params->get('page_description')); // Add version number or not based on global configuration if ($this->getCfg('MetaVersion', 0)) { $document->setGenerator('HUBzero - The open source platform for scientific and educational collaboration (version ' . \Hubzero\Version\Version::VERSION . ')'); } else { $document->setGenerator('HUBzero - The open source platform for scientific and educational collaboration'); } $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); } catch (Exception $e) { $code = $e->getCode(); JError::raiseError($code ? $code : 500, $e->getMessage()); } }
/** * Dispatch the application * * @param string $component The component to dispatch. * * @return void * @since 1.5 */ public function dispatch($component = null) { try { if ($component === null) { $component = JAdministratorHelper::findOption(); } $document = JFactory::getDocument(); $user = JFactory::getUser(); switch ($document->getType()) { case 'html': $document->setMetaData('keywords', $this->getCfg('MetaKeys')); break; default: break; } $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('JADMINISTRATION')); $document->setDescription($this->getCfg('MetaDesc')); $document->setGenerator('Jokte! - CMS Lationamericano Cien por Ciento Libre'); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); } catch (Exception $e) { $code = $e->getCode(); JError::raiseError($code ? $code : 500, $e->getMessage()); } }
/** * Dispatch the application * * @param string $component The component which is being rendered. * * @return void * * @since 3.2 */ public function dispatch($component = null) { // Get the component if not set. if (!$component) { $component = $this->input->getCmd('option', null); } // Load the document to the API $this->loadDocument(); // Set up the params $document = $this->getDocument(); $router = static::getRouter(); $params = $this->getParams(); // Register the document object with JFactory JFactory::$document = $document; switch ($document->getType()) { case 'html': // Get language $lang_code = $this->getLanguage()->getTag(); $languages = JLanguageHelper::getLanguages('lang_code'); // Set metadata if (isset($languages[$lang_code]) && $languages[$lang_code]->metakey) { $document->setMetaData('keywords', $languages[$lang_code]->metakey); } else { $document->setMetaData('keywords', $this->get('MetaKeys')); } $document->setMetaData('rights', $this->get('MetaRights')); if ($router->getMode() == JROUTER_MODE_SEF) { $document->setBase(htmlspecialchars(JUri::current())); } // Get the template $template = $this->getTemplate(true); // Store the template and its params to the config $this->set('theme', $template->template); $this->set('themeParams', $template->params); break; case 'feed': $document->setBase(htmlspecialchars(JUri::current())); break; } $document->setTitle($params->get('page_title')); $document->setDescription($params->get('page_description')); // Add version number or not based on global configuration if ($this->get('MetaVersion', 0)) { $document->setGenerator('Joomla! - Open Source Content Management. Translated by JoomlaFarsi.com - Version ' . JVERSION); } else { $document->setGenerator('Joomla! - Open Source Content Management. Translated by JoomlaFarsi.com'); } $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); }
/** * Dispatch the application * * @param string $component The component to dispatch. * * @return void * @since 1.5 */ public function dispatch($component = null) { if ($component === null) { $component = JAdministratorHelper::findOption(); } $document = JFactory::getDocument(); switch ($document->getType()) { case 'html': $document->setMetaData('keywords', $this->getCfg('MetaKeys')); break; default: break; } $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('JADMINISTRATION')); $document->setDescription($this->getCfg('MetaDesc')); $document->setGenerator('Joomla! - Open Source Content Management'); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); }
/** * Dispatch the application * * @access public */ function dispatch($component) { $document =& JFactory::getDocument(); $user =& JFactory::getUser(); $router =& $this->getRouter(); $params =& $this->getParams(); switch($document->getType()) { case 'html': { if ( $user->get('id') ) { $document->addScript( JURI::root(true).'/media/system/js/legacy.js'); } if($router->getMode() == JROUTER_MODE_SEF) { $document->setBase(JURI::current()); } } break; case 'feed': { $document->setBase(JURI::current()); } break; default: break; } $document->setTitle( $params->get('page_title') ); $document->setDescription( $params->get('page_description') ); $contents = JComponentHelper::renderComponent($component); $document->setBuffer( $contents, 'component'); }
/** * Dispatch the application * * @param string */ public function dispatch($component = null) { try { // Get the component if not set. if (!$component) { $component = JRequest::getCmd('option'); } $document = JFactory::getDocument(); $user = JFactory::getUser(); $router = $this->getRouter(); $params = $this->getParams(); switch ($document->getType()) { case 'html': // Get language $lang_code = JFactory::getLanguage()->getTag(); $languages = JLanguageHelper::getLanguages('lang_code'); // Set metadata if (isset($languages[$lang_code]) && $languages[$lang_code]->metakey) { $document->setMetaData('keywords', $languages[$lang_code]->metakey); } else { $document->setMetaData('keywords', $this->getCfg('MetaKeys')); } $document->setMetaData('rights', $this->getCfg('MetaRights')); $document->setMetaData('language', $lang_code); if ($router->getMode() == JROUTER_MODE_SEF) { $document->setBase(JURI::current()); } break; case 'feed': $document->setBase(JURI::current()); break; } $document->setTitle($params->get('page_title')); $document->setDescription($params->get('page_description')); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); } catch (Exception $e) { $code = $e->getCode(); JError::raiseError($code ? $code : 500, $e->getMessage()); } }
/** * Dispatch the application * * @access public */ function dispatch($component) { $document =& JFactory::getDocument(); $user =& JFactory::getUser(); $router =& $this->getRouter(); $params =& $this->getParams(); switch ($document->getType()) { case 'html': //set metadata $document->setMetaData('keywords', $this->getCfg('MetaKeys')); if ($user->get('id')) { $document->addScript(JURI::root(true) . '/includes/js/joomla.javascript.js'); } if ($router->getMode() == JROUTER_MODE_SEF) { $document->setBase(JURI::current()); } break; case 'feed': $document->setBase(JURI::current()); break; default: break; } $document->setTitle($params->get('page_title')); $document->setDescription($params->get('page_description')); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); }
/** * Dispatch the application * * @param string */ public function dispatch($component = null) { // Get the component if not set. if (!$component) { $component = JRequest::getCmd('option'); } $document =& JFactory::getDocument(); $user =& JFactory::getUser(); $router =& $this->getRouter(); $params =& $this->getParams(); switch ($document->getType()) { case 'html': //set metadata $document->setMetaData('keywords', $this->getCfg('MetaKeys')); if ($router->getMode() == JROUTER_MODE_SEF) { $document->setBase(JURI::current()); } break; case 'feed': $document->setBase(JURI::current()); break; } $document->setTitle($params->get('page_title')); $document->setDescription($params->get('page_description')); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); }
/** * Dispatch the application * * @param string $component The component to dispatch. * * @return void * @since 1.5 */ public function dispatch($component = null) { /*try {*/ if ($component === null) { $component = JAdministratorHelper::findOption(); } $document = JFactory::getDocument(); $user = JFactory::getUser(); switch ($document->getType()) { case 'html': $document->setMetaData('keywords', $this->getCfg('MetaKeys')); break; default: break; } $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('JADMINISTRATION')); $document->setDescription($this->getCfg('MetaDesc')); $document->setGenerator('HUBzero - The open source platform for scientific and educational collaboration'); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); /*} // Mop up any uncaught exceptions. catch (Exception $e) { $code = $e->getCode(); JError::raiseError($code ? $code : 500, $e->getMessage()); }*/ }
/** * Dispatch the applicaiton. * * Dispatching is the process of pulling the option from the request object and * mapping them to a component. If the component does not exist, it handles * determining a default component to dispatch. * * @abstract * @access public */ function dispatch($component) { $document =& JFactory::getDocument(); $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('Administration')); $document->setDescription($this->getCfg('MetaDesc')); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); }
/** * Dispatch the application * * @access public * @throws KDispatcherException If the user is not logged in. */ function dispatch() { $document = JFactory::getDocument(); switch ($document->getType()) { case 'html': $document->addScript(JURI::root(true) . '/media/system/js/legacy.js'); JHTML::_('behavior.mootools'); } $document->setTitle(htmlspecialchars_decode($this->getCfg('sitename')) . ' - ' . JText::_('Administration')); if (JFactory::getUser()->get('guest')) { $option = 'com_users'; } else { $option = strtolower(JRequest::getCmd('option', 'com_dashboard')); } JRequest::setVar('option', $option); $contents = JComponentHelper::renderComponent($option); $document->setBuffer($contents, 'component'); }
/** * Dispatch the application. * * Dispatching is the process of pulling the option from the request object and * mapping them to a component. If the component does not exist, it handles * determining a default component to dispatch. * * @param string $component The component to dispatch. * * @return void * * @since 11.1 */ public function dispatch($component = null) { $document = JFactory::getDocument(); $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('JADMINISTRATION')); $document->setDescription($this->getCfg('MetaDesc')); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); }
/** * Dispatch the application * * @param string The component to dispatch. */ public function dispatch($component = null) { if ($component === null) { $component = JAdministratorHelper::findOption(); } $document =& JFactory::getDocument(); $user =& JFactory::getUser(); switch ($document->getType()) { case 'html': $document->setMetaData('keywords', $this->getCfg('MetaKeys')); JHtml::_('behavior.framework', true); break; default: break; } $document->setTitle(htmlspecialchars_decode($this->getCfg('sitename')) . ' - ' . JText::_('Administration')); $document->setDescription($this->getCfg('MetaDesc')); $contents = JComponentHelper::renderComponent($component); $document->setBuffer($contents, 'component'); // Trigger the onAfterDispatch event. JPluginHelper::importPlugin('system'); $this->triggerEvent('onAfterDispatch'); }