latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Home Forums Bruce

Bruce

Staff Member

My Latest Replies (From Various Topics)

Viewing 25 replies - 2,076 through 2,100 (of 2,703 total)
Author Replies
Author Replies
Posted: Sunday Jan 20th, 2013 at 4:40 pm #38482
Bruce
Username: Bruce
Staff Member

Thank-you for reporting this important issue.

The code within this forum post is meant to mimic the way that s2Member’s Content Dripping works. A content drip based on s2Member’s default start date (S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS) would look like this:

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 30){ ?>
	Drip content to Members that started paying you at least 30 days ago.
<?php } ?>
To use Content Dripping, or any PHP code within a WordPress Post/Page, you will need a plugin that allows you to execute PHP. Try PHP Execution.
For more information on Content Dripping with s2Member:

See: Knowledge Base » Introduction to Content Dripping in s2Member®
See Also: Dashboard -› s2Member® -› API / Scripting -› Content Dripping

To mimic s2Member’s Content Dripping, you first need to establish the start point for your new content dripping (Note: These are Unix timestamps. See: http://www.unixtimestamp.com/).

You can find info in this post regarding creating/updating s2Member’s Custom Profile/Registration Fields, if that is how you’d like to save your start time.

Example:
<?php
$start_date = get_user_field('STDATE'); //Note: This assumes that you've saved your Start Date in s2Member's Custom Registration/Profile Fields array, as STDATE. If you have not, you will need to change this.

$start = strtotime('today', $start_date);
&#91;/hilite&#93;

Now, to find the amount of time that has elapsed between the time that you have set up, and now, you will want to subtract the time now from the start time. Timestamps are based on seconds, so to find the number of days between, you'll need to divide the remaining time by &#91;hilite mono&#93;864900&#91;/hilite&#93; (&#91;hilite mono&#93;24 hours&#91;/hilite&#93; x &#91;hilite mono&#93;60 minutes&#91;/hilite&#93; x &#91;hilite mono&#93;60 seconds&#91;/hilite&#93;).

The previous post does this on the fly. For clarity, I've changed the way that this is handled below.

<h5>Example:</h5>

<?php $start_date = get_user_field('STDATE'); //Note: This assumes that you've saved your Start Date in s2Member's Custom Registration/Profile Fields array, as STDATE. If you have not, you will need to change this. $start = strtotime('today', $start_date); $now = time(); $time_to_check = ($now – $start)/86400; //Now, minus the start time, converted to days by dividing by 86400 &#91;/hilite&#93; The above uses the Custom Profile/Registration Field &#91;hilite code&#93;'STDATE'&#91;/hilite&#93; to assign the variable &#91;hilite code&#93;$time_to_check&#91;/hilite&#93; a value. This value can now be used in place of s2Member's &#91;hilite code&#93;S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS&#91;/hilite&#93; within the page that you have set this up with. <h5>Example of finished custom Content Drip:</h5>
<?php $start_date = get_user_field('STDATE'); //Note: This assumes that you've saved your Start Date in s2Member's Custom Registration/Profile Fields array, as STDATE. If you have not, you will need to change this. $start = strtotime('today', $start_date); $now = time(); $time_to_check = ($now – $start)/86400; //Now, minus the start time, converted to days by dividing by 86400 ?> <?php if($time_to_check >= 7){ ?> Drip content to Members that have spent at least 7 days on your site, after the custom field had been created. <?php } ?>

The above code snippet should work correctly for you. Let us know if problems persist.

Posted: Thursday Jan 17th, 2013 at 4:01 am #37867
Bruce
Username: Bruce
Staff Member

Thanks for the follow-up.

These error codes are coming directly from Authorize.net find the error code meanings here:

http://developer.authorize.net/tools/arberrorcodes/

I have contacted Jason for information regarding this. In the mean time, could you please fill out our s2Member® » Private Contact Form?

Thank-you for your patience.

Posted: Thursday Jan 17th, 2013 at 3:55 am #37865
Bruce
Username: Bruce
Staff Member

Thanks for the follow-up.

Thanks for you answer, I have formbuilders it’ just the security part I want to know about. So if I on a wp page build a form and put a S2member security level for it. Is it then safe if the clients login and fill in the form and send it so only the receiver can see the information?

The security of the email that is sent is not something that s2Member controls. s2Member can only control whether the user can access the form or not. Everything past that is controlled by your other plugin.

Does that make sense?

Posted: Thursday Jan 17th, 2013 at 3:18 am #37863
Bruce
Username: Bruce
Staff Member

Thanks for your great question.

s2Member can pass this information you need through Dashboard -› s2Member® -› API / Notifications -› Specific Post/Page Sale Notifications. Here you can set up specific URLs to be accessed every time a Specific Post/Page transaction occurs.

Will that work for you?

Posted: Thursday Jan 17th, 2013 at 3:16 am #37862
Bruce
Username: Bruce
Staff Member

Thanks for your great question.

You may want to check out the wp_logout() function. What you can do is update your Login Welcome Page to reflect that you may not currently log in, and use the above function with the conditionals available in Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals to decide when to log a user out.

Note that to log a user out after the page a loaded, you should use the wp_footer hook.

Posted: Thursday Jan 17th, 2013 at 3:06 am #37860
Bruce
Username: Bruce
Staff Member

Thanks for reporting this important issue.

I’m sending this issue to Jason to get his input.

Posted: Thursday Jan 17th, 2013 at 2:56 am #37859
Bruce
Username: Bruce
Staff Member

Thanks for your inquiry.

iDevAffiliate does not currently integrate directly with WordPress, and this is not something that s2Member controls. There could possibly be a way to link the two, but we are currently unaware of any way that this could be possible, as this is outside of the scope of s2Member’s integration with iDevAffiliate.

s2Member does have a number of remote ops that you may want to look into if you do decide to pursue the possibility of this integration.

See: Dashboard -› s2Member® -› API / Scripting -› Remote Operations API
See Also: Knowledge Base » Remote User Status (Custom API)

Posted: Thursday Jan 17th, 2013 at 2:52 am #37858
Bruce
Username: Bruce
Staff Member

Thanks for your great question.

I was wondering if there is any information regarding the number of users s2member can handle efficiently. Say, if your we’re to have a peak usage on 1 day of 10.000 people subscribing, can s2member handle it? Any data on this?

In theory, s2Member should be able to handle any amount of user signups that you can throw at it. There is no limit on how many signups that you can have in a a particular time span. However, you may notice a slow down as more users sign up, as there will be more database entries created. This is something that’s inherent in any WordPress setup, if you have too many users/posts. If this becomes the case, you should contact your hosting provider, and upgrade your database, or increase the memory that it is permitted to use.

Posted: Thursday Jan 17th, 2013 at 2:49 am #37856
Bruce
Username: Bruce
Staff Member

Thanks for your great question.

s2Member’s is_post_protected_by_s2member() returns an associative array with the info that you’re looking for.

For example, if the page is protected at s2Member Level 1, the function will return:

array(
	's2member_level_req' => 1
)

Find more info on this here: Codex -> API Function -> Package Functions -> is_post_protected_by_s2member

Posted: Thursday Jan 17th, 2013 at 2:38 am #37855
Bruce
Username: Bruce
Staff Member

Thanks for your inquiry.

Before that I would like to know if its possible to make a form secure for only the admin to see where customers need to put sensitive information. Maybe I’m thinking wrong but I thought if I make a page with a form who is in the secure file folder it would be protected even if it’s send by mail to me?

This is definitely possible, but is not a feature of s2Member. You may want to try something like Contact Form 7 to set this up. You can set up protections on a page like this just like any other WordPress page.

See: Knowledge Base » A Basic Guide to Protecting Content With s2Member®

Posted: Thursday Jan 17th, 2013 at 2:34 am #37854
Bruce
Username: Bruce
Staff Member

Thanks for your great questions.

Am I correct in setting up the subscription purchase using PAYPAL BUTTONS rather than PAYPAL PRO FORMS since I do not have a PayPal pro account?

You can use s2Member’s Pro Forms with or without PayPal Pro. However, make sure that if you do use Pro Forms, that you switch the attribute values of accept, and accept_via_paypal. You will also want to contact PayPal and have them enable PayPal Enhanced Recurring Payments (ERP), which is totally free to upgrade to.

Having a PayPal Pro account would allow you to set up accepting credit cards directly from your site. However, with a regular PayPal account, you can still choose to accept credit cards from the PayPal checkout page with ERP.

My developer set the form up through PAYPAL PRO FORMS (I think) but didn’t realise I only have a free PayPal business account. Now when I use my button, there don’t seem to be as many fields in the form.

If you set up the above, you should not have this issue. However, if you find that you do, you may want to check your settings under Dashboard -› s2Member® -› General Options -› Registration/Profile Fields. Here you can create new profile/registration fields for both s2Member’s Pro Forms, and the registration form at /wp-login.php?action=register.

Posted: Thursday Jan 17th, 2013 at 2:28 am #37853
Bruce
Username: Bruce
Staff Member

Thanks for your great question.

I would suggest using Dashboard -› s2Member® -› Restriction Options -› Tag Access Restrictions, rather than protecting through your theme’s template files. These require no external coding and will work just as well.

However, if you would like to do this through your theme’s template file, this is very possible.

In your theme’s template file, you can use the conditionals provided under Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals to decide if a user is allowed access. You can then redirect to the Membership Options Page with c_ws_plugin__s2member_mo_page::wp_redirect_w_mop_vars().

Posted: Thursday Jan 17th, 2013 at 2:15 am #37852
Bruce
Username: Bruce
Staff Member

Thanks for reporting this important issue.

I’ve just tested this feature in a test installation of WordPress and can confirm that this is working correctly under normal circumstances.

Could you please paste the shortcode that you are using?

Also, can you please try reverting back to the default WordPress theme, and deactivating all plugins but s2Member to see if that causes the issue to go away?

Posted: Thursday Jan 17th, 2013 at 2:10 am #37851
Bruce
Username: Bruce
Staff Member

Thanks for your reply.

I have another idea of doing a 24hr restriction period versus a 30 day on the IP restriction. Where would one change that in the code?

s2Member has a filter available for editing the amount of time that the IP restrictions last for, available within Dashboard -› s2Member® -› Restriction Options -› Unique IP Access Restrictions.

See: Knowledge Base » Hacking s2Member® Via Hooks/Filters

Also, do you know of a way that we can list users based on their login activity? We are using S2stats to track login activity, but I’m wondering if there is a way to list them in the user dashboard based on who logins the most?

If we can see who is logging in the most, we can set our daily IP restriction based on those numbers?

s2Member logs this information in your database in your options table. If you’d like to find info on where s2Member stores this information, you can find these processes within /s2member/includes/classes/ip-restrictions.inc.php.

As far as the s2Stats plugin goes, I am unaware of feature that would allow you to do this. I’d recommend asking the developers behind this plugin.

Posted: Thursday Jan 17th, 2013 at 2:04 am #37850
Bruce
Username: Bruce
Staff Member

Thank-you for your great question.

s2Member is fully capable of handling this functionality with Custom Capabilities. If you already have the s2Member Framework installed, you should be able to find additional info at Dashboard -› s2Member® -› API / Scripting -› Custom Capabilities.

The way you use these Custom Capabilities depends on the way you’d like to package your videos, and how your videos are being displayed. You can sell as little or as many Custom Capabilities as you’d like with s2Member’s Pro Forms.

Understanding Custom Capabilities
Using These Capabilities
Posted: Thursday Jan 17th, 2013 at 1:30 am #37849
Bruce
Username: Bruce
Staff Member

Thanks for your inquiry.

s2Member makes it possible to accomplish this in two ways.

s2Member’s processes have integrated functionality that can make this possible with the info from Pre Sale FAQs » Is it possible to modify s2Member® Pro Form templates?.

Within the template file for PayPal checkout forms (/s2member-pro/includes/templates/forms/paypal-checkout-form.php), s2Member uses the code %%coupon_value%% to fill in a variable that is used in the processes under Dashboard -› s2Member® -› Pro Coupon Codes -› Affiliate Coupon Codes.

To access this property in processes outside of the affiliate coupon codes, you can use this value to create a custom variable like the ones that are created within Dashboard -› s2Member® -› General Options -› Registration/Profile Fields. A field like this might look something like this within your new template:

<input type="hidden" maxlength="100" autocomplete="off" value="%%coupon_value%%" name="s2member_pro_paypal_checkout&#091;custom_fields&#093;&#091;coupon&#093;" id="s2member-pro-paypal-checkout-custom-reg-field-coupon" tabindex="100" class="s2member-pro-paypal-custom-reg-field-coupon s2member-pro-paypal-checkout-custom-reg-field-coupon" aria-required="false">

With the above, you’d then be able to access the replacement code %%coupon%% within your WordPress Dashboard anywhere that s2Member supports custom field replacement codes (like Dashboard -› s2Member® -› General Options -› Email Configuration).

s2Member can pass the coupon’s value via Dashboard -› s2Member® -› Pro Coupon Codes -› Affiliate Coupon Codes.

You can use the info provided through these processes and the processes under Dashboard -› s2Member® -› API / Notifications to set up an external process for sending this info.

See: Knowledge Base » Building An API Notification Handler

Posted: Thursday Jan 17th, 2013 at 12:48 am #37847
Bruce
Username: Bruce
Staff Member

Thanks for your question.

The article (or post) just sent by Jason (01/15/2013) on the various kinds of PayPal products does not mention PayPal Payments Advanced, so are we to assume that it will not be integrated into S2Member any time soon?

We currently do not have any timeframe for when s2Member may integrate with PayPal Payments Advanced. We do have this in mind for future versions of s2Member, and may integrate at some point in the future, but for now s2Member only supports the PayPal features listed in Jason’s Post*.

See: Pre Sale FAQs » Can I add support for other payment gateways?

*Jason’s Post: Knowledge Base » PayPal® Pro (PayFlow Edition)

Posted: Wednesday Jan 16th, 2013 at 11:46 pm #37846
Bruce
Username: Bruce
Staff Member

Thanks for your reply.

If I remember correctly I could use the exec-php and raw plugin to correct that right?

This should work just fine as well.

Posted: Wednesday Jan 16th, 2013 at 10:44 pm #37840
Bruce
Username: Bruce
Staff Member

Thanks for your great question.

on my site I have installed and integrated S3 and CloudFront for streaming videos. I’m thinking of removing the cloudfront integration and leave the videos just on S3 so people inside the member’s area can watch it.

How should I go about it?

s2Member supports the use of Amazon S3 with and without Cloudfront. If you’d like to stop using Cloudfront integration, you will just need to delete the configuration under Dashboard -› s2Member® -› Download Options -› Amazon® S3/CloudFront CDN Storage, while leaving your other settings in Download Restrictions the unchanged.

Second question, is it possible to change the IP restriction for specific users? I’d like to leave, for example, 5 IPs per month for ALL users but I want to give unlimited access to some specific users.

Though s2Member does not currently support this feature, s2Member does provides various filters within it’s processes to set something like this up. Find info on hooks/filters for this in /s2member/includes/classes/ip-restrictions.inc.php.

If you’d like a quick fix to this, you can use the WordPress function get_currentuserinfo() and the following line of code to completely disable IP restrictions for certain users.

add_filter('ws_plugin__s2member_disable_all_ip_restrictions', '__return_true');

See: Knowledge Base » Hacking s2Member® Via Hooks/Filters

Third and final question, do you guys know if that video plugin for s2 has been updated for JW6!?

I’m assuming you’re talking about the plugin that Philly created here:

http://phillymax.com/web/s2member-video-shortcode/

Based on the changelog it would appear that the plugin is not yet updated. I recommend contacting the developer to ask if this is on the way. In the meanwhile, you can use the code samples provided under Dashboard -› s2Member® -› Download Options -› JW Player® & RTMP Protocol Examples.

Posted: Tuesday Jan 15th, 2013 at 6:07 pm #37679
Bruce
Username: Bruce
Staff Member

Thanks for your great question.

I’m afraid I have not seen any details on how other users are dealing with this, other than just either disabling IP restrictions. Normally mobile devices would not cause this much trouble, so this problem is not normally a big problem.

Although s2Member’s processes currently cannot support this kind of restriction, but you could try using the code sample I posted in my last response to work around your current problem.

add_filter('ws_plugin__s2member_disable_all_ip_restrictions', '__return_true');

I have heard about the application Tera-WURFL, which may be useful for detecting mobile devices. It has somePHP files you can download with information that you can use to decide when to disable IP restriction with the above.

Alternatively, you may want to check out this article on Lightweight Device Detection.

Posted: Tuesday Jan 15th, 2013 at 4:32 pm #37656
Bruce
Username: Bruce
Staff Member

Thanks for reporting this important issue.

It sounds like you have the Phone Number Authorize.net form field set up to be required. Please do the following:

1. Login to the Authorize.net Merchant Interface ( https://secure.authorize.net ),

2. Click on Settings and Profile -> Payment Form -> Form Fields,

3. Uncheck the Required box for all Phone and Email fields.

Please let us know if problems persist after following these steps.

Posted: Tuesday Jan 15th, 2013 at 3:53 pm #37641
Bruce
Username: Bruce
Staff Member

Thanks for your great question.

Yes, you can set this up using s2Member’s Remote Ops under Dashboard -› s2Member® -› API / Scripting -› Remote Operations API.

Posted: Tuesday Jan 15th, 2013 at 2:40 pm #37625
Bruce
Username: Bruce
Staff Member

Thanks for the follow-up.

I checked your page’s source code, and the PayPal buttons are being generated by the Shortcode. However, it looks like you have an extra double quote (") in your Shortcode. Could you please post the shortcodes that you’re using on this page?

Posted: Monday Jan 14th, 2013 at 9:17 pm #37556
Bruce
Username: Bruce
Staff Member

Thanks for the follow-up.

After reading your post, I did through s2hack.php in mu-plugin. I used the following:

if (strpos($_SERVER['REQUEST_URI'], 'redirect_to=') !== false && current_user_can('access_s2member_level1') === false) {
		wp_redirect('http://shaadiconnections.com/hotornot-payment/');
		exit;

This also works, but it is outside of s2Member’s normal processes, and therefore is more of a standard redirect than s2Member’s processes. s2Member’s processes add Membership Options Variables (MOP vars) to the URL when it redirects for use on the Membership Options Page. If you’re looking to set this up later, you may find that this causes problems, and you may want to try the method I outlined above.

As long as you’re not using the MOP vars, this method should work just fine for you.

Posted: Monday Jan 14th, 2013 at 9:09 pm #37555
Bruce
Username: Bruce
Staff Member

Thanks for the follow-up.

Can you confirm that we can set up any number of member levels with no fees attached (with S2Member Pro) and use them for our manually-added members?

s2Member® Pro supports an unlimited number of membership levels. Find info on this here: Pre Sale FAQs » How can I extend s2Member® beyond four Levels?.

When you create a new user, this user can be assigned any role that has been created in the past. If you use the info above to create more user levels, there will be more to choose from within the Dashboard.

And when we upload our 2000+ members via CSV, will be be able to assign them to one of the free member levels then (or can we mass-select them after upload and change their membership level at that point)?

s2Member’s user Import/Export structure allows you to specify membership level, the user’s Custom Capabilties, Registration Date, the values of their Custom Profile/Registration Fields, and many other settings. So not only can you specify their levels this way, but s2Member also supports group upgrade / downgrade directly from the User’s list in the Dashboard.

Viewing 25 replies - 2,076 through 2,100 (of 2,703 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.