× Joomla Facebook Connect support forum

Topic-icon RC3, JomSocial Integration, The Next Steps

Active Subscriptions:

None
15 years 2 months ago #188 by Clark
Well I installed RC3, seems like I still have the pop up issue (tested on default module first), but as promised here is the default code for my modified login style. Please make sure you keep your original in case this doesn't work out as planned for you. An easy way of doing this is by renaming the original on your server and reverting it back if you need to. Please note Sourcecoasts' comments on using custom modules in this thread. I am simply providing my style as found on <!-- m --><a class="postlink" href="www.mightyfightinghawks.com">www.mightyfightinghawks.com 'as is', nothing more.
<?php

defined('_JEXEC') or die('Restricted access');

JFBConnectFacebookHelper&#58;&#58;init();
?>

<script type="text/javascript">
	function fb_login_button_click()
	{
		FB.Facebook.get_sessionState().waitUntilReady(
			function() {
				var fbUserLoginLink = "<?php print JFBConnectFacebookHelper&#58;&#58;getFacebookUserLoginLink(); ?>&return=<?php echo $fbLoginUrl; ?>";
				window.location = fbUserLoginLink;
			});
	}

	function logout_button_click()
	{
		<?php 
		if ($fbClient->user)
   		echo 'FB.Connect.logout(redirect_to_jfbconnect_logout);';
		else
   		echo 'redirect_to_jfbconnect_logout();';
 		?>
	}

	function redirect_to_jfbconnect_logout()
	{
		window.location = 'index.php?option=com_jfbconnect&task=logout&return=<?php echo $logoutUrl; ?>';
	}
</script>


<?php 
	if ($formType == "login")
	{ ?>

<form action="<?php echo JRoute&#58;&#58;_(JURI&#58;&#58;root()); ?>" method="post" name="login" id="form-login">
	<fieldset class="input">
	<br /><div id="form-login-username">
				<input id="modlgn_username" onfocus="if(this.value=='Username') this.value='';" onblur="if(this.value=='') this.value='Username';" value="Username" alt="Username" size="18" name="username"/>
	</div>
	<div id="form-login-password">
<input id="modlgn_passwd" input type="password" name="passwd" size="17" alt="<?php echo JText&#58;&#58;_( 'Password' ); ?>" value="<?php echo JText&#58;&#58;_( 'Password' ); ?>" onblur="if(this.value=='') this.value='<?php echo JText&#58;&#58;_( 'Password' ); ?>';" onfocus="if(this.value=='<?php echo JText&#58;&#58;_( 'Password' ); ?>') this.value='';" />
	</div>
	<input type="submit" name="Submit" class="button" value="<?php echo JText&#58;&#58;_('LOGIN') ?>" />
	</fieldset>
	<input type="hidden" name="option" value="com_user" />
	<input type="hidden" name="task" value="login" />
	<input type="hidden" name="return" value="<?php echo $jLoginUrl; ?>" />
	<?php echo JHTML&#58;&#58;_( 'form.token' ); ?>
</form>


<?php echo JText&#58;&#58;_('Or You Can&#58;'); ?></a>
<fb&#58;login-button size="medium" length="long" onlogin="javascript&#058;fb_login_button_click();"></fb&#58;login-button>
<?php
	$usersConfig = &JComponentHelper&#58;&#58;getParams( 'com_users' );
	if ($usersConfig->get('allowUserRegistration')) &#58; ?>
	<br /><br /><a href="<?php echo JRoute&#58;&#58;_( 'index.php?option=com_user&task=register' ); ?>">
			<?php echo JText&#58;&#58;_('Create a new account'); ?></a>
		<?php endif; ?>
<br />
<a href="/index.php/Lost-password.html">Forgot your password?</a>
<br />
<a href="/index.php/Lost-user-name.html">Forgot your username?</a>
<? } ###################### end login form #####################################
else
{	# show logout
?>
	<?php
	# Show their FB avatar (if desired), or give them the option to link accounts
	if ($fbClient->user)
	{
		if($params->get("enableProfilePic")) 
		{ 
			$picHeightParam = $params->get("profileHeight");
			$picWidthParam = $params->get("profileWidth");
			$picHeight = $picHeightParam != "" ? 'height="'.$picHeightParam.'px"' &#58; "";
			$picWidth = $picWidthParam != "" ? 'width="'.$picWidthParam.'px"' &#58; "";
			$linked = ($params->get("linkProfile") == 1)?"true"&#58;"false";
			$fbLogo = ($params->get("facebookLogo") == 1)?"true"&#58;"false"; 
			$fbUid = $fbClient->user;
			?>
			<div id="profile-pic">
				<fb&#58;profile-pic uid="<?php echo $fbUid;?>"
					size="<?php echo $params->get('picQuality'); ?>"
					<?php echo $picHeight;?>
					<?php echo $picWidth;?>
					linked="<?php echo $linked;?>" 
					facebook-logo="<?php echo $fbLogo;?>"
				/>
			</div>
	<?php 
		}
	} 
	?>
	<div>
	<?php echo JText&#58;&#58;_("Welcome")." ".$user->get('name') ?>
	</div>
	<input type="submit" name="Submit" class="button" value="<?php echo JText&#58;&#58;_('Logout') ?>" onclick="javascript&#058;logout_button_click()" />
	<?php
	if (!$fbClient->user) # show facebook connect button to join accounts
	{ ?>
		<div class="fb_connect_user"><?php echo JText&#58;&#58;_('Connect User'); ?></div>	
		<fb&#58;login-button size="medium" length="long" onlogin="javascript&#058;fb_login_button_click();"></fb&#58;login-button>
	<?php }
	?>

<?
} # end logout

?>

Thanks.
The topic has been locked.
Support Specialist
15 years 2 months ago #192 by alzander
Thanks for posting that code. It is a pretty login box. I can code well, but prettiness isn't my thing.

As for the error reported about your site, I started a new thread about it below. I was able to recreate it on our own development site once, which definitely helps narrow it down. It's not common, as far as we can tell, but it's a very high priority to fix since it fails so poorly.

<!-- m --><a class="postlink" href="www.cmsmarket.com/forum/index.php?f=38&t=53&rb_v=viewtopic">www.cmsmarket.com/forum/index.ph ... =viewtopic
The topic has been locked.
Active Subscriptions:

None
15 years 2 months ago #194 by Clark
Thanks for taking the time to help me out sourcecoast. For a $15 component you're offering pretty decent support.

I'm not a coder by any stretch of the imagination, I just thought I would try to mash up a more condensed style. If you're looking at incorporating additional login module styles, I used some elements from the free yootheme login module.

I look forward to hearing back from your team in regards to my oddball issue.

Thanks again.
The topic has been locked.
Active Subscriptions:

None
15 years 2 months ago #198 by ClassicMariah
I bought this the other day and while I did manage to get it partially working, it's not going to work out the I hoped it would. Is there any refunds on this?
The topic has been locked.
Active Subscriptions:

None
15 years 2 months ago #199 by gedmonstone
I am having the same problems, but to be honest, i think this product will turn out to be a big product for the community. These guys are already on the third RC, and they work hard to fix any bugs. I have tried another version JoomlaFacebook, and it does not have half the functionality that these guys are working on. Although I am unable to use it as is, I am sticking with it, I am sure the next RC will answer a lot of the problems. I believe they are also going to give us more configuration options from the backend - this, I hope, will make the product into something great.
The topic has been locked.
Support Specialist
15 years 2 months ago #201 by alzander
We're definitely trying to work hard on getting fixes out there. If ClassicMariah & Gedmonstone can elaborate on your problems, it will help us focus our efforts on the most immediate bugs. Preferrably, find a thread already related to the issue, or create a new thread. This one is very hard to track outstanding issues.

As for development.. yes, we're no (finally) on a feature freeze after the initial JomSocial integration in RC3 until we go stable. This means bug-fixes only for now. After that, we have some ideas for the next round of features for the component as well as modules to customize your page with Facebook information. If you have suggestions, feel free to make a new thread and let us know!

ClassicMariah, on a side note, if you still want a refund, submit a Contact Us through the CMS Market page. The administrators will help you obtain one. We can't do that directly.
The topic has been locked.
Active Subscriptions:

None
15 years 2 months ago #202 by ClassicMariah
I'm not sure that my problems are related to your component. But I have 2 problems that prevent me from being able to use it now. First is that I use sh404sef too, and had the same problems with it that others have already talked about. I hate to lose what I already have indexed in search engines. Second is that I have 2 other related domains parked on top on my site and when you try to connect thru those domains, it gives a 404 error in the popup and you can't connect. Knowing how people want "easy" that isn't going to help me with what I'm trying. It sucks, cuz this is a nice add on and this is something that Joomla needs and maybe at a later point I will take another stab at it.

Thank you for the info....
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #269 by Muhanad
hii ,,,, :D
can facebook connect be limited to one network .. so only the members of that network will be able to login to joomla using facebook connect ??

or i need to hire some1 to hack some codes ?

enlighten me please
The topic has been locked.
Support Specialist
15 years 1 month ago #274 by alzander
If you're saying that you only want Facebook users to log into your site, I think you should be able to accomplish this with a few minor modifications to the login module to hide things. If you're looking for only specific members of a Facebook group to join, no, that currently can not be done.

To only allow Facebook users, this is how I'd start.. this isn't tested, but should get you close to what you're looking for:
In Joomla Configuration, turn OFF "New User Registration"
In JFBConnect Configuration, turn OFF "Create New Joomla Users".

This will be the hardest step since you have to look at some code:
Modify the jfbclogin module to remove a lot of the code about registering for the site and remove the form with the username/password for returning visitors to use (basically leaving the Facebook Connect button only and the logout button). This file can be found in /modules/mod_jfbclogin/tmpl/default.php
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #315 by Muhanad
sorry if i wasnt clear enough .. u know how facebook has different networks and for some networks u need to enter a speical email address to be able to register
( like my university network in facebook .. they ask u to enter ur valid uni email ) i need ur amazing component to limit registeration to only one fb network ?

so only the members of that network will be able to use jfbconnect to register on my site

thanks :rolleyes:
The topic has been locked.