Page 2 of 2

Re: Display account variables in theme

PostPosted: April 29th, 2011, 9:32 pm
by Cristián Lávaque
You'd use 's2member_last_payment_time' instead of 's2member_auto_eot_time', and you'd change the math to figure out the days left.

Re: Display account variables in theme

PostPosted: May 3rd, 2011, 11:35 pm
by adriarichards
Thanks to theone and artEV, I was able to make this nifty looking notice to let a member know when their plan would expire!

http://screencast.com/t/zJyabJ3hX
Image




theone wrote:That's the ticket! Thanks so much for the assistance, greatly appreciated!

For anyone who stumbles upon this thread and wants to cut to the chase.......

Code: Select all
<?php
       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.';
    }
?>

Re: Display account variables in theme

PostPosted: May 3rd, 2011, 11:54 pm
by Cristián Lávaque
That's great, Adria! :)

Re: Display account variables in theme

PostPosted: December 4th, 2011, 3:30 am
by vigneshrajesh

Code: Select all
<?php
       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.';
    }
?>


I just pasted this code in my my account page HTML..

but not working for me..i already installed php execution plugin..

What i need to do work..There is no output coming for me..