Topic-icon Two joomla instances - one on subdomain

Active Subscriptions:

None
13 years 9 months ago #26105 by J77J
Hi All,

I'm trying to setup JFBConnect on two joomla instances, so I have:

jomsoc.mydomain.com - this is a jomsocial site - which is where users register
mydomain.com - joomla site - where I want users to be able to login using facebook, but if they have not yet registered I want this to happen on the jomsocial site..

The sites are joined using jfusion - so logging in to one logs you into the other, but you can only register on the jomsocial site..

Is it possible to setup JFBconnect on the joomla site, so that if you have already registered it logs you in, but if you have not registered yet it does this through the jomsocial site?

thanks,

Johnny
The topic has been locked.
Support Specialist
13 years 9 months ago #26113 by alzander
Johnny,
We get a question like this every once in a while and I always provide the same code change.. however, we've never really gotten any feedback if it works. Hopefully, that's a good thing in that it works, but I really don't know. If you try this, I'd love to hear your feedback on whether it works or not.

1) In Autotune, for your FB App, make sure the App Domain is 'mydomain.com'. The Site URL should be 'jomsoc.mydomain.com', though I really don't think it will matter if you use the 'root' domain.
2) Edit the /components/com_jfbconnect/includes/jfbconnect.js file. Around line 65, you should see:
self.location = jfbc.base + 'index.php?option=com_jfbconnect&task=loginFacebookUser&return=' + jfbc.return_url + '&cb=' + d.getTime();
Change that to:
[code]self.location = 'http://jomsoc.mydomain.com/index.php?option=com_jfbconnect&task=loginFacebookUser&return=' + jfbc.return_url + '&cb=' + d.getTime();
Make a similar change to the logout function around line 107.

That should make logins to registration and logouts work. It should also let users login using the jomsoc.mydomain.com site to authenticate, which shouldn't be a problem. The biggest issue I think you'll have is with redirects, depending on where the user should go and how you've configured them (stay on same page, go to a menu, etc). Start with the stuff above and make sure it logs the user in, and then we can help you with the redirects if you do run into troubles.

We don't have a setup like this, so you'll be a little bit of a guinea pig, but we'll do what we can to get you going!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 8 months ago #26339 by J77J
Hi Alex,

quick update just so you know I haven't disappeared - I will reply back with whether this works! Having a couple of issues with Jfusion at the moment so I will get these rectified then apply the changes you suggest and report back,

thanks again,

Johnny
The topic has been locked.
Support Specialist
13 years 8 months ago #26347 by alzander
Johnny,
Thanks for the update. Should you need anything from us, just let us know. If your jFusion issues are with JFBConnect, we know that configuration can work. It can be a little tricky and may be able to provide some guidance if that's the issue. If it's other jFusion stuff... well, I can't help there :D

Best of luck!
Alex
The topic has been locked.