Hi Adam,
You can find details about how that constant works by going to Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants. The constant returns the registration time in the form of a Unix timestamp.
So for example, let’s say you want to start testing your content dripping today. You can get the Unix timestamp for 12pm today (1329998400) and then add 3600 seconds to it (1 hour): 1330002000. (Keep in mind Unix timestamps are always UTC, so adjust accordingly for your timezone.)
That means at 1pm it will be 1330002000 in Unix time. I’ll continue adding 3600 seconds to create three timestamps:
1330002000 (1 hour from now)
1330005600 (2 hours from now)
1330009200 (3 hours from now)
With those, I can now modify the content dripping code as follows:
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_TIME >= 1330002000){ ?>
Drip content to Members that registered at least 1 hour ago.
<?php } ?>
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_TIME >= 1330005600){ ?>
Drip content to Members that registered at least 2 hours ago.
<?php } ?>
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_TIME >= 1330009200){ ?>
Drip content to Members that registered at least 3 hours ago.
<?php } ?>
-
This reply was modified 4 years, 10 months ago by Raam Dev.