latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Basic Setup to Allow Just 1 Page in Level 1

Home Forums Community Forum Basic Setup to Allow Just 1 Page in Level 1

This topic contains 11 replies, has 3 voices. Last updated by  David Welch 4 years, 2 months ago.

Topic Author Topic
Posted: Sunday Apr 1st, 2012 at 3:51 pm #9715
Dave Korpi
Username: davekorpi

Hi Guys and Gals..

(My first post here…. Just found S2Member after farting around with 2 other really poorly executed freebies.. This seems HOT HOT HOT if I can figure out the BASICS.. I got the COMPLEX stuff.. Missing the BASICS!)

I made a VIDEO of my question… It is here:
http://www.screencast.com/t/R5vLu3Cg

My EXAMPLE video (i mention in the video above) of how to make it SIMPLE is here.. by example.. the FIRST video… In 5 mins I show EXACTLY how to Copyright music

http://www.take5inc.com/copyright/

Looking for the same fast, simple, efficient how to make just ONE page have access where I create every user manually (because I have a MANUAL pasword protected site where I tried to do my own version of a membership site)…

I want the Provisional Patent Course Site: http://provisionalpatentcourse.com/ to remain unchanged with the ADDITION of one MemberLogin page that then gets them to the ONE SINGLE big fat long page that I will copy from one site to this new one.. Keeping the old one alive during the transistion and giving each user a new username and password… Need help with that by golly!

I used Jing to make those videos.. Its FREE…
http://www.techsmith.com/download/jing/

List Of Topic Replies

Viewing 11 replies - 1 through 11 (of 11 total)
Author Replies
Author Replies
Posted: Tuesday Apr 3rd, 2012 at 5:51 pm #9986
David Welch
Username: dwbiz05

Don’t worry, no matter how smart you are sometimes it just takes a different way of explaining it.

I’ll try to explain how it *should* work here:

1. Membership Options Page: This page is where you would put your buttons and/or text that tells the user to buy your product or subscription. It is not protected by s2member because you need people to be able to click on it. If a user tries to access a protected page they don’t have access to, they will be re-directed to this membership options page. So, if you already have another page that explains or provides sale buttons, etc. then I would just choose that pre-exsiting page as your membership options page.

2. Login Welcome: This is the page where the user is redirected to after logging in. As you see, it is already protected by s2member. Typically you would use this to show the user either current news or maybe their profile info or even just what they purchased if you only need one actual membership page. Think of it as a “members home page”. So if you only need one page, then you should probably just copy your content to this Login Welcome page as that is where the user will be re-directed after login.

3. If you are creating users manually, go to s2member -> general options -> open registration and set it to “NO”. That way no-one will be able to access the http://yoursite.com/wp-login.php?action=register link. Then you will just create each user manually under the WordPress “users” section.

4. In order for the user to login, the easiest thing would be to add a link on your homepage or menu or wherever that goes to this url: http://yourwordpressinstall.com/wp-login.php. That is the general wordpress/s2member login page.

So simple procedure: user clicks the link to wp-login.php and is presented a login form. They log in and are directed to your login welcome page where all your content is posted for logged-in members.

Hope that helps,
Dave

Posted: Tuesday Apr 3rd, 2012 at 6:09 pm #9992
Dave Korpi
Username: davekorpi

Dave:

Thanks a million! I gave you a THUMBS up and wanted to give more but it stopped at ONE!

I understand all you say and have done those things…. I think…

This is the Member page…
http://provisionalpatentcourse.com/ppa-course/

I have done your step 3… Nice way you explained it too!
3. If you are creating users manually, go to s2member -> general options -> open registration and set it to “NO”. That way no-one will be able to access the http://yoursite.com/wp-login.php?action=register link. Then you will just create each user manually under the WordPress “users” section.

Instead of 1. Membership Options Page: I have people sign up and pay here…
http://www.take5inc.com/provisional-patent-video-course-1/
Then I do step 3 above…

Then, once I get the MANUAL thing to work I will upgrade to the Pro version because I have Authorize.net but their nasty Homeland Security bullshit is nasty and they force you to buy the stupid expensive certificates so I might just go PayPal Premium… Or something..

Can you see where I am flubbing things up??

I just want a test page I can show that when I go to it WITHOUT signing up it forces me to the login page and when I log in I get the happy page… I use Google CHrome Incognito to ensure I am not signed in.. I do not want the rest of my website to “go away”

I just want to make this SINGLE page
http://provisionalpatentcourse.com/ppa-course/
work so I can model after it and make others…

I am sure I am missing something even more basic!

Thanks again for taking the time to reply!

BTW… What is YOUR website?? Would LOVE to see one in REAL action by golly!

Dave

Posted: Tuesday Apr 3rd, 2012 at 6:37 pm #9997
David Welch
Username: dwbiz05

LOL, I don’t have a website right now. I program for a living so my clients are the ones that have the websites with s2member.

OK, I see 2 basic issues with your set-up:

1. You’re “membership options” or “sale” page is not on the same domain/wordpress install.
2. You are wanting to redirect to the login page if a non-logged in user tries to access a protected page.

You have your pages protected correctly and it’s redirecting correctly the way s2member was designed. However, if we want to change the redirection to not go to a wordpress “page” like the membership options page, then we need to do a little hacking…

So.. no it’s not basic. :)

You can add the following code to your theme’s functions.php file or to a new file (if it’s not already there) in your wp-content/mu-plugins/s2hacks.php file (you may need to create the directory “mu-plugins” too).

This is the hack:

<?php
function dw_redirect($vars = array()){
	wp_redirect(site_url('/wp-login.php')); //This redirects to the login page.
	exit();
}

add_action("ws_plugin__s2member_before_wp_redirect_w_mop_vars","dw_redirect"); //Adds the function to the hook.
add_action("ws_plugin__s2member_before_wp_redirect_wo_mop_vars","dw_redirect"); //Adds the function to the hook.
?>

This hack will make it so when a user clicks on a protected page, if they are not logged in, they will be redirected to the login screen. Your Membership Options Page setting should then become irrelevant.

Hope that helps,

Dave

Posted: Tuesday Apr 3rd, 2012 at 8:05 pm #10005
Dave Korpi
Username: davekorpi

Dave:

Seems cool! ALMOST!
http://www.screencast.com/t/zjDtJ6r7R

Sooooo.. What would you charge to make my website happy if the fix is not so doggone easy…

I saw the “hacks” on the forum and I KIND OF understand them but I like to have Wizards like you working on things..

I get that you are an S2 tenth degree black belt for sure!

Anyway, my private email is dave.korpi@gmail.com and you can contact me if you are up to taking on another customer! Or call at 831-455-0418

Thanks again for all your super cool help! I can see how, if I knew what I was doing, things could be made to SING!

Thanks,

Dave

Posted: Tuesday Apr 3rd, 2012 at 8:09 pm #10006
Dave Korpi
Username: davekorpi

BTW:

Here is what I put in the file called s2hacks.php in
wp-content/mu-plugins/s2hacks.php

I did not put the *… Hmmmmm…

Anyway… here is the code….

/**
* S2Hacks From Dave Welch April 3, 2012
*You can add the following code to your themeÕs functions.php file or to a *new file (if itÕs not already there) in your wp-content/mu-plugins/*s2hacks.php file (you may need to create the directory Òmu-pluginsÓ too).

This is the hack:
**/

Posted: Tuesday Apr 3rd, 2012 at 9:06 pm #10010
David Welch
Username: dwbiz05

your commented code (/* */) needs to be inside your php tags like this:

<?php
/*****
Your comments here

**********/
?>

That’s why it’s printing out header errors (I believe).

Click on my name and you should see my contact email if you need anything that you don’t want to post here.
I try to help people here learn to do things on their own, but I’m willing to take on the odd project here and there if some one really needs it.

Anyway, if you change the location of your commented info you should be good to go with nothing printing out.

Dave

Posted: Tuesday Apr 3rd, 2012 at 9:51 pm #10015
Dave Korpi
Username: davekorpi

David:

Ahhhhhhh… I buggered up the commenting!!

IT WORKS! Wowieee!

Do you agree??
Here is the site…

http://provisionalpatentcourse.com/

Here is the secret stuff…
http://provisionalpatentcourse.com/ppa-course/

a user is mybestbuddies and password is 123@abc

I think I get it…

It would not have worked without your secret cool stuff!

Thanks,

Dave

Posted: Wednesday Apr 4th, 2012 at 9:07 am #10034
David Welch
Username: dwbiz05

Yep, it looks like it’s working the way you want. I don’t see any issues. Congrats! :)

Dave

Posted: Sunday Nov 4th, 2012 at 3:15 pm #30602
JAMES HALL
Username: jhall_3rd

TRying to do the same thing but no luck adding the code to the functions.php file (via the theme editor) — i always get a parse error. My installation does not have an mu anything folder either — is that must use or, multi-user … an older version of s2member?

lost.

Posted: Sunday Nov 4th, 2012 at 3:19 pm #30603
JAMES HALL
Username: jhall_3rd

hmmmm…. ok so i created the dir and uploaded the hacks file…. now it seems like somethingis happening but i get this error upon trying to load a page:

Warning: Cannot modify header information – headers already sent by (output started at /home/jimfrank/public_html/online/wp-content/mu-plugins/s2hacks.php:11) in …

Posted: Sunday Nov 4th, 2012 at 4:11 pm #30604
David Welch
Username: dwbiz05

Can you post your “s2hacks.php” file here?

Also, so you have a page I can see the error on?

Dave

Viewing 11 replies - 1 through 11 (of 11 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.