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™

Shortcodes Conditionals showing blank page for admin

s2Member Plugin. A Membership plugin for WordPress®.

Shortcodes Conditionals showing blank page for admin

Postby notset4life » September 17th, 2011, 10:31 pm

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
User avatar
notset4life
Registered User
Registered User
 
Posts: 6
Joined: September 4, 2011

Re: Shortcodes Conditionals showing blank page for admin

Postby notset4life » September 20th, 2011, 11:58 am

Anybody?
User avatar
notset4life
Registered User
Registered User
 
Posts: 6
Joined: September 4, 2011

Re: Shortcodes Conditionals showing blank page for admin

Postby Cristián Lávaque » September 20th, 2011, 9:26 pm

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. :)
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: Shortcodes Conditionals showing blank page for admin

Postby notset4life » September 21st, 2011, 12:32 pm

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
User avatar
notset4life
Registered User
Registered User
 
Posts: 6
Joined: September 4, 2011

Re: Shortcodes Conditionals showing blank page for admin

Postby Bruce C » September 21st, 2011, 7:54 pm

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]
~Bruce ( a.k.a. Ace )

If you're interested in a Professional Installation, or Custom Coding Job, you can send your request here.

Proud Supporter of:
The Zeitgeist Movement
and Occupy Everything
User avatar
Bruce C
Experienced User
Experienced User
 
Posts: 337
Joined: July 20, 2011

Re: Shortcodes Conditionals showing blank page for admin

Postby notset4life » September 22nd, 2011, 1:05 pm

thank you.
User avatar
notset4life
Registered User
Registered User
 
Posts: 6
Joined: September 4, 2011


Return to s2Member Plugin

Who is online

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

cron