Topic-icon Registration redirect question

Active Subscriptions:

None
11 years 7 months ago #26421 by jwhelan
Upon a successful registration, I'd like to redirect my users to a modal window for invitation purposes. I tried to do this from the admin menu, but the only options providers are actual menu links. Perhaps you can point out the relevant function and file?


This is what I want to add:

Invite Popup Test
The topic has been locked.
Support Specialist
11 years 7 months ago #26437 by alzander
Ummm. not sure what you mean. What are you using to do the invites? You'll need to do some sort of redirect to a new page on your site. That's simply part of the login process from LinkedIn.

So, all I can think of (without knowing what invitations you're trying to send), all I can think of is to redirect to a Joomla article which then has some Javascript to popup the invitation window in some way.

If you're talking about the JFBC Requests feature, that, unfortunately, can't be placed in a modal. That has to be a popup as Facebook is in full control of that window.

Hope that helps, but let me know some more info and I will try to help how I can!

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

None
11 years 7 months ago #26440 by jwhelan
Alex,

My last post was missing a paragraph. As you're governor in Texas might say - 'Oops' :)

Upon registration, I want to redirect my users to a modal popup as follows:

JHTML::_('behavior.modal', 'a.modal');
<a href="index.php?option=com_invitex&view=invites&Itemid=245&tmpl=component" target="_blank" rel="{handler: 'iframe', size: {x:600, y: 600}}" class="modal">Invite Popup Test</a>

Where in jLinked might I do that? I've played around in some different places without success. Some guidance would be nice...
The topic has been locked.
Active Subscriptions:

None
11 years 7 months ago #26543 by jwhelan
Alex,

I know you've been busy with some bug chasing, but I'm still trying to figure out this popup window problem I've been having. If you get a chance to think about it, I'd be delighted.

- JW
The topic has been locked.
Support Specialist
11 years 7 months ago #26552 by alzander
JW,
Sorry for not getting back to this. Other bugs or not, there's no excuse, and I apologize for that.

As for your issue, you will need to redirect the user *somewhere*. So, here's what I would recommend doing:
* Install a custom module that lets you insert PHP. Something like Flexi Custom Code is a good example, but there are others. I've used that on one site in the past. I used to recommend something different for J1.5 though, so I don't really know if there are better for J2.5. Anyways..
* Create a new module that you can insert PHP into it. Add the code you mentioned in your post above. With that, you will have a module that should create a modal popup on the page when that page loads that module.
* Assign the module to position "custom_welcome" (you'll have to type that into the position box).
* In the plugin manager, make sure the Content - Load Modules plugin is enabled.
* Create a Joomla article. Title it "Welcome page" and you may put some text in there if you want... or not.
* In the article contents, include the following tag: {loadposition custom_welcome}
* Create a new menu item that points to the article you just created. You may need to make a new menu altogether and simply not load it into any module positions. That will allow you to create a menu item for the article, but not have it displayed anywhere for the user.
* In JLinked/JFBConnect, set the new user redirection to go to this new menu.

Whew! Obviously, you can test the article directly by going to it before the redirection is setup. Then, once that works, test it out with the redirection to make sure it all works together. Lots of steps, but honestly shouldn't be too bad to implement.

Let me know if you have any questions or concerns, and sorry once again!

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

None
11 years 7 months ago #26556 by jwhelan
Thanks for the reply Alex. As I worked on this, I realized that the behavior that I want involves two windows as follows:

1) The main window where jLinked does it's standard redirect
2) A modal window (to invite LinkedIn contacts) that appears over the main window when the user does his first registration (and at other times at his discretion)

I've figured out how to trigger the modal as follows:

<?
JHTML::_('behavior.modal', 'a.modal');

echo
'<script type="text/javascript">
window.addEvent("domready", function() {
SqueezeBox.open("index.php?option=com_invitex&view=invites&Itemid=245&tmpl=component", {
handler: "iframe",
size: { x: 600, y: 600 }
});
});
</script>';
?>

Where in the loginregister.php controller would this piece of code be best suited to go? At the same time th4e activation email is sent?

- JW
The topic has been locked.
Support Specialist
11 years 7 months ago #26731 by alzander
JW,
Just realized I hadn't responded to this post directly. I believe it's being (mostly) covered in the thread below.
www.sourcecoast.com/forums/jlinked/jlink...e-help-needed#p26730

If not, let me know if there's anything else you needed from this thread I may have missed.

Thanks,
Alex
The topic has been locked.