Page 1 of 1

Ajax registration and single-sign-on with free blog

PostPosted: June 21st, 2011, 6:31 am
by beezee
Sorry if this has been answered somewhere already, couldn't find it searching Google or the forum.

I'd like to use Ajax to allow users to register for a free blog from the homepage, and I'd like to also work in a Single Sign On option from FB.

I'm sure I can pull the necessary data from FB to populate all the reg fields, my question is will s2member pro allow me to do these two things-

1- set the registration form to display:none on the homepage, and show it in a jquery ui dialog when someone clicks the reg link, then post the data somewhere to complete their registration, set up their blog, log them in and redirect them to their blog url

2- pass variables that I extract from FB as their registration info, and then complete the steps in #1

If there's an API for this in the PRO version I'll be happy to upgrade, I just need to know it can do what I'm looking for first.

Looking forward to a response, thanks! :)

Re: Ajax registration and single-sign-on with free blog

PostPosted: June 22nd, 2011, 3:35 am
by Jason Caldwell
Thanks for the excellent question.

I'm sorry, there is no official API documented for this. However, a good WordPress developer should have no trouble integrating this for you. I would suggest using s2Member Pro Form Shortcodes for this, wrap them inside a hidden div that is displayed dynamically via JavaScript, and let s2Member do it's thing for you. If you need to prefill form fields with data collected from Facebook, I would recommend custom Form templates for s2Member Pro.

Is it possible to modify the PayPal® and/or Authorize.Net® Pro Form templates?
Usually not necessary. But yes, if you really need to. Please check your /s2member-pro/includes/templates/forms/ directory. You can take the default templates, and place some ( or all of them ) into your own WordPress® theme directory. s2Member Pro will automatically find your custom templates there. By placing custom templates into your theme directory, you can be sure they won't get overwritten in a future upgrade. Either that, or you can just use the default templates like they are, and customize them with your own CSS rules inside the Stylesheet for your WordPress® theme ( i.e. style.css ). If you're using a PriMo Theme ( for instance, the s2Clean Theme ), check your Theme Options Panel, under: Custom CSS / Style Sheet.
TIP: You can also use PHP code inside your custom template files.

Re: Ajax registration and single-sign-on with free blog

PostPosted: June 22nd, 2011, 7:02 am
by beezee
Thanks Jason this is very helpful. I have a few follow up questions if you don't mind-

1- How flexible is the shortcode display? I'm assuming if I used a jquery ui .dialog() to display it the shortcode wouldn't be processed, can I at least style it to appear the same way?

2- In this case I assume I would not be processing the form via Ajax, rather letting it submit normally and then go through the s2member default reg process. How customizable is that process in the PRO version? Ideally I don't want the user to have to take extra steps, so I'd like them to set their password during registration, and after filling out one form, be taken directly to the homepage of their new blog. Can this be done?

Thanks again for the great support, it's very encouraging.