PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Membership Option Queries....

s2Member Plugin. A Membership plugin for WordPress®.

Membership Option Queries....

Postby FirstUK123 » July 26th, 2011, 1:53 am

Hi,

This is a question regarding the setting of membership levels where these are described as being at a particular Level or above.

Our Membership packages are as follows:-

A Silver membership receiving X content.

A Gold membership receiving Y content - but NOT the Silver membership X content.

A Platinum membership receiving Z content + the Gold Y content...but NOT the Silver X content.

As the default appears to be a particular "Level or Above" - how do I prevent a Gold and Platinum member from seeing the Silver member X content?

Your advice much appreciated....thanks.

Brian
User avatar
FirstUK123
Registered User
Registered User
 
Posts: 12
Joined: July 25, 2011

Re: Membership Option Queries....

Postby FirstUK123 » July 26th, 2011, 2:50 am

Clarification to the above as there have been some changes:-

Our Membership packages are as follows:-

A Silver membership receiving X content.

A Gold membership receiving Y content - but NOT the Silver membership X content.

A Platinum membership receiving Z content + the Gold Y content + the Silver X content.

So how do I prevent the Gold member having access to the Silver X content?

Thanks
User avatar
FirstUK123
Registered User
Registered User
 
Posts: 12
Joined: July 25, 2011

Re: Membership Option Queries....

Postby Cristián Lávaque » July 26th, 2011, 4:37 am

Besides your Page Access Restriction, you could use a conditional for the Silver (Level 1) content, checking that the user is not Gold (Level 2). WP Admin -> s2Member -> API / Scripting -> Simple/Shortcode Conditionals -> Example #3

In pages with Access Restriction set to Level 1, use this to wrap the content:

Code: Select all
[s2If !current_user_is(s2member_level2)]
    Silver Content
[/s2If]
The "!" means "not".

This way Silver user gets access to Silver content, Gold user gets access to Gold content but not Silver content, Platinum user gets access to Silver, Gold and Platinum content.

I'm pretty sure it'll work. Let me know how it goes in your tests.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Membership Option Queries....

Postby FirstUK123 » July 26th, 2011, 5:00 am

Thanks for that Christian...for the moment, I just wanted to check this could actually be done.

Still working on putting the actual site together, so it will be a few days before I work more on the membership section. I will though, let you know what happens with this - thanks again.

Brian
User avatar
FirstUK123
Registered User
Registered User
 
Posts: 12
Joined: July 25, 2011

Re: Membership Option Queries....

Postby FirstUK123 » July 26th, 2011, 10:00 am

Revisting this sooner than I expected.....so, do I just paste that code into the Require Custom Capabilities? field of the particular page?

Also, as I am using welcome page redirects for each level, I assume I won't have to use this code on the Silver Welcome page.....only on the restricted content/pages for this Level, beyond the Welcome page?

Finally, how can I best test this Christian - is there a way of doing whilst signed-in as Admin? Thanks again for your help...

Brian
User avatar
FirstUK123
Registered User
Registered User
 
Posts: 12
Joined: July 25, 2011

Re: Membership Option Queries....

Postby Cristián Lávaque » July 27th, 2011, 12:47 am

You'd use that conditional in the actual body of the page/post for Silver (Level 1) members, in combination with the access restriction set to Level 1 in the meta box.

The best way to test the access would be to create test user accounts set at each level and login with them to browse the content.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Membership Option Queries....

Postby FirstUK123 » July 27th, 2011, 1:13 am

Okay....so I paste the code in the HTML of the page/post before the </body> tag? Thanks again...

Brian
User avatar
FirstUK123
Registered User
Registered User
 
Posts: 12
Joined: July 25, 2011

Re: Membership Option Queries....

Postby Cristián Lávaque » July 27th, 2011, 2:57 am

No, you paste that shortcode condition in the Visual editor for the pages with Level 1 (Silver) content.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Membership Option Queries....

Postby FirstUK123 » July 27th, 2011, 8:34 am

Well Christian, this is what happened....I put the code on the Silver page as directed and published this - when I viewed the page as Admin it showed the words Silver Content on the page.

When I logged out as Admin and logged-in as a Gold member, I could however still access the Silver page, but the Silver Content text was not visible on the page.

These is another issue I have, that may be connected to this:- I have 3 Welcome pages - one for each level. The default Welcome page in the Login Welcome Page settings is set to redirect as follows:-

domain/welcome-member/%%current_user_level%%

Each of the 3 Welcome pages are correctly set to the respective 1,2 or 3 Levels. But when I login as either Silver, Gold or Platinum I get the same default Welcome page content, even though there is a numerical value change in the URL each time.

Any thoughts on this? Could this redirect issue be effecting the shortcode asspect? Once again, your advice much appreciated.

Brian
User avatar
FirstUK123
Registered User
Registered User
 
Posts: 12
Joined: July 25, 2011

Re: Membership Option Queries....

Postby FirstUK123 » July 27th, 2011, 10:27 am

An update to my last post.....I decided to re-work the Welcome page structure. Now there is just the one default Welcome page with no redirects....this works fine.

On the navigation on this Welcome page, there are 3 links for Silver Area | Gold Area | Platinum Area.

Logged in as Silver, I can only access the Silver Area - fine.

Logged in as Platinum, I can access all three areas - fine.

Logged in as Gold, I can access Gold but not Platinum....but can still access Silver.

I do have the shortcode you suggested on the Silver Area page. As a Gold member, the Silver Area page opens...I can see the Silver Content text and the rest of the content.

So, this does not appear to be functioning....if I can just prevent the Gold member from accessing this one page, then they will not by default, have access to all the content beyond this one page.

Your assistance appreciated - thanks Christian.

Brian
User avatar
FirstUK123
Registered User
Registered User
 
Posts: 12
Joined: July 25, 2011

Re: Membership Option Queries....

Postby Cristián Lávaque » July 27th, 2011, 4:40 pm

Brian, the conditional I gave you doesn't prevent the Gold user from loading the page, but prevents the content inside it from showing to the Gold user. The thing is that because of the nature of Levels' incremental access, he will have access to Silver page. :|
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Membership Option Queries....

Postby FirstUK123 » July 31st, 2011, 1:35 am

Resolved this by pursuading the client to have just the 2 Levels - Silver and Gold with the Gold having what was the Platinum benefits.....they can always add more levels later. Simple, easy and all works perfectly! Thanks Christian.

Brian
User avatar
FirstUK123
Registered User
Registered User
 
Posts: 12
Joined: July 25, 2011

Re: Membership Option Queries....

Postby Cristián Lávaque » July 31st, 2011, 8:38 pm

:)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron