Topic-icon SCLogin Facebook Button

Active Subscriptions:

None
13 years 4 months ago #30596 by davcar1
Hi,

How can I position the SCLogin facebook button image above the login fields, in order to be the first option when a user sees the module?

Thanks
The topic has been locked.
Support Specialist
13 years 4 months ago #30622 by alzander
Replied by alzander on topic SCLogin Facebook Button
David,
You'd need to modify our SCLogin template file to do that. The best thing to do is copy /modules/mod_sclogin/tmpl/login.php to /templates/<YOUR_TEMPLATE>/html/mod_sclogin/login.php (creating any directories necessary. That creates a template override so your changes aren't overridden whenever you update JFBConnect.

Then, edit that new file. Toward the middle, you'll see the following block:
$jfbcLogin = "";
    $loginButtonType = $params->get('loginButtonType');
    if($loginButtonType == "text_link")
    {
        $loginButtonLinkText = $params->get('loginButtonLinkText');
        $jfbcLogin = '<a href="javascript:void(0)" onclick="jfbc.login.login_custom();">'.$loginButtonLinkText.'</a>';
    }
    else if($loginButtonType == "image_link")
    {
        $loginButtonLinkImage = $params->get('loginButtonLinkImage');
        $jfbcLogin = '<a href="javascript:void(0)" onclick="jfbc.login.login_custom();"><img src="'.$loginButtonLinkImage.'" /></a>';
    }
    else //if($loginButtonType == 'javascript')
    {
        $jfbcLogin = $helper->getJFBConnectLoginButton();
    }

    if ($jfbcLogin != "")
        echo $jfbcLogin;
Move that whole block up to the top right before the ?> in:
if ($registerType == "communitybuilder")
    $passwordName = 'passwd';
   // PASTE THE CODE HERE
?>
Looking at the file, I'm realizing we shouldn't have as much code in there as we do.. so that's something we'll probably fix at some point. You'll just have to deal with copying/pasting a little more than you should.

Hope that helps, but if not, or you have questions, just let us know!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 4 months ago #30676 by davcar1
Replied by davcar1 on topic SCLogin Facebook Button
Thanks, Alex. Way better now :)
The topic has been locked.
Support Specialist
13 years 4 months ago #30681 by alzander
Replied by alzander on topic SCLogin Facebook Button
Awesome! Glad to hear that got you going. Should you need anything else, as always, just let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It certainly isn't required, but is very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks,
Alex
The topic has been locked.