Page 1 of 1
Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 26th, 2011, 1:53 am
by FirstUK123
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
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 26th, 2011, 2:50 am
by FirstUK123
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
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 26th, 2011, 4:37 am
by Cristián Lávaque
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 #3In 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.
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 26th, 2011, 5:00 am
by FirstUK123
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
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 26th, 2011, 10:00 am
by FirstUK123
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
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 27th, 2011, 12:47 am
by Cristián Lávaque
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.
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 27th, 2011, 1:13 am
by FirstUK123
Okay....so I paste the code in the HTML of the page/post before the </body> tag? Thanks again...
Brian
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 27th, 2011, 2:57 am
by Cristián Lávaque
No, you paste that shortcode condition in the Visual editor for the pages with Level 1 (Silver) content.
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 27th, 2011, 8:34 am
by FirstUK123
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
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 27th, 2011, 10:27 am
by FirstUK123
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
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 27th, 2011, 4:40 pm
by Cristián Lávaque
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.
![Neutral :|](https://www.primothemes.com/forums/images/smilies/icon_neutral.gif)
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 31st, 2011, 1:35 am
by FirstUK123
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
Re: Membership Option Queries....
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
July 31st, 2011, 8:38 pm
by Cristián Lávaque