function onAfterDispatch() { $app = JFactory::getApplication(); if ($app->isAdmin()) { if ($this->_pluginHandler->checkSetupRequired()) { $app->enqueueMessage(XiptText::_('JSPT_SETUP_SCREEN_IS_NOT_CLEAN_PLEASE_CLEAN_IT_STEP_BY_STEP'), 'error'); } return true; } // get option, view and task $option = JRequest::getVar('option'); $view = JRequest::getVar('view'); $task = JRequest::getVar('task'); // Hide Privacy menus if ($option == 'com_community') { self::_hidePrivacyMenus(); } if ($option != 'com_community' || $view != 'search' || $task != 'advancesearch') { return true; } $allTypes = XiptLibProfiletypes::getProfiletypeArray(array('published' => 1, 'visible' => 1)); if (!$allTypes) { return false; } // when we are getting Html of select list(for Profile-Types) //then don't addd "\n" at end of line if (!XIPT_JOOMLA_15) { JHtml::$formatOptions = array_merge(JHtml::$formatOptions, array('format.eol' => "")); } $profileType = JHTML::_('select.genericlist', $allTypes, 'profiletypes', 'class="inputbox"', 'id', 'name'); ob_start(); $this->_addXiptSearchScript($profileType); $content = ob_get_contents(); ob_clean(); $doc = JFactory::getDocument(); if (XIPT_JOOMLA_15) { JHTML::script('jquery1.4.2.js', 'components/com_xipt/assets/js/', true); } else { JHTML::script('components/com_xipt/assets/js/jquery1.4.2.js'); } $doc->addCustomTag('<script type="text/javascript">jQuery.noConflict();</script>'); $doc->addScriptDeclaration($content); return true; }