Page 1 of 1

Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 1:29 pm
by marrell
Hi,
Thanks for a great plugin.I have been using it for a while and never noticed this issue until recently.We have a section on our site which we call a VIP area.Paid members with access to the VIP area are "level 2".
Then we have other sites areas which require free registration to access the links.Those members are "subsribers".
My problem is than level2 members cannot see what the subscribers level members can.Even me logged as admin cannot see the links unles I log in as a subscriber.
Hope you know what Im on about.
Regards,
Marrell

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 3:19 pm
by Eduan
Are you using s2Member conditionals on the subscriber area?

If you are then it's supposed to work that way. Since the conditionals are to make sure that only a certain level (or custom capability) can see that.

Hope this helps. :)

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 3:36 pm
by marrell
Eduan wrote:Are you using s2Member conditionals on the subscriber area?

If you are then it's supposed to work that way. Since the conditionals are to make sure that only a certain level (or custom capability) can see that.

Hope this helps. :)


Hi Eduan,
I think thats it. What If I added something like
Code: Select all
(s2member_level2)

into this code?
Code: Select all
[s2If !current_user_is(s2member_level0)]<a href="http://mysite.net/wp-login.php?action=register">Register</a>[/s2If] [s2If current_user_is(s2member_level0)]

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 4:12 pm
by Eduan
That would work. The code is correct as far as I know. Though that would only give access if they have that level (1-4).

Hope this helps. :)

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 4:26 pm
by marrell
Its not working.Its ok when I change the level0 to level2 but when I use a combination of both levels the links dont show up.

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 5:10 pm
by Eduan
Try doing something like:
Code: Select all
[s2If !current_user_is(s2member_level0)]<a href="http://mysite.net/wp-login.php?action=register">Register</a>[/s2If][s2If current_user_is(s2member_level0)]<a href="http://wpth.net/wp-login.php?action=register">Register</a>[/s2If]


Please tell me how that goes.

Hope this helps. :)

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 5:30 pm
by marrell
Im not sure I have you.It looks like half of the code I posted.All I want is to have the level2 members be able to access free stuff.
Can you please get rid of my URL.I didnt realized I had posted it. ;)
Thanks

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 5:41 pm
by Eduan
That code I gave you should work, let me give it to you with line breaks so that it's more understandable:
Code: Select all
[s2If !current_user_is(s2member_level0)]
Content for level 1-4 members.
[/s2If]

[s2If current_user_is(s2member_level0)]
Content for level 0 members.
[/s2If]

If this code doesn't work please tell me.

P.S. I removed your link from my other post. ;)

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 6:01 pm
by marrell
Code: Select all
[s2If !current_user_is(s2member_level0)]
Content for level 1-4 members.
[/s2If]


This is visible to unregistered too.


Thanks for removing my link.

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 7th, 2012, 7:05 pm
by Eduan
Yes, that is because it says (in human) "If the user is not level 0, then show this content is visible", so anyone, including non-members can see that, because they're not level 0.

If you don't want that to be visible to non-members you can use:
Code: Select all
[s2If current_user_is(s2member_level0)]
Content for level 1-4 members.
[/s2If]

That way it thinks "If the user is level 0, then show this content". Now this code would only work if the user is level 0, if you want the user to be a higher level and be able to access the content you may try:
Code: Select all
[s2If is_user_logged_in() AND current_user_can(access_s2member_level0)]
Content for members level 0 or higher.
[/s2If]
That way if they can access level 0 they will be able to see it, so naturally a level 2 would also be able to see it.

I apologize if this is what you wanted all along and I didn't understand you.

Hope this helps. :)

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 8th, 2012, 3:25 pm
by marrell
Hi again,
Thanks a lot it works.Only small thing that bothers me.Here is my edited code.

Code: Select all
[s2If !current_user_is(s2member_level0)]<a href="http://mysite.net/wp-login.php?action=register">Register for FREE to see the links.</a>[/s2If]
[s2If is_user_logged_in() AND current_user_can(access_s2member_level0)]

[/s2If]</blockquote>


Users level2 can see the link now but they can also see the text "Register for FREE to see the links."
Its ok with subscribers.I tried to edit first part of the code but no luck.

Hope I explained it ok.

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 8th, 2012, 4:51 pm
by Eduan
That is because you put a ! before the current_user_is. That means it will think "If user is NOT level 0" and that also applies to level 2.

If you want that only to be visible to non-members then try this instead:
Code: Select all
[s2If !is_user_logged_in()]
Put the content for non-member only here.
[/s2if]


Hope this helps. :)

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 8th, 2012, 5:21 pm
by marrell
I love you man. Its working like a charm.
Thanks a lot!

Re: Paid Members Level2 cannot see subscribers content!

PostPosted: January 8th, 2012, 5:41 pm
by Eduan
You're welcome! :)
Let us know if you need anything else. ;)