Community Support Forums — WordPress® ( Users Helping Users ) — 2011-03-02T00:54:48-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2570 2011-03-02T00:54:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2570&p=7302#p7302 <![CDATA[Re: PHP Coding Tips to Enhance s2member]]> http://wordpress.org/extend/plugins/shortcode-exec-php/) to create a shortcode that i dumped onto a WP page et voila! i could easily pull up the info by opening that page on a tab in my browser.

Statistics: Posted by dwdutch — March 2nd, 2011, 12:54 am


]]>
2011-03-01T22:19:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2570&p=7295#p7295 <![CDATA[Re: PHP Coding Tips to Enhance s2member]]>
dwdutch wrote:
I've found the following tidbit useful to see the details and possible options for all of the custom registration fields that have been administered.


Where would you use this?

Statistics: Posted by Cristián Lávaque — March 1st, 2011, 10:19 pm


]]>
2011-03-01T22:17:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2570&p=7294#p7294 <![CDATA[Re: PHP Coding Tips to Enhance s2member]]>
Here's the auto EOT date code in a single line, in case you find it useful:
Code:
echo ($time = get_user_option('s2member_auto_eot_time', $uid) ? date('m-d-y', $time) : ''); 

Statistics: Posted by Cristián Lávaque — March 1st, 2011, 10:17 pm


]]>
2011-03-01T20:58:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2570&p=7291#p7291 <![CDATA[Re: PHP Coding Tips to Enhance s2member]]>
Code:
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field) {
   echo '<pre>';
   print_r($field);
   echo '</pre>';
}

Statistics: Posted by dwdutch — March 1st, 2011, 8:58 pm


]]>
2011-03-01T20:28:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2570&p=7290#p7290 <![CDATA[PHP Coding Tips to Enhance s2member]]>
As an administrator, I had a need to display the EOT for a member (i.e. not for/to a currently logged-in member). The s2member_auto_eot_time value is encoded so presenting it in a human-readable format became the challenge. I found the following code snippet quite useful:

Code:
   $auto_eot_time = get_user_option ("s2member_auto_eot_time", $uid);
   $auto_eot_time = ($auto_eot_time) ? date ("m-d-y", $auto_eot_time) : "";
   echo $auto_eot_time;


You can output different formats for the date by referencing http://php.net/manual/en/function.date.php

Statistics: Posted by dwdutch — March 1st, 2011, 8:28 pm


]]>