本文整理汇总了PHP中JFBCFactory::getAllProviders方法的典型用法代码示例。如果您正苦于以下问题:PHP JFBCFactory::getAllProviders方法的具体用法?PHP JFBCFactory::getAllProviders怎么用?PHP JFBCFactory::getAllProviders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JFBCFactory
的用法示例。
在下文中一共展示了JFBCFactory::getAllProviders方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
$user = JFactory::getUser();
$providers = JFBCFactory::getAllProviders();
$providerData = array();
foreach ($providers as $provider) {
if ($provider->appId && $provider->secretKey) {
$userModel = JFBConnectModelUserMap::getUser($user->get('id'), $provider->systemName);
$userData = $userModel->getData();
$providerInfo = new stdClass();
$providerInfo->profileUrl = $userData->params->get('data.profile_url');
if (empty($providerInfo->profileUrl)) {
//JOOMLA 2.5
$providerInfo->profileUrl = $userData->params->get('profile_url');
}
$providerInfo->isMapped = $userData->provider != null;
$providerInfo->name = $provider->name;
$providerInfo->provider = $provider;
$providerInfo->systemName = $provider->systemName;
$providerData[$provider->name] = $providerInfo;
}
}
$this->providerData = $providerData;
JFBCFactory::addStylesheet('jfbconnect.css');
parent::display($tpl);
}
示例2: register
public function register($data = null)
{
//require_once (JPATH_COMPONENT.'/libraries/profile.php');
$mainframe = JFactory::getApplication();
$my = CFactory::getUser();
$config = CFactory::getConfig();
/**
* Opengraph
*/
CHeadHelper::setType('website', JText::_('COM_COMMUNITY_REGISTER_NEW'));
// Hide this form for logged in user
if ($my->id) {
$mainframe->enqueueMessage(JText::_('COM_COMMUNITY_REGISTER_ALREADY_USER'), 'warning');
return;
}
// If user registration is not allowed, show 403 not authorized.
$usersConfig = JComponentHelper::getParams('com_users');
if ($usersConfig->get('allowUserRegistration') == '0') {
//show warning message
$this->addWarning(JText::_('COM_COMMUNITY_REGISTRATION_DISABLED'));
return;
}
$fields = array();
$post = JRequest::get('post');
$isUseFirstLastName = CUserHelper::isUseFirstLastName();
$data = array();
$data['fields'] = $fields;
$data['html_field']['jsname'] = empty($post['jsname']) ? '' : $post['jsname'];
$data['html_field']['jsusername'] = empty($post['jsusername']) ? '' : $post['jsusername'];
$data['html_field']['jsemail'] = empty($post['jsemail']) ? '' : $post['jsemail'];
$data['html_field']['jsfirstname'] = empty($post['jsfirstname']) ? '' : $post['jsfirstname'];
$data['html_field']['jslastname'] = empty($post['jslastname']) ? '' : $post['jslastname'];
// $js = 'assets/validate-1.5.min.js';
// CFactory::attach($js, 'js');
$recaptcha = new CRecaptchaHelper();
$recaptchaHTML = $recaptcha->html();
$fbHtml = '';
if ($config->get('fbconnectkey') && $config->get('fbconnectsecret') && !$config->get('usejfbc')) {
//CFactory::load( 'libraries' , 'facebook' );
$facebook = new CFacebook();
$fbHtml = $facebook->getLoginHTML();
}
if ($config->get('usejfbc')) {
if (class_exists('JFBCFactory')) {
$providers = JFBCFactory::getAllProviders();
foreach ($providers as $p) {
$fbHtml .= $p->loginButton();
}
}
}
$tmpl = new CTemplate();
$content = $tmpl->set('data', $data)->set('recaptchaHTML', $recaptchaHTML)->set('config', $config)->set('isUseFirstLastName', $isUseFirstLastName)->set('fbHtml', $fbHtml)->fetch('register/base');
$appsLib = CAppPlugins::getInstance();
$appsLib->loadApplications();
$args = array(&$content);
$appsLib->triggerEvent('onUserRegisterFormDisplay', $args);
echo $this->_getProgressBar(1);
echo $content;
}
示例3: __construct
function __construct($params)
{
$this->params = $params;
$this->user = JFactory::getUser();
$this->doc = JFactory::getDocument();
if (class_exists('JFBCFactory')) {
$this->isJFBConnectInstalled = true;
$this->providers = JFBCFactory::getAllProviders();
}
$this->getPasswordAndProfileLinks();
}
示例4: getOptions
protected function getOptions()
{
$options = array();
$options[] = JHtml::_('select.option', "--", "-- Select a Provider --");
$providers = JFBCFactory::getAllProviders();
foreach ($providers as $p) {
$channels = $p->getChannelsOutbound();
if (count($channels) > 0) {
$options[] = JHtml::_('select.option', strtolower($p->name), $p->name);
}
}
return $options;
}
示例5: getButtons
public function getButtons()
{
if (!$this->exists()) {
return;
}
$providers = JFBCFactory::getAllProviders();
$params = array('buttonSize' => 'icon_text_button');
$buttons = '';
foreach ($providers as $provider) {
$buttons .= $provider->loginButton($params);
}
return $buttons;
}
示例6: getInput
protected function getInput()
{
require_once JPATH_ADMINISTRATOR . '/components/com_jfbconnect/models/fields/providerloginbutton.php';
$html = array();
$data = $this->form->getValue($this->fieldname, $this->group, null);
// Support for SCLogin module
$loginbuttonstype = $this->form->getValue('loginbuttonstype', 'params', null);
if (!$loginbuttonstype) {
// Support for SCSocialWidget module
$loginbuttonstype = $this->form->getValue('loginbuttonstype', 'params.widget_settings', 'default');
}
if ($loginbuttonstype == 'default') {
$noticeStyle = 'style="display:block"';
$buttonStyle = "display:none";
} else {
$noticeStyle = 'style="display:none"';
$buttonStyle = "display:block";
}
jimport('sourcecoast.utilities');
SCStringUtilities::loadLanguage('com_jfbconnect', JPATH_ADMINISTRATOR);
$html[] = '<div class="fieldsocialbuttons">';
JFactory::getDocument()->addStyleDeclaration('.fieldsocialbuttons label { display: inline; float:left; }
.fieldsocialbuttons input[type="radio"] { margin: 0 8px; }
label.providername { width:60px; }');
$html[] = '<div style="clear:both"> </div>';
$html[] = '<fieldset id="loginbutton_custom_notice" ' . $noticeStyle . '>' . JText::_('COM_JFBCONNECT_LOGIN_BUTTON_CUSTOM_INSTRUCTIONS') . '</fieldset>';
$providerFound = false;
foreach (JFBCFactory::getAllProviders() as $p) {
if ($p->appId) {
$providerFound = true;
$value = is_array($data) && array_key_exists($p->systemName, $data) ? $data[$p->systemName] : 'icon_label.png';
$field = '<field type="providerloginbutton"
label="Default Login Button"
provider="' . $p->systemName . '"
name="' . $p->systemName . '"
required="true"
style="' . $buttonStyle . '"
/>';
$element = new SimpleXMLElement($field);
$node = new JFormFieldProviderloginbutton($this->form);
$node->setup($element, $value, $this->group . '.' . $this->fieldname);
$html[] = $node->getInput();
}
}
if (!$providerFound) {
$html[] = '<label>No social networks are enabled. Please use the JFBConnect configuration area to set your App IDs and Secret Keys</label>';
}
$html[] = '</div>';
return implode($html);
}
示例7: display
function display($tpl = null)
{
JForm::addFieldPath(JPATH_ADMINISTRATOR . '/components/com_jfbconnect/models/fields');
$this->formLoad('config', JPATH_ADMINISTRATOR . '/components/com_jfbconnect/models/forms/config.xml');
$this->formBind('config', JFBCFactory::config()->getSettings());
foreach (JFBCFactory::getAllProviders() as $p) {
$configPath = JPATH_SITE . '/components/com_jfbconnect/libraries/provider/' . strtolower($p->systemName) . '/config/';
JForm::addFieldPath($configPath . 'fields');
$this->formLoad($p->systemName, $configPath . 'config.xml');
$loginField = '<form>' . '<fieldset name="login_button" label="' . JText::_('COM_JFBCONNECT_PROVIDER_MENU_LOGIN_BUTTON') . '">' . '<field type="providerloginbutton"
label="' . JText::_('COM_JFBCONNECT_CONFIG_LOGIN_BUTTON_DEFAULT_LABEL') . '"
description="' . JText::_('COM_JFBCONNECT_CONFIG_LOGIN_BUTTON_DEFAULT_DESC') . '"
provider="' . $p->systemName . '"
name="' . $p->systemName . '_login_button"
required="true"
default="icon_label.png"
/>' . '</fieldset>' . '</form>';
$this->forms[$p->systemName]->load($loginField);
$this->formBind($p->systemName, JFBCFactory::config()->getSettings());
}
parent::display($tpl);
}
示例8: getSelectedProviders
private function getSelectedProviders($providerList)
{
if (!is_array($providerList)) {
$providerList = str_replace("\r\n", ",", $providerList);
$providerList = explode(',', $providerList);
}
$providers = array();
foreach ($providerList as $p) {
if ($p) {
$providers[] = JFBCFactory::provider(trim($p));
}
}
//For backwards compatibility:
// - For Facebook, if no providers are specified, then show all providers
// - For Others, if no providers are specified, just show the login button for that provider
if (empty($providers)) {
if ($this->provider->name == 'Facebook') {
$providers = JFBCFactory::getAllProviders();
} else {
$providers[] = $this->provider;
}
}
return $providers;
}
示例9: blockUnregister
public function blockUnregister($uri = null)
{
$my = CFactory::getUser();
$config = CFactory::getConfig();
$usersConfig = JComponentHelper::getParams('com_users');
if ($my->id == 0) {
$config = CFactory::getConfig();
if (empty($uri)) {
$uri = CRoute::getURI(false);
}
$uri = base64_encode($uri);
$tmpl = new CTemplate();
$fbHtml = '';
if ($config->get('fbconnectkey') && $config->get('fbconnectsecret') && !$config->get('usejfbc')) {
$facebook = new CFacebook();
$fbHtml = $facebook->getLoginHTML();
}
if ($config->get('usejfbc')) {
if (class_exists('JFBCFactory')) {
$providers = JFBCFactory::getAllProviders();
$fbHtml = '';
foreach ($providers as $p) {
$fbHtml .= $p->loginButton();
}
}
}
$tmpl->set('fbHtml', $fbHtml);
$tmpl->set('return', $uri);
$tmpl->set('allowUserRegister', $usersConfig->get('allowUserRegistration'));
$tmpl->set('useractivation', $usersConfig->get('useractivation'));
$html = $tmpl->fetch('guests.denied');
echo $html;
return true;
}
return false;
}
示例10: display
/**
* Frontpage display
* @param type $tpl
*/
public function display($tpl = null)
{
/**
* Init variables
*/
$config = CFactory::getConfig();
$document = JFactory::getDocument();
$usersConfig = JComponentHelper::getParams('com_users');
$my = CFactory::getUser();
$model = CFactory::getModel('user');
/**
* Opengraph
*/
CHeadHelper::setType('website', JText::sprintf('COM_COMMUNITY_FRONTPAGE_TITLE', $config->get('sitename')));
/**
* Init document
*/
$feedLink = CRoute::_('index.php?option=com_community&view=frontpage&format=feed');
$feed = '<link rel="alternate" type="application/rss+xml" title="' . JText::_('COM_COMMUNITY_SUBSCRIBE_RECENT_ACTIVITIES_FEED') . '" href="' . $feedLink . '"/>';
$document->addCustomTag($feed);
// Process headers HTML output
$headerHTML = '';
$tmpl = new CTemplate();
$alreadyLogin = 0;
/* User is logged */
if ($my->id != 0) {
$headerHTML = $tmpl->fetch('frontpage.members');
$alreadyLogin = 1;
} else {
/* User is not logged */
$uri = CRoute::_('index.php?option=com_community&view=' . $config->get('redirect_login'), false);
$uri = base64_encode($uri);
$fbHtml = '';
/* Facebook login */
if ($config->get('fbconnectkey') && $config->get('fbconnectsecret') && !$config->get('usejfbc')) {
$facebook = new CFacebook();
$fbHtml = $facebook->getLoginHTML();
}
/* Joomla! Facebook Connect */
if ($config->get('usejfbc')) {
if (class_exists('JFBCFactory')) {
$providers = JFBCFactory::getAllProviders();
foreach ($providers as $p) {
$fbHtml .= $p->loginButton();
}
}
}
//hero image
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image-default.jpg';
if (file_exists(COMMUNITY_PATH_ASSETS . 'frontpage-image.jpg')) {
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image.jpg';
} else {
if (file_exists(COMMUNITY_PATH_ASSETS . 'frontpage-image.png')) {
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image.png';
}
}
//add the hero image as the image metatdata
$imgMeta = '<meta property="og:image" content="' . $heroImage . '"/>';
$document->addCustomTag($imgMeta);
$themeModel = CFactory::getModel('theme');
$settings = $themeModel->getSettings();
/* Generate header HTML for guest */
if ($settings['general']['enable-frontpage-login']) {
$headerHTML = $tmpl->set('allowUserRegister', $usersConfig->get('allowUserRegistration'))->set('heroImage', $heroImage)->set('fbHtml', $fbHtml)->set('useractivation', $usersConfig->get('useractivation'))->set('return', $uri)->set('settings', $settings)->fetch('frontpage/guest');
} else {
$headerHTML = '';
}
}
/* Get site members count */
$totalMembers = $model->getMembersCount();
$latestActivitiesData = $this->showLatestActivities();
$latestActivitiesHTML = $latestActivitiesData['HTML'];
$tmpl = new CTemplate();
$tmpl->set('totalMembers', $totalMembers)->set('my', $my)->set('alreadyLogin', $alreadyLogin)->set('header', $headerHTML)->set('userActivities', $latestActivitiesHTML)->set('config', $config)->set('customActivityHTML', $this->getCustomActivityHTML());
$status = new CUserStatus();
if ($my->authorise('community.view', 'frontpage.statusbox')) {
// Add default status box
CUserHelper::addDefaultStatusCreator($status);
if (COwnerHelper::isCommunityAdmin() && $config->get('custom_activity')) {
$template = new CTemplate();
$template->set('customActivities', CActivityStream::getCustomActivities());
$creator = new CUserStatusCreator('custom');
$creator->title = JText::_('COM_COMMUNITY_CUSTOM');
$creator->html = $template->fetch('status.custom');
$status->addCreator($creator);
}
}
/**
* Misc variables
* @since 3.3
* Move out variable init in side template into view
*/
$moduleCount = count(JModuleHelper::getModules('js_side_frontpage')) + count(JModuleHelper::getModules('js_side_top')) + count(JModuleHelper::getModules('js_side_bottom')) + count(JModuleHelper::getModules('js_side_frontpage_top')) + count(JModuleHelper::getModules('js_side_frontpage_bottom')) + count(JModuleHelper::getModules('js_side_frontpage_stacked')) + count(JModuleHelper::getModules('js_side_top_stacked')) + count(JModuleHelper::getModules('js_side_bottom_stacked')) + count(JModuleHelper::getModules('js_side_frontpage_top_stacked')) + count(JModuleHelper::getModules('js_side_frontpage_bottom_stacked'));
$jinput = JFactory::getApplication()->input;
/**
* @todo 3.3
//.........这里部分代码省略.........
示例11: login
//.........这里部分代码省略.........
JFBCFactory::log(JText::sprintf('COM_JFBCONNECT_MAP_USER_SUCCESS', $provider->name));
} else {
JFBCFactory::log(JText::sprintf('COM_JFBCONNECT_MAP_USER_FAIL', $provider->name));
}
$return = $loginRegisterModel->getLoginRedirect($provider);
$app->redirect($return);
}
// They're not logged in. Check if they have a Joomla user and log that user in. If not, create them one
$jUserId = $userMapModel->getJoomlaUserId($providerUserId, strtolower($provider->name));
if (!$jUserId) {
$profile = $provider->profile->fetchProfile($providerUserId, array('email'));
$providerEmail = $profile->get('email', null);
# Check if automatic email mapping is allowed, and see if that email is registered
# AND the Facebook user doesn't already have a Joomla account
if (!$provider->initialRegistration && JFBCFactory::config()->getSetting('facebook_auto_map_by_email')) {
if ($providerEmail != null) {
$jUserEmailId = $userMapModel->getJoomlaUserIdFromEmail($providerEmail);
if (!empty($jUserEmailId)) {
// Found a user with the same email address
// do final check to make sure there isn't a FB account already mapped to it
$tempId = $userMapModel->getProviderUserId($jUserEmailId, strtolower($provider->name));
if (!$tempId) {
SCSocialUtilities::clearJFBCNewMappingEnabled();
if ($userMapModel->map($jUserEmailId, $providerUserId, strtolower($provider->name), $provider->client->getToken())) {
JFBCFactory::log(JText::sprintf('COM_JFBCONNECT_MAP_USER_SUCCESS', $provider->name));
$jUserId = $jUserEmailId;
// Update the temp jId so that we login below
} else {
JFBCFactory::log(JText::sprintf('COM_JFBCONNECT_MAP_USER_FAIL', $provider->name));
}
}
}
}
}
// Check if no mapping, and Automatic Registration is set. If so, auto-create the new user.
if (!$jUserId && JFBCFactory::config()->getSetting('automatic_registration')) {
# User is not in system, should create their account automatically
if ($loginRegisterModel->autoCreateUser($providerUserId, $provider)) {
$jUserId = $userMapModel->getJoomlaUserId($providerUserId, strtolower($provider->name));
}
}
// At this point, we have nothing left to do but redirect the user to the registration page
if (!$jUserId) {
$return = $loginRegisterModel->getLoginRedirect($provider);
$app = JFactory::getApplication();
$regComponent = JFBCFactory::config()->get('registration_component');
if ($regComponent == 'jfbconnect') {
$app->redirect(JRoute::_('index.php?option=com_jfbconnect&view=loginregister&provider=' . strtolower($provider->name) . '&return=' . base64_encode($return), false));
} else {
$app->setUserState('com_jfbconnect.registration.alternateflow', true);
$app->setUserState('com_jfbconnect.registration.provider.name', strtolower($provider->name));
$app->setUserState('com_jfbconnect.registration.provider.user_id', $providerUserId);
$plugins = $app->triggerEvent('socialProfilesGetPlugins');
foreach ($plugins as $plugin) {
if ($plugin->getName() == $regComponent) {
$redirect = $plugin->registration_url;
}
}
if ($redirect) {
$app->redirect(JRoute::_($redirect, false));
}
}
}
}
$jUser = JUser::getInstance($jUserId);
$loginSuccess = false;
// Try to log the user, but not if blocked and initial registration (then there will be a pretty message on how to activate)
if (!$provider->initialRegistration || $jUser->get('block') == 0 && $provider->initialRegistration) {
$options = array('silent' => 1, 'provider' => $provider, 'provider_user_id' => $providerUserId);
// Disable other authentication messages
// hack for J3.2.0 bug. Should remove after 3.2.1 is available.
$password = $provider->secretKey;
$loginSuccess = $app->login(array('username' => $provider->appId, 'password' => $password), $options);
}
if ($loginSuccess) {
// lets update the user's access token with whatever we just received
$jUser = JFactory::getUser();
$userMapModel->updateUserToken($jUser->get('id'), $provider->systemName, $provider->client->getToken());
// Store Profile URL and Avatar URL
$userModel = JFBConnectModelUserMap::getUser($jUser->get('id'), $provider->name);
$userModel->saveParameter('profile_url', JFBCFactory::provider($provider->name)->profile->getProfileUrl($providerUserId));
$avatarSettings = new JRegistry();
$avatarSettings->set('width', 50);
$avatarSettings->set('height', 50);
$userModel->saveParameter('avatar_thumb', JFBCFactory::provider($provider->name)->profile->getAvatarUrl($providerUserId, false, $avatarSettings));
if (!$provider->initialRegistration) {
$args = array(strtolower($provider->name), $jUser->get('id'), $providerUserId);
$app->triggerEvent('socialProfilesOnLogin', $args);
}
}
JFactory::getApplication()->setUserState('com_jfbconnect.' . strtolower($provider->name) . '.checkForNewMapping', null);
$allProviders = JFBCFactory::getAllProviders();
foreach ($allProviders as $p) {
$p->checkNewMapping();
}
$redirect = $loginRegisterModel->getLoginRedirect($provider);
// Clear the 'alternate flow' session bit to prevent further alterations to reg pages for this user/session
$app->setUserState('com_jfbconnect.registration.alternateflow', false);
$app->redirect($redirect);
}
示例12: getFieldMappingHTML
public function getFieldMappingHTML()
{
$allProviders = JFBCFactory::getAllProviders();
// Remove providers who aren't configured for authentication
$providers = $allProviders;
for ($i = 0; $i < count($allProviders); $i++) {
$p = $allProviders[$i];
if (!$p->appId) {
unset($providers[$i]);
}
}
$profileFields = $this->getProfileFields();
$html = '<div class="row-fluid"><div class="span12">
<div class="well">
<legend>Social Network Profile Import Configuration</legend>
<table>
<tr>
<th>' . ucwords($this->profileName) . " Field</th>";
foreach ($providers as $provider) {
$html .= "<th>" . $provider->name . "</th>";
}
$html .= "</tr>";
foreach ($profileFields as $profileField) {
$html .= '<tr><td>';
$html .= JText::_($profileField->name);
foreach ($providers as $provider) {
$this->loadSettings(strtolower($provider->name));
$fieldMap = $this->getFieldMap(strtolower($provider->name));
if (property_exists($fieldMap, $profileField->id)) {
$fieldId = $profileField->id;
$selectedValue = $fieldMap->{$fieldId};
} else {
$selectedValue = "0";
}
$html .= '</td><td>';
$profile = $provider->profile;
$html .= '<select name="profiles_' . $this->profileName . '_' . strtolower($provider->name) . '_field_map' . $profileField->id . '">';
foreach ($profile->getProviderFields() as $name => $providerField) {
if ($name == $selectedValue) {
$selected = 'selected';
} else {
$selected = '';
}
$html .= '<option value="' . $name . '" ' . $selected . '>' . $providerField . '</option>';
}
$html .= '</select>';
}
$html .= '</td></tr>';
}
$html .= "</table>";
$html .= "</div></div></div>";
return $html;
}
示例13: saveBasicInfo
public function saveBasicInfo()
{
$subscriberId = JRequest::getString('subscriberId');
foreach (JFBCFactory::getAllProviders() as $provider) {
$name = $provider->systemName;
$appId = JRequest::getString($name . '_app_id');
$secretKey = JRequest::getString($name . '_secret_key');
JFBCFactory::config()->update($name . '_app_id', $appId);
JFBCFactory::config()->update($name . '_secret_key', $secretKey);
}
JFBCFactory::config()->update('sc_download_id', $subscriberId);
$this->setRedirect('index.php?option=com_jfbconnect&view=autotune&task=fbapp');
}
示例14: blockUnregister
public function blockUnregister($uri = null)
{
$my = CFactory::getUser();
$config = CFactory::getConfig();
$usersConfig = JComponentHelper::getParams('com_users');
if ($my->id == 0) {
$config = CFactory::getConfig();
if (empty($uri)) {
$uri = CRoute::getURI(false);
}
$uri = base64_encode($uri);
$tmpl = new CTemplate();
$fbHtml = '';
if ($config->get('fbconnectkey') && $config->get('fbconnectsecret') && !$config->get('usejfbc')) {
$facebook = new CFacebook();
$fbHtml = $facebook->getLoginHTML();
}
if ($config->get('usejfbc')) {
if (class_exists('JFBCFactory')) {
$providers = JFBCFactory::getAllProviders();
$fbHtml = '';
foreach ($providers as $p) {
$fbHtml .= $p->loginButton();
}
}
}
//hero image
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image-default.jpg';
if (file_exists(COMMUNITY_PATH_ASSETS . 'frontpage-image.jpg')) {
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image.jpg';
} else {
if (file_exists(COMMUNITY_PATH_ASSETS . 'frontpage-image.png')) {
$heroImage = JURI::root() . 'components/com_community/assets/frontpage-image.png';
}
}
$themeModel = CFactory::getModel('theme');
$settings = $themeModel->getSettings();
$tmpl->set('settings', $settings);
$tmpl->set('heroImage', $heroImage);
$tmpl->set('fbHtml', $fbHtml);
$tmpl->set('return', $uri);
$tmpl->set('allowUserRegister', $usersConfig->get('allowUserRegistration'));
$tmpl->set('useractivation', $usersConfig->get('useractivation'));
$html = $tmpl->fetch('guests.denied');
echo $html;
return true;
}
return false;
}
示例15: foreach
function &getViewLists()
{
$app = JFactory::getApplication();
//Search
$search = $app->getUserStateFromRequest('com_jfbconnect.usermap.search', 'search', '', 'string');
$search = JString::strtolower($search);
$lists['search'] = $search;
//Filter
$filter_network = $app->getUserStateFromRequest('com_jfbconnect.usermap.provider', 'provider', -1, 'string');
$filter_network_options[] = JHTML::_('select.option', -1, JText::_('COM_JFBCONNECT_USERMAP_SELECT_NETWORK'));
$providers = JFBCFactory::getAllProviders();
foreach ($providers as $provider) {
$filter_network_options[] = JHTML::_('select.option', $provider->systemName, $provider->name);
}
$lists['provider'] = JHTML::_('select.genericlist', $filter_network_options, 'provider', 'onchange="this.form.submit()"', 'value', 'text', $filter_network);
//Order
$filter_order = $app->getUserStateFromRequest('com_jfbconnect.usermap.filter_order', 'filter_order', 'id', 'cmd');
$filter_order_Dir = $app->getUserStateFromRequest('com_jfbconnect.usermap.filter_order_Dir', 'filter_order_Dir', 'DESC', 'word');
if (!$filter_order) {
$filter_order = 'id';
}
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
return $lists;
}