Page 1 of 1

Question about logging in

PostPosted: April 15th, 2011, 10:19 am
by Lucho
Hey guys,

I'm very new to s2member, so I watched your video tutorials to get used to it. However, I have some questions regarding the login. I'm sorry if I bomb you with my numerous questions. :oops:

What I want is to have a content-protected page, a page with the paypal-checkout button and finally a login page.

a) I've already created a content-protected page and another page including the checkout button. My problem is that my template doesn't allow me to have a sidebar so I need a link to the login form on the top list. How can I fix this?

b) Also I couldn't find anything, what should be in the "Login Welcome Page", I mean is there any code snippet to paste in? As far as I understood that page is a members user panel.


Yeah, these are pretty much my questions, and I'd really appreciate any assistance. :)

Regards,
Lucho

Re: Question about logging in

PostPosted: April 15th, 2011, 11:13 am
by fcp2011
Question: Does your theme allow for custom menu's using wordpress menu system? If so:

Just make a custom button in the menu and put the link to your login page. The wordpress login page http://www.yoursite.com/wp-login will work just fine for a login page (as that's its purpose)

Otherwise, you would have to get a developer to create a sidebar in your theme.

B) As for what's in the Members Home page, what ever you want it to be. I put advertisements, site updates, ect in mine.

Daniel

Re: Question about logging in

PostPosted: April 15th, 2011, 11:28 am
by Lucho
Hey Daniel,

thanks for your help. So I'm assuming that in fact the Members Page could be "deleted", if I just want my members to login and grand access to the protected content page. Am I right?

As for the custom menu, my theme only allows me to add pages to the toplist via menu, so I'll create the login page the way you described it.

Thanks a lot!

Re: Question about logging in

PostPosted: April 15th, 2011, 11:34 am
by fcp2011
Well, here is what I did:

In the s2members/General Options/Login Welcome Page settings, I use this code:

http://www.mysite.com/%%current_user_level%%-welcome-page

Then I redirect using a plugin (Pretty Links) to whereever I want. The format of the first login page looks like: http://www.mysite.com/0-welcome-page with the 0 being the users lever number assigned by s2member during registration. Yours would probably be "1".

Now, you don't have to do this if you don't want. Just choose the page you want to redirect to and save changes. If you ever decide to offer more than one membership though, this option will not work and you will have to either name your home pages in the above format or use a redirect like I do.

Daniel

Re: Question about logging in

PostPosted: April 15th, 2011, 11:56 am
by Lucho
Well, I just offer 1 membership level and I probably won't offer another.

Actually I'd like to setup the following. I have a protected content page to which only Level 1 users have access. Of course I also have a page with a paypal checkout, as well as a login page.

So what I want is that after a user purchased a membership via the paypal checkout page, he'll be redirected to the login page, in order to login with his data and then to have access to the protected content page. Another possibility would be, that the user will be redirected directly to the protected content page.

And if a user already purchased a membership, he only has to login and will be able to see the protected content.

Is the above mentioned doable like your instructions?

Re: Question about logging in

PostPosted: April 15th, 2011, 12:11 pm
by fcp2011
The person will need to register after the payment is made. Paypal can be configured to direct them to the registration page after payment.

So, once they are registered, just let them login and then redirect them to the page you want.

Re: Question about logging in

PostPosted: April 15th, 2011, 12:20 pm
by Lucho
That'd be exactly what I want. :o

The point is, how do I fix that? :lol:

On paypal I had to setup a return page, which was given from s2member: http://www.yourdomain.com/?s2member_paypal_return=1

But is this the redirection to the registration form? I know I could test it via Sanboxmode, but being a total dumb with this, I don't want to screw it up. :oops:

Re: Question about logging in

PostPosted: April 15th, 2011, 12:39 pm
by fcp2011
if you are in sandbox mode, you cant screw it up. I would say yes, that is the registration page.

Re: Question about logging in

PostPosted: April 15th, 2011, 1:00 pm
by Lucho
Thanks a lot Daniel. I finally get it done. The only issue I have, is that I don't have a logout-Link. Any idea how I fix that?

Really appreciate your help!

Re: Question about logging in

PostPosted: April 15th, 2011, 1:11 pm
by fcp2011
Well, what I do is hard code a logout button the same way. I use this code:

http://www.yoursite.com/wp-login.php?ac ... ursite.com

Now I will note, that this doesn't include the session cookie. So the user will get a verification screen.

Also, the black bar at the top has an option to logout as well.

Re: Question about logging in

PostPosted: April 15th, 2011, 1:16 pm
by Cristián Lávaque
You can use a conditional to know whether to show the login or logout link. WP Admin -> s2Member -> API / Scripting

Re: Question about logging in

PostPosted: April 15th, 2011, 1:51 pm
by Lucho
Thanks a lot Daniel and Cristián. The Logout-Link worked well for me. Now I can fully enjoy s2member. ;)

Re: Question about logging in

PostPosted: April 15th, 2011, 2:23 pm
by Cristián Lávaque
:)