× Joomla Facebook Connect support forum

Topic-icon Adding JFBConnect into Jomsocial's guest connection page

Active Subscriptions:

None
By default this is what it looks like in Jomsocial when the jomsocial FB connection is enabled.
File Attachment:


How do I make the JFBConnect login appear on this instead? Thank you.
The topic has been locked.
Support Specialist
This has always been a problem in the past. With JFBConnect 3.x, we're working towards letting our users easily add the login button anywhere (without requiring the JFBCLogin module at all). Right now, you'll need to add the following code to that template page from JomSocial (and disable their integrated Facebook functionality).
require_once (JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php');
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
echo $jfbcLibrary->getLoginButton();

If you don't know what I'm talking about with the JomSocial template, or where to do this, let me know, and we'll help you out.

After 3.0 goes stable, we'll be creating a system plugin which will make it even easier to add the button anywhere.
The topic has been locked.
Active Subscriptions:

None
In jomsocial I found this file facebookrest.php, inside this file is a line of code:

require_once( JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'facebook' . DS . 'facebookapi_php5_restlib.php' );

Do I just need to replace 'com_community' with com_jfbconnect? And place the rest of your code under this line?
The topic has been locked.
Support Specialist
No. That would be bad. I'm assuming you're using JomSocial 1.8.7, but this should be similar for most versions of JomSocial. To replace that Facebook Login button, you would want to edit tmodify the frontpage.guests.php template file from JomSocial. The file can be found /components/com_community/templates/default/frontpage.guests.php file, but you should use a template override for this file (see below). That file defines the top portion of the home page when a user isn't logged into your site.

At the very bottom, you'll see:
<?php echo $fbHtml ?>
Try removing that code and replacing it with what's above. Add the <?php and ?> around it so that it executes (and doesn't just display on the page).

We haven't tested this directly recently, but this should do what you're looking for.

For more information on Template Overrides, please read the following:
www.sourcecoast.com/extensions/troublesh...s#template_overrides
The topic has been locked.
Active Subscriptions:

None
Having it as a system plugin would be an awesome addition to an already good product!
The topic has been locked.
Support Specialist
Yeah, we agree. We don't like having to spew so much code into posts and let user's fumble around. JFBConnect is always a work in progress, and we'll continue adding new features (such as the plugin) in upcoming releases.

Thanks for your feedback!
The topic has been locked.
Active Subscriptions:

None
Is there an ETA when this will become available as a plugin? Thanks!
The topic has been locked.
Support Specialist
We don't have an exact timeline right now. Once we release the stable 3.0 (should be later this week, as we're finalizing some bug fixes), it will be one of the first things we focus on. With that in mind, it should be available by the end of September, hopefully sooner, but I just can't lock it down for now.
The topic has been locked.