Beispiel #1
0
 function getLoginButtons($orientation, $alignment)
 {
     $login = '';
     if ($this->params->get('showSociaLoginButton', 1)) {
         $params['providers'] = $this->getLoginButtonOrdering();
         $params['loginbuttonstype'] = $this->params->get('loginbuttonstype', 'default');
         $params['loginbuttons'] = $this->params->get('loginbuttons');
         $params['addStyles'] = 'false';
         $params['alignment'] = $alignment;
         $params['orientation'] = $orientation;
         $login = JFBCFactory::getLoginButtons($params);
     }
     return $login;
 }
Beispiel #2
0
echo JText::_('COM_JFBCONNECT_LOGIN');
?>
" />
                        </dd>
                    </dl>
                </fieldset>

                <input type="hidden" name="option" value="com_jfbconnect" />
                <input type="hidden" name="task" value="loginregister.loginMap" />
                <input type="hidden" name="provider" value="<?php 
echo $this->providerName;
?>
" />
                <?php 
echo JHTML::_('form.token');
echo JFBCFactory::getLoginButtons($this->altParams);
?>
            </form>
            <div style="clear:both"></div>
        </div>
        <div id="jfbc_loginregister_newuser" class="<?php 
echo $newUserSpan;
?>
">
            <form action="" method="post" id="adminForm" class="form-validate">
                <?php 
foreach ($this->form->getFieldsets() as $fieldset) {
    // Iterate through the form fieldsets and display each one.
    ?>
                    <?php 
    $fields = $this->form->getFieldset($fieldset->name);
Beispiel #3
0
 /**
  * Renders a login button.
  *
  * @since	1.0
  * @access	public
  */
 public function getLoginButton($callback, $permissions = array(), $display = 'popup', $text = '')
 {
     // Test if the config has been created correctly.
     $config = FD::config();
     // Check if user wants to integrate with JFBConnect
     if ($config->get('oauth.facebook.jfbconnect.enabled') && $this->jfbconnectExists()) {
         $doc = JFactory::getDocument();
         $buttons = '';
         if ($doc->getType() == 'ajax') {
             $params = array('image' => 'icon.png');
             $buttons = JFBCFactory::getLoginButtons($params);
         }
         $theme = FD::themes();
         $theme->set('buttons', $buttons);
         $output = $theme->output('site/facebook/button.jfbconnect');
         return $output;
     }
     if (!$config->get('oauth.facebook.registration.enabled')) {
         return;
     }
     if (!$config->get('oauth.facebook.app') || !$config->get('oauth.facebook.secret')) {
         return;
     }
     $theme = FD::themes();
     // Load front end language file.
     FD::language()->loadSite();
     if (empty($text)) {
         $text = JText::_('COM_EASYSOCIAL_OAUTH_SIGN_IN_WITH_FACEBOOK');
     }
     $authorizeURL = $this->getAuthorizeURL(array('scope' => $permissions, 'redirect_uri' => $callback, 'display' => $display));
     $theme->set('text', $text);
     $theme->set('authorizeURL', $authorizeURL);
     $theme->set('appId', $this->appId);
     $theme->set('appSecret', $this->appSecret);
     $theme->set('callback', $callback);
     $theme->set('permissions', $permissions);
     $output = $theme->output('site/facebook/button.login');
     return $output;
 }
Beispiel #4
0
 public function getLoginButton($text = null)
 {
     $params = array('text' => $text);
     return JFBCFactory::getLoginButtons($params);
 }