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™

content dripping user access

s2Member Plugin. A Membership plugin for WordPress®.

content dripping user access

Postby slater » October 23rd, 2010, 10:18 pm

Hiya,

I've got the content dripping set up and working perfectly, but I want to allow some people the ability to view all content as soon as they are registered. Is there a way to do this?

thanks

Toresa
User avatar
slater
Registered User
Registered User
 
Posts: 2
Joined: October 23, 2010

Re: content dripping user access

Postby Jason Caldwell » October 24th, 2010, 12:17 am

Hi there. Thanks for the excellent question.

Yes, you might try something like this. This is a more elaborate example, building upon what's documented in your Dashboard under: s2Member -> API Scripting -> s2Member Content Dripping.

Code: Select all
<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER){ ?>

    This is some content that will be displayed to all Members.
    
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 30 || current_user_can("access_s2member_level3")){ ?>
        Drip content to Members who are more than 30 days old.
    <?php } ?>
    
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 60 || current_user_can("access_s2member_level3")){ ?>
        Drip content to Members who are more than 60 days old.
    <?php } ?>
    
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 90 || current_user_can("access_s2member_level3")){ ?>
        Drip content to Members who are more than 90 days old.
    <?php } ?>

<?php } ?>
So in this example, we're allowing Level #3 Members to see everything.
The pipe symbols ( || ) means "OR".
~ 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

Re: content dripping user access

Postby slater » October 24th, 2010, 5:36 am

perfect! thank you:)
User avatar
slater
Registered User
Registered User
 
Posts: 2
Joined: October 23, 2010


Return to s2Member Plugin

Who is online

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

cron