Topic-icon create facebook login button with css

Active Subscriptions:

None
9 years 2 months ago #50738 by iozger
Hi,
In JFBConnect extension social buttons are displayed as image. Instead I would like to use a facebook button created with html and styled with css.
is it possible?
i would like to use these sample bootstrap buttons;

lipis.github.io/bootstrap-social/

if possible where should i edit and how ?
thanks in advance
The topic has been locked.
Support Specialist
9 years 2 months ago #50745 by mel
This should be relatively simple. You will need to create a template override and replace the calls we're making to add the login button with your custom code.

Here's the code to add a link with the FB login functionality. You will need to add the appropriate classes for styles.
<a href="javascript:void(0)" onclick="jfbc.login.provider('facebook');">Log in with Facebook</a>

Then change the 'facebook' for each provider you want to display - amazon, facebook, github, google, instagram, linkedin, meetup, twitter, vk, windowslive, and yahoo are available.

Some of the templates you may need to override:
1. /modules/mod_sclogin/tmpl/socialLogin.php (around line 24 - the call for echo $loginButtons;)
2. /components/com_jfbconnect/views/loginregister/tmpl/default.ph (around line 66 - the call for JFBCFactory::getLoginButtons)
3. If you have the integrate with Joomla login setting enabled in JFBConnect > Configuration > General, then disable this and override the forms in
/components/com_users/views/login/tmpl/default.php and /components/com_users/views/registration/tmpl/default.ph to add the buttons if you want them here too.

Try this out and let us know if you have any difficulties.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 2 months ago #50746 by iozger
Thanks for your quick reply.
I have created a button class (myButton here)
and put below line anywhere inside Jomsocial division i would like to display the button. for example inside frontpage.guest.php file
<a href="javascript:void(0)" onclick="jfbc.login.provider('facebook');" class="btn-block btn-large myButton">Facebook ile Giriş Yap</a>

isn`t this enough ?

sorry, I didn`t get why i should also override below files in your suggestion.

Some of the templates you may need to override:
1. /modules/mod_sclogin/tmpl/socialLogin.php (around line 24 - the call for echo $loginButtons;)
2. /components/com_jfbconnect/views/loginregister/tmpl/default.ph (around line 66 - the call for JFBCFactory::getLoginButtons)
3. If you have the integrate with Joomla login setting enabled in JFBConnect > Configuration > General, then disable this and override the forms in
/components/com_users/views/login/tmpl/default.php and /components/com_users/views/registration/tmpl/default.ph to add the buttons if you want them here too.

The topic has been locked.
Support Specialist
9 years 2 months ago #50756 by mel
Yes, you can put it there where you have mentioned. My suggestions for the overrides are for if you want to replace the places we put those image buttons in the JFBConnect component and SCLogin module. If you have already turned off those features or the user can't get to those views, then your change should be sufficient. I hope that clears up the confusion.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 2 months ago #50772 by iozger
thank you for your help
The topic has been locked.
Support Specialist
9 years 2 months ago #50773 by mel
Not a problem. I liked the idea as an option for JFBConnect/SCLogin too, so I've put an issue in our tracker to investigate it for a future release.
The topic has been locked.