Exemple #1
0
    function display() {
        $app = JFactory::getApplication();
        // Get the page/component configuration
        $params = $app->getParams();
        $database = JFactory::getDBO();

        $searchType = $params->get("user_type");
        $this->assign("search_type", $searchType);


        if ($params->get('show_page_title', 1)) {

            $page_title = $this->escape($params->get('page_title'));
            if ($page_title == "") {
                $page_title = JText::_("COM_BIDS_SEARCH_USERS");
            }
            $this->assign("page_title", $page_title);
        }

        $extra_field_list = $params->get('extra_fields', array());

        $lists['country']["label"] = "Country";
        $lists['country']["html"] = BidsHelperHtml::selectCountry("country");

        JHTML::_('behavior.calendar');

        $profileMode = BidsHelperTools::getProfileMode();
        if('component'==$profileMode) {
            $fields = CustomFieldsFactory::getSearchableFieldsList('user_profile');
            $lists['custom_fields'] = JHtml::_('customfields.displaysearchhtml',$fields);
            //$this->assign('customFilters', $customFilters);
        }

        $lists["city"]["label"] = JText::_("COM_BIDS_CITY");
        $lists["city"]["html"] = '<input type="text" name="city" />';
        $lists["name"]["label"] = JText::_('COM_BIDS_NAME');
        $lists["name"]["html"] = '<input type="text" name="name" />';

        $this->assign('lists', $lists);

        $this->assign("search_fields", $extra_field_list);

        parent::display('elements/search/t_search_users.tpl');
    }
 function IntegrationConfiguration()
 {
     $profile_mode = BidsHelperTools::getProfileMode();
     if ($profile_mode == 'component') {
         $view = $this->getView('settings', 'html');
         $view->display('integration');
         return;
     } else {
         $MyApp = JTheFactoryApplication::getInstance();
         $integrationClass = 'JTheFactoryIntegration' . ucfirst($profile_mode);
         JLoader::register($integrationClass, $MyApp->app_path_admin . 'integration/' . $profile_mode . '.php');
         $controller_class = 'JTheFactoryIntegration' . $profile_mode . 'Controller';
         $controller = new $controller_class();
         $controller->execute('display');
         $this->setRedirect($controller->redirect);
         return;
     }
 }