Topic-icon Where is Form Action in PHP code? JFBConnect Login

Active Subscriptions:

None
13 years 7 months ago #27146 by kcano
I have my login form set to target="_top" so when I hit "submit" it closes the current iframe and goes to the current original page.

But when I click on "Login with Facebook" below the submit button, I can't get it to close itself out. Instead it duplicates the site on top of eachother. Very messy.


Do you know what page the php is located to set a target to top? I've been looking everywhere and I have a feeling it may be located in javascript or through facebook api code.


Thanks in advance. :-)
The topic has been locked.
Support Specialist
13 years 7 months ago #27150 by alzander
Yeah, you'd need to edit our Javascript file to do that. Specifically, the /components/com_jfbconnect/includes/jfbconnect.js file. About 50 lines into it, you'll see the following line:
self.location = jfbc.base + 'index.php?option=com_jfbconnect&task=loginFacebookUser&return=' + jfbc.return_url + '&cb=' + d.getTime();
Change the beginning of that line to:
top.location = ....
I think that should fix the issue for you. If so, let us know. Not sure if we'd add that to a future release, but may consider it. If it does work, just remember that you'll need to make that change whenever you update.

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

None
13 years 7 months ago #27154 by kcano
Hi Alex,

You are amazing! This worked! I definitely wish this was an option in the backend because most people like putting their login forms in popup iframes or modular boxes. :-) It looks a lot better. :-)

Thanks for giving me guidance on which file to edit. It was on line 65. :-) So you have a good memory.

Have a wonderful day!

alzander wrote: Yeah, you'd need to edit our Javascript file to do that. Specifically, the /components/com_jfbconnect/includes/jfbconnect.js file. About 50 lines into it, you'll see the following line:

self.location = jfbc.base + 'index.php?option=com_jfbconnect&task=loginFacebookUser&return=' + jfbc.return_url + '&cb=' + d.getTime();
Change the beginning of that line to:
top.location = ....
I think that should fix the issue for you. If so, let us know. Not sure if we'd add that to a future release, but may consider it. If it does work, just remember that you'll need to make that change whenever you update.

Thanks,
Alex

The topic has been locked.
Support Specialist
13 years 7 months ago #27163 by alzander
Glad to hear that got you going. As for it being beneficial to lots of sites, almost all modal popups for Joomla actually load content that's already on the page (usually from a hidden div). They don't use an iFrame as that's more requests to the server and an inefficient way of doing what you're looking for. JFBConnect's login methods work very well with many different modals and popups as we've tested and debugged issues with many of them. The iFrame issue just isn't a problem.

My big worry is that there are some sites (believe it or not) that still use frames for their full page layout. If we do 'top' for those pages, then it could break the user out of a frame when they shouldn't be. Either way, it could be a problem for us. We'll have to think about it :)

Anyways, best of luck, and if you need anything else, just let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It's certainly not required, but very appreciated!
extensions.joomla.org/extensions/social-...ook-integration/7215

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

None
13 years 7 months ago #27172 by kcano
Thanks Alex.

I have submitted a wonderful review. Thanks again.

And the extension I'm using for the popup login is Modalizer.
The topic has been locked.
Support Specialist
13 years 7 months ago #27173 by alzander
Thanks for letting us know what you use. Always good to get a better idea of what may cause issues for users and how. We'll look into changing that to 'top', like I said, but until then, just keep it in mind when you upgrade!

And thank you very much for the review! It just posted. Glad to hear you're so happy about JFBConnect. If there's ever any other feedback or suggestions you have, just let us know!

Thanks,
Alex
The topic has been locked.