× Joomla Facebook Connect support forum

Topic-icon Different first time logins

Active Subscriptions:

None
12 years 3 months ago #19028 by andwhi
Hi,
I want to have 2 different first time login re-directs depending on whether a user registers through my CB site or the app.
I have the app set up as a set of menu items in joomla specifically customized to fit in a canvas/tab window and have their own specific app menu. This works great apart from that I have a specific flash app that I want all users to use to create their profile on first visit. Its thesame app but I want it embedded on a 2 different pages specific to the app/site. So I need either 2 different login modules directing to site or app pages upon logging in for the first time. I'd prefer not to create different templates if this is possible.
Can someone suggest how I could achieve this?
(I have the CB facebook connect module which allows a first time login redirect. I was thinking I could use this for either the site or the app and the JFBC module for the other. Does that sound like the best method?)
Regards
Andy
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19094 by mtk
Replied by mtk on topic Different first time logins
Hello,
this is not something that can be set from within JFBC, but if you want users that login while on Canvas to go to one URL and while on-site to go somewhere else, then you can make the following change to detect if the user is on Canvas and manually force the redirect.
In /components/com_jfbconnect/models/loginredirect.php at line 172 is:
        if ($jfbcLibrary->initialRegistration && $configModel->getSetting('facebook_new_user_redirect_enable'))
        {
Change that to:
$canvasLib = JFBConnectCanvasLibrary::getInstance();
$inCanvas = $canvasLib->get('canvasEnabled', false);
if ($inCanvas)
   $redirect = 'index.php?option=you_link_to_site'; // link to site
else if ($jfbcLibrary->initialRegistration && $configModel->getSetting('facebook_new_user_redirect_enable'))
{

let us know if that helped.

Mati
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19114 by andwhi
Replied by andwhi on topic Different first time logins
It sounds perfect but when I tried signing up to the site with a new unlinked account it loaded the attached message and button. When clicking the button it prompted me to allow access to the app and login via the FB pop-up. When allowing this, the popup disappears and I am still presented with the screen shot below. If I click the login button nothing happens but I still have access to to the login module. If I attempt to login with the module it takes me to the users profile page which I have nominated as the "Redirect on Joomla Login" and not the url I have assigned in your code mod. Although it loads this page without any associated modules. Please feel free to test yourself archrivals.com.au

File Attachment:


This leads me to a second question... How do I assign modules to the JFBC pages? I tried to create a menu item but although there is a JBFC menu option type it does not allow me to create one. This is essential to my needs as The template breaks if I cant assign a sidebar and footer to a page.

Thanks for your help so far :)
Andy
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19140 by mtk
Replied by mtk on topic Different first time logins

andwhi wrote: It sounds perfect but when I tried signing up to the site with a new unlinked account it loaded the attached message and button. When clicking the button it prompted me to allow access to the app and login via the FB pop-up. When allowing this, the popup disappears and I am still presented with the screen shot below. If I click the login button nothing happens but I still have access to to the login module. If I attempt to login with the module it takes me to the users profile page which I have nominated as the "Redirect on Joomla Login" and not the url I have assigned in your code mod. Although it loads this page without any associated modules. Please feel free to test yourself archrivals.com.au

just to eliminate that option, did the FB connection (login) work OK before the code changes?

andwhi wrote: This leads me to a second question... How do I assign modules to the JFBC pages? I tried to create a menu item but although there is a JBFC menu option type it does not allow me to create one. This is essential to my needs as The template breaks if I cant assign a sidebar and footer to a page.

Thanks for your help so far :)
Andy

I'm curious to know to which JFBC pages are you referring. are you talking about the page that the user is redirected after a successful login?

Mati
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19143 by andwhi
Replied by andwhi on topic Different first time logins
First login only... There is a page that is needed to create the user's profile image. As the Facebook app and the web site are run from the same Joomla installation I have different menu items set for site/app.
apps.facebook.com/archrivals
archrivals.com.au
If I could I could do the same for subsequent logins that would be great but not essential.
does that clarify?
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19149 by mtk
Replied by mtk on topic Different first time logins

andwhi wrote: First login only... There is a page that is needed to create the user's profile image. As the Facebook app and the web site are run from the same Joomla installation I have different menu items set for site/app.
apps.facebook.com/archrivals
archrivals.com.au
If I could I could do the same for subsequent logins that would be great but not essential.
does that clarify?

Not sure if I understood if this is related to the same problem or something new.
could you please try and explain that again?
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19158 by andwhi
Replied by andwhi on topic Different first time logins
Sorry, my last reply wasn't very thorough... This is the same problem. First login redirect depending on how they enter (app or site)

"just to eliminate that option, did the FB connection (login) work OK before the code changes?"
Seemed to worked fine. Although i had only tested it a few times.

"I'm curious to know to which JFBC pages are you referring. are you talking about the page that the user is redirected after a successful login?"
No, It's the registration page the user is directed to from the SClogin login module. It only displays modules assigned to"all" menu items. I can't assign individual modules which is essential. I would prefer to use the CB registration page but with the SClogin module.

Appologies for the quotes. I'm on my ipad which doesn't seem to like using the quote function.
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19164 by mtk
Replied by mtk on topic Different first time logins

andwhi wrote: Sorry, my last reply wasn't very thorough... This is the same problem. First login redirect depending on how they enter (app or site)

"just to eliminate that option, did the FB connection (login) work OK before the code changes?"
Seemed to worked fine. Although i had only tested it a few times.

"I'm curious to know to which JFBC pages are you referring. are you talking about the page that the user is redirected after a successful login?"
No, It's the registration page the user is directed to from the SClogin login module. It only displays modules assigned to"all" menu items. I can't assign individual modules which is essential. I would prefer to use the CB registration page but with the SClogin module.

Appologies for the quotes. I'm on my ipad which doesn't seem to like using the quote function.

in order to assign modules to certain pages, they must have an Itemid, which is achieved by having a menu item (link) to them.

is that what you are trying to do and not able to?
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19189 by andwhi
Replied by andwhi on topic Different first time logins
"in order to assign modules to certain pages, they must have an Itemid, which is achieved by having a menu item (link) to them. is that what you are trying to do and not able to?"
Yes. I understand this but most components allow you to create a menu item in the menu manager giving it an ID and then assign modules to it. I don't seem to have this option. I have tried creating an external link menu item and copying the url from the registration page into it. This didn't seem to work.

The first time login redirect is a seperate issue and my primary concern but obviously i would like to resolve both if possible.

Thanks
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #19233 by mtk
Replied by mtk on topic Different first time logins

andwhi wrote: "in order to assign modules to certain pages, they must have an Itemid, which is achieved by having a menu item (link) to them. is that what you are trying to do and not able to?"
Yes. I understand this but most components allow you to create a menu item in the menu manager giving it an ID and then assign modules to it. I don't seem to have this option. I have tried creating an external link menu item and copying the url from the registration page into it. This didn't seem to work.

The first time login redirect is a seperate issue and my primary concern but obviously i would like to resolve both if possible.

Thanks

it is not possible to link to JFBC's login page and having an External Link will not assign an Itemid to it.
what you could do, is simply create a (Joomla) Template Override , add to that the module positions and then assign the modules you need.
The topic has been locked.