Community Support Forums — WordPress® ( Users Helping Users ) — 2010-10-27T07:47:33-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=1093 2010-10-27T07:47:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1093&p=4302#p4302 <![CDATA[Re: Drip Feeding Periods]]>
KirkWard wrote:
Presuming I write a routine to calculate the "month days" (using a SUM from a routine similar to the EOM function in Excel), I presume this formula would have no problem accepting a variable?

Or, using 30.5 days, since 365/12 approx 30.5?

Yes, either of those concepts would be fine to use.

Code:
    <?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.5 >= 1){ ?>
            Drip content to Members who are at least 1 month old.
        <?php } ?>
        
        <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS/30.5 >= 2){ ?>
            Drip content to Members who are at least 2 months old.
        <?php } ?>
        
        <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS/30.5 >= 3){ ?>
            Drip content to Members who are at least 3 months old.
        <?php } ?>

    <?php } ?>

Statistics: Posted by Jason Caldwell — October 27th, 2010, 7:47 am


]]>
2010-10-27T07:19:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1093&p=4297#p4297 <![CDATA[Re: Drip Feeding Periods]]>
Or, using 30.5 days, since 365/12 approx 30.5?

Statistics: Posted by KirkWard — October 27th, 2010, 7:19 am


]]>
2010-10-27T04:03:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1093&p=4285#p4285 <![CDATA[Re: Drip Feeding Periods]]> Hi Kirk. Thanks for the great question.

There are two Constants available for Content Dripping:
Code:
S2MEMBER_CURRENT_USER_REGISTRATION_TIME
S2MEMBER_CURRENT_USER_REGISTRATION_DAYS

S2MEMBER_CURRENT_USER_REGISTRATION_TIME
This will always be an integer; in the form of a Unix timestamp. 0 if not logged in. This holds the recorded time at which the Member originally registered their Username for access to your site. This is useful if you want to drip content over an extended period of time, based on how long someone has been a Member.
Code:
<?php echo S2MEMBER_CURRENT_USER_REGISTRATION_TIME; ?>
This may output something like: 1270537981
( this is a Unix timestamp, which is based on seconds )

S2MEMBER_CURRENT_USER_REGISTRATION_DAYS
This will always be an integer. 0 if not logged in. This is the number of days that have passed since the Member originally registered their Username for access to your site. This is useful if you want to drip content over an extended period of time, based on how long someone has been a Member.
Code:
<?php echo S2MEMBER_CURRENT_USER_REGISTRATION_DAYS; ?>
This may output something like: 120 ( 120 days is approx 4 months )

Using MONTH calculations -----------------------------------------------------------------------
Code:
<?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 >= 1){ ?>
        Drip content to Members who are at least 1 month old.
    <?php } ?>
    
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS/30 >= 2){ ?>
        Drip content to Members who are at least 2 months old.
    <?php } ?>
    
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS/30 >= 3){ ?>
        Drip content to Members who are at least 3 months old.
    <?php } ?>

<?php } ?>
So we are just calculating months dynamically; by dividing DAYS by 30.
Assuming there are 30 days ( on average ) in each month.

Statistics: Posted by Jason Caldwell — October 27th, 2010, 4:03 am


]]>
2010-10-26T11:47:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1093&p=4250#p4250 <![CDATA[Drip Feeding Periods]]>
If I am charging my members by the month, or any other PayPal increment, it would make sense to have the drip feed periods match the subscription periods.

Thanks once again

Statistics: Posted by KirkWard — October 26th, 2010, 11:47 am


]]>