Topic-icon Joomla Login Form with SCLogin

Active Subscriptions:

None
11 years 1 month ago #31656 by acexgames
Hi,

I would like to know if the position of "Facebook Login" in Joomla Login Form is fixed, using SCLogin.

As we can see in the picture below, it automatically includes the button in the end of the form. I would like to have something like: username / password OR {the button facebook login}.

File Attachment:


The same behavior to the registration page... Enter your data OR {the button facebook login}.

Sorry about the "basic" question.

Kind Regards,
Rafael
The topic has been locked.
Support Specialist
11 years 1 month ago #31669 by alzander
Rafael,
The Login with Facebook button is hard-coded into the SCLogin module when JFBConnect is detected. We don't currently have an easy way to add other text before it. We are in the process of a completely overhauled SCLogin module with many more styles and a better looking social buttons in general (icons, buttons, images, etc).

If you want, you can edit the /modules/mod_sclogin/helper.php file. Around line 295, you'll see the login button block that looks like:
function getJFBConnectLoginButton()
    {
        if ($this->isJFBConnectInstalled)
        {
            $buttonSize = $this->params->get("loginButtonSize");
            $showFaces = $this->params->get("showFaces");
            $maxRows = $this->params->get("maxRows");
            $loginButton = $this->jfbcLibrary->getLoginButton($buttonSize, $showFaces, $maxRows);
            $loginButton = '<div class="jfbcLogin">'.$loginButton.'</div>';
            return $loginButton;
        }
        return "";
    }
You can update the last $loginButton = line so it looks like:
function getJFBConnectLoginButton()
    {
        if ($this->isJFBConnectInstalled)
        {
            $buttonSize = $this->params->get("loginButtonSize");
            $showFaces = $this->params->get("showFaces");
            $maxRows = $this->params->get("maxRows");
            $loginButton = $this->jfbcLibrary->getLoginButton($buttonSize, $showFaces, $maxRows);
            $loginButton = '<div class="jfbcLogin">=== OR ===='.$loginButton.'</div>';
            return $loginButton;
        }
        return "";
    }

The registration page also has no way to edit it. JFBConnect simply appends the button to the registration page. If you want to customize that more, you'd need to edit the com_users registration page template file. Since many templates already overwrite that view, there's not many options we can provide or it would break those templates.

Hope that helps,
Alex
The topic has been locked.