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™

Uses s2Member API Constants, instead of functions. Error

s2Member Plugin. A Membership plugin for WordPress®.

Uses s2Member API Constants, instead of functions. Error

Postby erichamby » May 6th, 2010, 6:33 pm

If you use Example #5: Uses s2Member API Constants, instead of functions.
you get errors.

Parse error: syntax error, unexpected T_ENDWHILE
User avatar
erichamby
Registered User
Registered User
 
Posts: 38
Joined: May 6, 2010

Re: Uses s2Member API Constants, instead of functions. Error

Postby erichamby » May 6th, 2010, 7:02 pm

I guess what i need to know is does using Example #3 work the same has Example #5? I wasnt sure if the plugin actually changed the user role.
User avatar
erichamby
Registered User
Registered User
 
Posts: 38
Joined: May 6, 2010

Re: Uses s2Member API Constants, instead of functions. Error

Postby Jason Caldwell » May 6th, 2010, 9:06 pm

The examples found under s2Member -> API Scripting -> Advanced Conditionals.

Yes, example #3 works the same as example #5.

Example #5 should have been this:
Code: Select all
<?php if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL >= 4){ ?>
    Some content for Members with an s2Member Level >= 4.
<?php } else if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL >= 3){ ?>
    Some content for Members with an s2Member Level >= 3.
<?php } else if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL >= 2){ ?>
    Some content for Members with an s2Member Level >= 2.
<?php } else if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL >= 1){ ?>
    Some content for Members with an s2Member Level >= 1.
<?php } else if(S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 0){ ?>
    Some content for Free Subscribers.
<?php } else if(S2MEMBER_CURRENT_USER_ACCESS_LEVEL === -1){ ?>
    Some public content.
<?php } ?>

Thanks for reporting this. I'll have this corrected.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest