Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-25T23:24:45-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14842 2011-11-25T23:24:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=53923#p53923 <![CDATA[Re: Help! How to show membership registration & expiry date?]]>
You could probably work with the payment time and based on that, determine when he should be paying next. Like, if he started paying on a day 23rd of the month, then you can assume he pays every 23rd if it's a montly subscription. You can find the payment times mentioned under WP Admin -> s2Member -> API / Scripting -> s2Member Content Dripping.

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — November 25th, 2011, 11:24 pm


]]>
2011-11-21T20:19:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=53671#p53671 <![CDATA[Re: Help! How to show membership registration & expiry date?]]> Statistics: Posted by raygulick — November 21st, 2011, 8:19 pm


]]>
2011-11-21T19:29:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=53670#p53670 <![CDATA[Re: Help! How to show membership registration & expiry date?]]> Statistics: Posted by raygulick — November 21st, 2011, 7:29 pm


]]>
2011-11-21T19:24:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=53668#p53668 <![CDATA[Re: Help! How to show membership registration & expiry date?]]>
Code:
if ($s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time") ) {
   echo '<p><em>Membership expires ';
   echo date("F j, Y", $s2member_auto_eot_time);
   echo '</em></p>';
}


That is, if the assignment succeeds, the assignment evaluates as true. Again, not really coder, so take it with a huge chunk of salt.

Statistics: Posted by zauber — November 21st, 2011, 7:24 pm


]]>
2011-11-21T18:10:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=53663#p53663 <![CDATA[Re: Help! How to show membership registration & expiry date?]]>
Code:
if (function_exists('$s2member_auto_eot_time')){$s2member_auto_eot_time = $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time");} ?>
<?php
   echo '<p><em>Membership expires ';
   echo date("F j, Y", $s2member_auto_eot_time);
   echo '</em></p>';

This is a slight modification to the code shown above, but all it returns is the following, no matter what date the EOT is set at:
Membership expires January 1, 1970

Am I missing something obvious?

Statistics: Posted by raygulick — November 21st, 2011, 6:10 pm


]]>
2011-11-21T13:18:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=53648#p53648 <![CDATA[Re: Help! How to show membership registration & expiry date?]]> Statistics: Posted by zauber — November 21st, 2011, 1:18 pm


]]>
2011-09-05T00:13:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=34022#p34022 <![CDATA[Re: Help! How to show membership registration & expiry date?]]>
camillemm wrote:
Code:
<?php if (function_exists('$s2member_auto_eot_time')){$s2member_auto_eot_time = $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time");} ?>
<?php
echo date("j F Y", $s2member_auto_eot_time);
?>



Thanks a lot for the date() example! http://php.net/date

One correction: $s2member_auto_eot_time is a variable, not a function, and the value of that variable won't be a function either, so that will always be false. In the example above I used an if that I believe is close to what you wanted to show.

Statistics: Posted by Cristián Lávaque — September 5th, 2011, 12:13 am


]]>
2011-09-05T00:09:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=34021#p34021 <![CDATA[Re: Help! How to show membership registration & expiry date?]]> viewtopic.php?f=4&t=6196

Here's a code example:

Code:
if ($days get_user_option('s2member_auto_eot_time'))
{
    
$days ceil(($days time()) / 86400);

    if (
$days 1)
        echo 
'Your subscription has expired.';
    elseif (
$days == 1)
        echo 
'Your subscription will end tomorrow!';
    else
        echo 
'You have '$days' days left.';


Note that those with a subscription don't have an EOT time until they stop the subscription in some way (e.g. cancelled).

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — September 5th, 2011, 12:09 am


]]>
2011-09-04T11:26:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=33979#p33979 <![CDATA[Re: Help! How to show membership registration & expiry date?]]>
Code:
<?php if (function_exists('$s2member_auto_eot_time')){$s2member_auto_eot_time = $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time");} ?>
<?php
echo date("j F Y", $s2member_auto_eot_time);
?>


You should search in this forum as it has been explained how to do that (before complaining).

Statistics: Posted by camillemm — September 4th, 2011, 11:26 am


]]>
2011-09-04T08:18:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=33968#p33968 <![CDATA[Re: Help! How to show membership registration & expiry date?]]>
No way to get that, sorry :-(
Browsed through all that php jungle, all they talk about is how to convert a date in unix stamp, whereas I need exactely the opposite! And as I am not a programmer, most of that stuff is chinese for me anyways ...

Really, is there NO way to show people when their membership expires?
I think this is bad and many might feel cheated or so, give them the feeling we are hiding something, and that's definitely NOT what I want ...

I tried with <?php $eot_time = get_user_field('s2member_auto_eot_time', $user_id); ?> too ... but it does not show anything !??!
blank!??!

Help! This might be also legally a problem, if people have no way to clearly see when their membership expires or when next payment is due ...

Thanks!

Statistics: Posted by candy — September 4th, 2011, 8:18 am


]]>
2011-09-03T13:20:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=33891#p33891 <![CDATA[Re: Help! How to show membership registration & expiry date?]]> http://php.net/date

For the EOT, this may help:

Code:
$eot_time get_user_field('s2member_auto_eot_time'$user_id); 


If you need something more advanced, you could use the Notifications API to create your own logs and use those to display your messages.

We're working on improving this in future releases.

Statistics: Posted by Cristián Lávaque — September 3rd, 2011, 1:20 pm


]]>
2011-09-03T07:38:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14842&p=33864#p33864 <![CDATA[Help! How to show membership registration & expiry date?]]>
I have searched around but could not find anything that fits :-(

I want to make a page where the user will see the details about his membership.

Registration date, next due renewal date, cancelation button (to be deactivated 14 days before next due renewal date - like if he did not cancel at least 14 days in advance, renewal will go on)

I only found this: <?php echo S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME; ?>

but this gives the unix stamp and I want to show the normal readable date not the unix stamp! And have no clue how to do it :-(

Thanks!

Statistics: Posted by candy — September 3rd, 2011, 7:38 am


]]>