× Joomla Facebook Connect support forum

Topic-icon Moving the login facebook button to top

Active Subscriptions:

None
It seems i have some users getting confused and attempting to register/use login and password fields of the standard form whilst eaning to connect with facebook.
The issue would be solved if i can make the button appear above the standard login fields instead of under the login button. I am not PHP savvy and do not want to break the module. I would assume i need to move some lines around in the defualt.php file.

Could someone help and be specific of what to move so nothing breaks?
The topic has been locked.
Support Specialist
14 years 11 months ago #10973 by alzander
Sure thing. There's a few options to do what you're looking for, depending on exactly how difficult or flexible you want to be with the changes.

1) First, and pretty easy - Add a new module with just the Login with Facebook button:
- Disable the current JFBCLogin module
- Add a new Joomla Login module in the same position and publish it
- Create a new Custom HTML module, and put in the same area as the Login module. In the Custom HTML area, you can simply type {JFBCLogin} and the Login with Facebook button will appear there.
This method is good because it's not overly complex. Additionally, in the Custom HTML module, you can explain how to login through Facebook and why. However, for user's that are currently logged in, this module will still show. For that, you may want to use something like Advanced Module Manager (by NoNumber ) which can let you specify a module to -only- show for guests.. not registered users.

2) Move the button within the JFBCLogin module itself (like you originally asked)
- To do this, you should create a Joomla Template Override (click that link to read more) by copying /modules/mod_jfbclogin/tmpl/default.php to /templates/<YOUR_TEMPLATE>/html/mod_jfbclogin/default.php
- Once there, at about line 55, you'll see:
}
$buttonSize = $params->get('loginButtonSize');
echo $fbClient->getLoginButton($buttonSize); ?>
You can move that block of code to another section of the file, or add extra text above it to describe Facebook functionality more. Like:
}
?>
<p>Or Login with Facebook by using the Link below!</p>
<?php
$buttonSize = $params->get('loginButtonSize');
echo $fbClient->getLoginButton($buttonSize); ?>

The <?php and ?> stuff is there to break apart the HTML that's shown to the user and PHP commands.

Hope this helps get you started, but if you have any other questions, just let us know!
The topic has been locked.
Active Subscriptions:

None
thanks, I used method 2 and it worked. While version one would avoid code changes, It wouldnt look right the way my system is handeing module (in a menu dropdown.

Thanks,
The topic has been locked.
Support Specialist
14 years 11 months ago #11014 by alzander
No problem, that's why we gave you options. Every site is different, and we don't like to stuff everyone in the same bucket of 'do this' when it might not be the best fit for them.

Finally, please consider leaving a rating and review on the Joomla Extension Directory for JFBConnect and/or our support. It definitely helps, but your subscription is the best support you already gave!
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks,
Alex
The topic has been locked.