Raam's suggestion would also work for what you want, Matija.
Here's my own version of that condition that seems to do the job, but is simpler to write:
- Code: Select all
<?php if (current_user_can('access_s2member_level1') || S2MEMBER_CURRENT_USER_REGISTRATION_DAYS < 4) { ?>
Video content would go here.
<?php } else { ?>
PayPal button code to purchase access would go here..
<?php } ?>
I basically checks if the user can access Level 1 content, or if his account has less than 4 days of having been created (i.e. 3 days). This condition would be true for any account in its first 3 days, even free users, or for any paid members at Level 1 or above. It'd be false for anyone else: someone not logged in, or a free user whose account is older than 3 days.
Sorry about that video, I was sure it had an explanation of the shortcode conditionals, but I watched it again and that version of s2Member seems to not have had it yet. The documentation for them in the Scripting API page is simple enough if you read it and go through the examples. I was only suggesting these to show the button in the Login Welcome page for the approach I suggested first. Shortcodes don't support the conditions that check how old the account is, for that I was suggesting the EOT instead.
The PHP condition needs to be used in each post, like Raam said. You can also create a hack to apply this condition to every post in a certain category. For an example of a conditional used in a similar way, please watch the second video on Custom Capabilities, starting around time 7:00.
Checking the user registration days with a condition, doesn't require s2Member Pro, but it needs the hack or adding the condition in every post.
What I suggested first would work well, but it does require s2Member Pro's free registration pro-form to create free accounts at Level 1 with an EOT.
viewtopic.php?f=4&t=16382&p=58576#p56735