PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
<?php
$time = s2member_registration_time (); // ... first registration time ( free or otherwise ).
$time = s2member_paid_registration_time (); // ... first "paid" registration and/or upgrade time.
$time = s2member_paid_registration_time ("level1"); // ... first "paid" registration or upgrade time at Level#1.
$time = s2member_paid_registration_time ("level2"); // ... first "paid" registration or upgrade time at Level#2.
$time = s2member_paid_registration_time ("level3"); // ... first "paid" registration or upgrade time at Level#3.
$time = s2member_paid_registration_time ("level4"); // ... first "paid" registration or upgrade time at Level#4.
?>
Here are some actual examples that should give you some ideas:
------- Example #1 ------------------------------------------------------
<?php if(s2member_paid_registration_time() > 0){ ?>
This is some content that will be displayed to all Members that have paid you at some point.
<?php if(s2member_paid_registration_time("level2") > 0){ ?>
This will be displayed to all Members that have paid for Level#2 at some point.
<?php } ?>
<?php if(s2member_paid_registration_time("level3") > 0){ ?>
This will be displayed to all Members that have paid for Level#3 at some point.
<?php } ?>
<?php } ?>
------- Example #2 ------------------------------------------------------
<?php if(s2member_paid_registration_time() > 0){ ?>
This is some content that will be displayed to all Members that have paid you at some point.
<?php if(s2member_paid_registration_time("level1") >= ($_30_days_ago = strtotime("-30 days"))){ ?>
Drip content to Members that started paying you at Level#1, at least 30 days ago.
<?php } ?>
<?php if(s2member_paid_registration_time("level1") >= ($_60_days_ago = strtotime("-60 days"))){ ?>
Drip more content to Members that started paying you at Level#1, at least 60 days ago.
<?php } ?>
<?php } ?>
crazycoolcam wrote:This is taken from the S2Member Content Dripping section in the admin panel. I don't remember if a Ccap can take the place of the level, but it is possible that it could.
Hope this helps.
~Crazycoolcam
----------------------------------------------
* Function: s2member_paid_registration_time ($level, $user_id); // returns a Unix timestamp.
The $level argument is optional. It defaults to the first/initial Paid Registration Time, regardless of Level#.
Or you could do this: s2member_paid_registration_time("level1"); which will give you the Registration Time at Level #1.
If a User/Member has never paid for Level #1 ( i.e. they signed up at Level#2 ), the function will return 0.
The argument $user_id defaults to the current user that is logged in.
Here are some examples:
- Code: Select all
<?php
$time = s2member_registration_time (); // ... first registration time ( free or otherwise ).
$time = s2member_paid_registration_time (); // ... first "paid" registration and/or upgrade time.
$time = s2member_paid_registration_time ("level1"); // ... first "paid" registration or upgrade time at Level#1.
$time = s2member_paid_registration_time ("level2"); // ... first "paid" registration or upgrade time at Level#2.
$time = s2member_paid_registration_time ("level3"); // ... first "paid" registration or upgrade time at Level#3.
$time = s2member_paid_registration_time ("level4"); // ... first "paid" registration or upgrade time at Level#4.
?>
Here are some actual examples that should give you some ideas:
------- Example #1 ------------------------------------------------------
<?php if(s2member_paid_registration_time() > 0){ ?>
This is some content that will be displayed to all Members that have paid you at some point.
<?php if(s2member_paid_registration_time("level2") > 0){ ?>
This will be displayed to all Members that have paid for Level#2 at some point.
<?php } ?>
<?php if(s2member_paid_registration_time("level3") > 0){ ?>
This will be displayed to all Members that have paid for Level#3 at some point.
<?php } ?>
<?php } ?>
------- Example #2 ------------------------------------------------------
<?php if(s2member_paid_registration_time() > 0){ ?>
This is some content that will be displayed to all Members that have paid you at some point.
<?php if(s2member_paid_registration_time("level1") >= ($_30_days_ago = strtotime("-30 days"))){ ?>
Drip content to Members that started paying you at Level#1, at least 30 days ago.
<?php } ?>
<?php if(s2member_paid_registration_time("level1") >= ($_60_days_ago = strtotime("-60 days"))){ ?>
Drip more content to Members that started paying you at Level#1, at least 60 days ago.
<?php } ?>
<?php } ?>
pixls wrote:If one of the plugin devs see this, do you have anything planned in the future that would bring this functionality?
Users browsing this forum: Yahoo [Bot] and 1 guest