× Joomla Facebook Connect support forum

Topic-icon JOMSOCIAL 2.0.3 + JFBCONNECT module frontpage

Active Subscriptions:

None
13 years 4 months ago - 13 years 4 months ago #6212 by PFA34
Hello,

The module JFBCONNECT is OK with Jomsocial 2.0.3.

But on the homepage JomSocial it's always the old plugin connection with facebook

how to replace ?

(I'm sorry wrong category)
Last edit: 13 years 4 months ago by PFA34.
The topic has been locked.
Active Subscriptions:

None
13 years 4 months ago #6213 by PFA34
The topic has been locked.
Support Specialist
13 years 4 months ago #6221 by alzander
[Moved post to correct forum, no problem]

For adding the Login With Facebook button, check out the post below. It should hopefully answer your questions, but if not, let us know:
www.sourcecoast.com/forums/topic?id=1457&p=1#p5841

In general, you should disable JomSocial's Facebook Connect integration by removing the API and Secret keys from their component. Then, update (or, preferrably create a template override) the JS Template file frontpage.guests.php file and add the JFBConnect login button.

Good luck, and post back here if you have any questions!
The topic has been locked.
Active Subscriptions:

None
13 years 4 months ago #6225 by PFA34
Thank you Alex, It worked by adding :
<?php #echo $fbHtml; // comment this out so it doesn't display
require_once (JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php');
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
echo $jfbcLibrary->getLoginButton();
?>

it works perfectly !

By cons I tried to add this same code in the file default.php on /modules/mod_login/tmpl Because I always use mod_login but it does not appear :
...	<ul>
		<li>
			<a href="/<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
			<?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
		</li>
		<li>
			<a href="/<?php echo JRoute::_( 'index.php?option=com_user&view=remind' ); ?>">
			<?php echo JText::_('FORGOT_YOUR_USERNAME'); ?></a>
		</li>
		<?php
		$usersConfig = &JComponentHelper::getParams( 'com_users' );
		if ($usersConfig->get('allowUserRegistration')) : ?>
		<li>
			<a href="/<?php echo JRoute::_( 'index.php?option=com_user&view=register' ); ?>">
				<?php echo JText::_('REGISTER'); ?></a>
				
				<?php #echo $fbHtml; // comment this out so it doesn't display
require_once (JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php');
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
echo $jfbcLibrary->getLoginButton();
?>
				
		</li>
		<?php endif; ?>
	</ul>...
The topic has been locked.
Support Specialist
13 years 4 months ago #6229 by alzander
You may want to check your templates/YOUR_TEMPLATE/html/mod_login/ folder to see if the file you're trying to update is there. This directory contains template overrides which are used (if they exist) instead of the /modules/mod_login/tmpl files. Check that out, and try to add the code there. If it doesn't work, let us know and we'll help get you straightened out!
The topic has been locked.
Active Subscriptions:

None
13 years 4 months ago #6240 by PFA34
thank you for these accuracy (it worked by changing the file tmpl in templates/YOUR_TEMPLATE/html/mod_login/)
The topic has been locked.
Support Specialist
13 years 4 months ago #6249 by alzander
Great! I figured that might be the issue when you said it didn't work in the 'normal' location.

Glad we could help. If you run into any other issues, or have any other questions, we'll be here!
The topic has been locked.
Active Subscriptions:

None
12 years 11 months ago #10486 by PFA34
Hello,

After updating Jomsocial 2.2.2
For adding the Login With Facebook button, code :
<?php #echo $fbHtml; // comment this out so it doesn't display
require_once (JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php');
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
echo $jfbcLibrary->getLoginButton();
?>
is not ok

Error :
Warning: Missing argument 1 for JFBConnectFacebookLibrary::getLoginButton(), called in /homepages/3/d364927461/htdocs/ANNUAIREPFA/components/com_community/templates/default/frontpage.guests.php on line 77 and defined in /homepages/3/d364927461/htdocs/ANNUAIREPFA/components/com_jfbconnect/libraries/facebook.php on line 293

?
Thanks
The topic has been locked.
Support Specialist
12 years 11 months ago #10489 by alzander
Sorry about that. If you could, please update your call to be like below:
echo $jfbcLibrary->getLoginButton("medium");

We added a size option recently, and didn't set the default like we should have. In the 3.2.2 release, coming out later this week, we'll set the default properly so even if you don't make this code change, it will work. If you do make that change, it will work now and with the 3.2.2 update.

Thanks for pointing that out!
The topic has been locked.