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.

Login Welcome page

Home Forums Community Forum Login Welcome page

This topic contains 6 replies, has 2 voices. Last updated by  Young Kwon 3 years, 9 months ago.

Topic Author Topic
Posted: Friday Mar 29th, 2013 at 6:51 pm #46110
Young Kwon
Username: youngkg7

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Saturday Mar 30th, 2013 at 9:21 am #46136
cassel
Username: cassel

Yes, you can do that with conditionals and Custom Capabilities. Assuming you set a custom capability (ccap) called “video1” that has the protected content, you can have this code:

[s2If !current_user_can(access_s2member_ccap_video1)]
    Put information about the "video1" content (or any other information you want to share with those who didn't purchase the "video1" ccap
[/s2If]
[s2If current_user_can(access_s2member_ccap_video1)]
    Put the content to be accessible to those who purchased the "video1" content
[/s2If]

It is very easy and very flexible.

Posted: Saturday Mar 30th, 2013 at 1:07 pm #46146
Young Kwon
Username: youngkg7

Sorry, i am kind of a newbie.. where are these options? and where can i put the code?
Thank you!

Posted: Saturday Mar 30th, 2013 at 1:22 pm #46148
cassel
Username: cassel

You can put those codes directly in the page. Being shortcodes between brackets [], it will not be displayed as text, but just read as a commant.

So, on the page where you want to put the information about your product, you put that information inside the conditional for “if the person does not have the permission to view the protected content”, and you put the actual content (video, lesson, etc.) inside the second conditional that says “if the person HAS permission to view this protected content”.

Basically, you need these steps:
– create the paypal button using “video1” in the list of ccaps (so the member will purchase that specific access)
– create the page using the conditional as stated above (i used “video1” as a ccap, but you can use anything you want and call that particular piece of content any name you want, and you can have as many as you want too)
– put the info about the content inside one conditional, and the actual content inside the other

Now, since you are an admin, you will not be able to see the difference as it will display the content for you, so create a test member, and in the member’s profile, at the bottom, add the ccap that you just want to test (like “video1”). This will prevent you from having to make an actual purchase. And log in as the test member or try to view without being logged in. You should then see different content; either the information, OR the content itself.

Give it a try and let us know how it goes.

Posted: Saturday Mar 30th, 2013 at 1:45 pm #46151
Young Kwon
Username: youngkg7

okay, i understand what this does but wouldnt this only show different things for non-purchased and
purchased customers? because i am trying to focus on the paid members.
I want to create a little portal type that looks completely separate from the sales pages.
After a customer purchases a membership, they would register and login.
They would be logged into a completely different website that has content restricted only to members.
Login would be available on the purchasing pages but when they login, they would be redirected to a website
that looks completely different but is on the same domain.
The sales and purchasing pages would not be even be visible after the members login.
Thank you for replying

Posted: Saturday Mar 30th, 2013 at 1:56 pm #46152
cassel
Username: cassel

I am not sure if you can work this for different websites or not.

I am using these ccaps and the shortcodes i included above are just a basic idea but it can be expanded and the viewers might not see what is going on behind the scene. I would suggest you check out the API/Scripting > Simple/Shortcode conditionals for the many options you can have.

You can limit some content to those logged in or not.
You can limit the content based on their level.
You can limit the content based on the ccaps (which is what i explained above)
You can limit based on a combination of conditions.

Did you watch the video on the Custom Capabilities? It is listed just at the bottom of this page.

Posted: Saturday Mar 30th, 2013 at 2:01 pm #46153
Young Kwon
Username: youngkg7

I will definitely take a look at it.
Thank you for your help!

Viewing 6 replies - 1 through 6 (of 6 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.