Page 1 of 1

Content Dripping Message

PostPosted: December 23rd, 2010, 1:40 pm
by kittykatmeowmeow
Ok,

So I understand and can now utilize content dripping in my site:
<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER){ ?>
Content
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 1){ ?>
Content for day 1
<?php } ?>
<?php } ?>

I am going to drip content on a daily basis per membership. How can I put a message on the content that is not yet available to the member? For example, let's say John has been a member for 2 days and he tries clicking on the day 3 content, can I display a message on there stating that this content is not available yet?

Re: Content Dripping Message

PostPosted: December 27th, 2010, 12:10 am
by Cristián Lávaque
Sure, you'd use a condition for that too.

Code: Select all

<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS < 3){ ?>
    Sorry, this content is still not available.
<?php } else { ?>
    Content for Day 3.
<?php } ?>


In the message you could probably even say how many days remain before it's available.

Code: Select all

This content will be available for you in <?php echo (- S2MEMBER_CURRENT_USER_REGISTRATION_DAYS) ?> days.

Re: Content Dripping Message

PostPosted: January 3rd, 2011, 3:40 pm
by kittykatmeowmeow
You are amazing! Thank you!

Re: Content Dripping Message

PostPosted: January 3rd, 2011, 3:55 pm
by kittykatmeowmeow
Is there an area or place I can go to obtain most to all the php scripts that s2member can do, like the above one you shared with me? Are there basically endless possibilities to php through s2member?

Re: Content Dripping Message

PostPosted: January 3rd, 2011, 4:57 pm
by Cristián Lávaque
Well, it's basically PHP and in that regard the possibilities are within PHP's limits.

s2Member has several examples in your admin area under s2Member -> API/Scripting (/wp-admin/admin.php?page=ws-plugin--s2member-scripting).

Re: Content Dripping Message

PostPosted: January 4th, 2011, 11:54 am
by kittykatmeowmeow
Would it be possible to have S2member send out emails as content dripping? For example, on the 2nd day of membership, can an email automatically be sent out to that member?

Re: Content Dripping Message

PostPosted: January 4th, 2011, 1:20 pm
by Cristián Lávaque
Well, it'd be best to configure that with a List Server, which you can synch with s2Member.

http://www.s2member.com/api-list-servers-video/

Re: Content Dripping Message

PostPosted: January 6th, 2011, 4:40 am
by shaunamae
Hi Clavaque,

Quick and fairly silly question... where do I put that code? At the beginning of the post or page in the HTML section? Thanks.

Re: Content Dripping Message

PostPosted: January 6th, 2011, 10:08 am
by Cristián Lávaque
Yes in the HTML editor of the post/page, but not necessarily at the beginning of it, only around the blocks of content you want to protect with the condition. You may also have sections of it that aren't protected.

You'll need to have installed the Exec-PHP plugin so WP parses PHP in posts.
http://wordpress.org/extend/plugins/exec-php/

The new videos help a lot to understand these better.
http://s2member.com/videos/

Hope that helps. :)

Re: Content Dripping Message

PostPosted: January 6th, 2011, 3:13 pm
by shaunamae
Hi clavaque. You're awesome. Thanks so much for your help. Best. Shauna :)

Re: Content Dripping Message

PostPosted: January 6th, 2011, 3:19 pm
by Cristián Lávaque
Glad to help. :)

Re: Content Dripping Message

PostPosted: January 11th, 2011, 3:27 pm
by kittykatmeowmeow
Ok, so I have synced my list server with S2Member! How would I tell the list server to send out emails via content dripping?
Scenario: I have 28 days worth of content. Each day of a member's membership, another day of content is available to them (via content dripping). I would want each member to receive an email notifying them that the content is available (list server). However, not everyone is going to be signing up at the same time. How can I tell S2Member (with list server integration) to send email notifications to the member on each day that the content is available to them?
For example, John is on day 4 of his membership and this morning he receives an email telling him that new content is available to him.

Thanks in advance.

Re: Content Dripping Message

PostPosted: January 11th, 2011, 4:18 pm
by Cristián Lávaque
Well, that'd depend on the list server you're using, but you basically set up an autoresponder with it and when you add someone to that list with s2Member, the autoresponder sequence will start at the beginning for that person, which would be in sync with the membership because they'd happen at the same time.

Re: Content Dripping Message

PostPosted: January 11th, 2011, 5:13 pm
by kittykatmeowmeow
:geek:
Thanks for being so helpful!

Re: Content Dripping Message

PostPosted: January 11th, 2011, 10:02 pm
by Cristián Lávaque
:)

Re: Content Dripping Message

PostPosted: January 12th, 2011, 4:43 pm
by kittykatmeowmeow
Do you have any resources for learning PHP codes? Or maybe there is a huge database out there with PHP cheats? hehehe :)

Re: Content Dripping Message

PostPosted: January 12th, 2011, 6:19 pm
by Cristián Lávaque

Re: Content Dripping Message

PostPosted: January 14th, 2011, 6:08 pm
by smitchell360
@clavaque

I put together a short plugin that adopts your idea of stamping the time with the custom capability. I'll start a new thread for this discussion.

viewtopic.php?f=4&t=1633

Re: Content Dripping Message

PostPosted: January 14th, 2011, 6:30 pm
by Cristián Lávaque
Awesome!

Although I don't remember it being my idea, it was Jason who mentioned it and I was asking him the details to figure out how it works. :)

/me goes check it out.