Page 1 of 1

content dripping user access

PostPosted: October 23rd, 2010, 10:18 pm
by slater
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

Re: content dripping user access

PostPosted: October 24th, 2010, 12:17 am
by Jason Caldwell
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".

Re: content dripping user access

PostPosted: October 24th, 2010, 5:36 am
by slater
perfect! thank you:)