Page 1 of 1

Shortcodes Conditionals showing blank page for admin

PostPosted: September 17th, 2011, 10:31 pm
by notset4life
I have tried the following code

Code: Select all
[s2If current_user_is(s2member_level4)]
    Some premium content for Level 4 Members.
[/s2If]

[s2If current_user_is(s2member_level3)]
    Some premium content for Level 3 Members.
[/s2If]

[s2If current_user_is(s2member_level2)]
    Some premium content for Level 2 Members.
[/s2If]

[s2If current_user_is(s2member_level1)]
    Some premium content for Level 1 Members.
[/s2If]

[s2If current_user_is(s2member_level0)]
    Some content for Free Subscribers.
[/s2If]

[s2If !current_user_can(access_s2member_level0)]
    Some public content.
[/s2If]


I know it works with level 0, 1 and public. Didn't test with the others..except for viewing the page as ADMIN. I am assuming admin should have level 4 access (just like with php conditionals) so I should be able to see the level 4 members text.

But I just see a blank page when viewing the page as admin.
?
thanks

Re: Shortcodes Conditionals showing blank page for admin

PostPosted: September 20th, 2011, 11:58 am
by notset4life
Anybody?

Re: Shortcodes Conditionals showing blank page for admin

PostPosted: September 20th, 2011, 9:26 pm
by Cristián Lávaque
The thing is that none of the conditions would be true for an admin. He's not at level 1, 2, 3, 4 or 0 and he can access 0. :)

Re: Shortcodes Conditionals showing blank page for admin

PostPosted: September 21st, 2011, 12:32 pm
by notset4life
So the blank page that I am seeing is correct? That's all I really want to know
so I know the thing is working properly. As mentioned, I was assuming the
Admin automatically has level 4 access, so would be able to see level 4 text.

thanks

Re: Shortcodes Conditionals showing blank page for admin

PostPosted: September 21st, 2011, 7:54 pm
by Bruce C
Yes, the blank page you're seeing it correct. Administrators don't have an s2member level. The level they are assigned is 'administrator', therefore, they can ACCESS s2member level 0+, but are not one of the levels.

If you want say, level 1+ members (including yoruself) to be able to see something, you would use something like:

Code: Select all
[s2If current_user_can(access_s2member_level1)]
Content for level 1 and above users.
[/s2If]

Re: Shortcodes Conditionals showing blank page for admin

PostPosted: September 22nd, 2011, 1:05 pm
by notset4life
thank you.