× Joomla Facebook Connect support forum

Topic-icon Redirect module vs component

Active Subscriptions:

None
Hi just wondering how to get this to work.

in jfbcomponent->configuration->login/logout you can configure redirect. great no problem
in the sclogin module you can also configure login redirect. great option. but it does not seem to work for me. i would like to have serval modules for login with different redirects.

How can i get this to work?

Many thanks
The topic has been locked.
Support Specialist
11 years 8 months ago #26271 by alzander
Those are different redirects. The redirect in the component is for when the user logs in through Facebook. That redirect works for any instance of the user logging in, on any page.

The SCLogin module login redirect is for if the user is logging in through Joomla.

So, you can have different redirects for user's with Joomla credentials (per SCLogin form), but not with the Facebook login. That's a limitation of JFBConnect currently. It may be possible to override the redirects on certain pages in a few clever ways if it's critical, but it'd take some time to research and come up with a proper solution.

Let me know,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 7 months ago #26576 by fb_100000532508192
Thank you alex for your reply.

Can you post any code that might achive this?

Also will the next release have this built-in. It would seem logical that the login module dictake the redirect as it make everything more flexible.

Thanks in advance
The topic has been locked.
Support Specialist
11 years 7 months ago #26703 by alzander
Phil,
To do so now, the following code for a custom button should likely work for you. It can be placed anywhere in your code just like a normal link and you can use the image you'd like to use. This isn't part of the SCLogin module though. If you need how to modify that, I can try to help, but that would force any instances of the SCLogin module to go to this redirect location:
<a href="javascript:void(0)" onclick="jfbc.return_url=base64_encode('index.php?option=whereveryouwantogo');jfbc.login.login_custom();"><img src="http://cdn.sourcecoast.com/linktoimage.jpg" /></a>
Additionally, you will need the "Enable Redirection" setting disabled in the main component. If you've set a new user or logging in user redirection, that is always used first. That's why the option isn't in the SCLogin module, as it's generally easier to configure all your redirects for logging in and new users in one place.

As always, you'll need to test and verify that works as you expect.

As for when we'd implement the above, I'm not sure. It's something we get a request for here and there (not terribly often) and so we do have it on our to-do list. However, it will take a bit of work to implement and test across all cases, so we just haven't done it yet in lieu of higher priority tasks. As noted above, the different settings in the component would have to be implemented in the module, and it would get complex to make sure all the SCLogin modules are configured the same way (since that's how most users have seemed to like it).

Hope that explains and helps!
Alex
The topic has been locked.