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.

Jason (Lead Developer)

Staff Member

My Latest Replies (From Various Topics)

Viewing 25 replies - 1,651 through 1,675 (of 1,909 total)
Author Replies
Author Replies
Posted: Thursday Mar 1st, 2012 at 7:48 am #6879
Staff Member

Hi Grace. Thanks for the follow-up.

I’m not sure if it will help you, but s2Member does make a Filter available that allows site owners to define a custom Role of their choosing, which is used to force a different Role upon any demotion by s2Member’s EOT System.

Hack Instructions:

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_filter("ws_plugin__s2member_force_demotion_role", "my_demotion_role");
function my_demotion_role($default = "subscriber")
	{ return /* I say it is... */ "banned"; }
?>
Posted: Thursday Mar 1st, 2012 at 4:37 am #6871
Staff Member

Hi Lee. No worries, s2Member picks right back up where it left off. Anything that was missed, will be caught by s2Member once you have the CRON job working properly.

UPDATE, very sorry:
Actually, with ccBill, it’s a bit different. There is a 48 hour limitation. Any EOTs that occurred more than 48 hours ago would be missed, due to the way ccBill’s DataLink service works.

Posted: Thursday Mar 1st, 2012 at 4:34 am #6870
Staff Member

@luisrosario

Tried your example for file_download_key => true and getting a stream not found. I have a working example of the standard config of jw and html fallback, this new example having trouble with

Oh, very sorry. You’ll need to use this updated code sample. It should be "file_download_key" => true, with the quotes. Totally my mistake, very sorry. I’ve updated the code sample that I posted previously.

Here it is again, in it’s entirety. Don’t forget that you need a video.mp4 test file, for the sample to work. You will find further details on these configuration options in the s2Member Codex, here.

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>

<?php if(is_user_logged_in() && current_user_can("access_s2member_level1"))
	{
		/* A direct URL to the RTMP source; issuing a File Download Key to the current visitor in real-time. */
		$cfg = array ("file_download" => "video.mp4", "file_download_key" => true, "url_to_storage_source" => true);
		
		/* API Function `s2member_file_download_url()`.
			See docs here: http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_s2member_file_download_url() */
		$mp4 = s2member_file_download_url ($cfg, "get-streamer-array");
		?>

		<script type="text/javascript">
			jwplayer("jw-container").setup({modes: /* JW Player®. */
			[
				/* Only allow real-time streaming with Flash® player. */
				{type: "flash", provider: "rtmp", src: "/jwplayer/player.swf",
				config: {streamer: "<?php echo $mp4&#91;"streamer"&#93;; ?>", file: "<?php echo $mp4&#91;"file"&#93;; ?>"}}
			],
			/* Set video dimensions. */ width: 480, height: 270
			});
		</script>

<?php } else /* Access is denied by site owner. */ { ?>
	Sorry, you do NOT have access to this file.
<?php } ?>

@Jason … Also, I had a question. Is there a way to force a s3 download link not cloudfront into the html fallback? So basically if a mobile device is loading html fallback, instead of the video coming form cloudfront, it’s delivered from s3 storage utilizing the default 30 second expiration to prevent link sharing. Is that possible? Creating a hybrid of s3 and cloudfront dynamically generating the urls for each case in the jwplayer…

Yes, you will need s2Member v120301 or higher, and you’ll need to specify the “file_storage” parameter in your configuration, as seen in the code sample below. This only works properly in s2Member v120301 or higher, because a minor bug related to the “file_storage” parameter was only just corrected in the latest release.

You will find further details on the “file_storage” parameter in the s2Member Codex, here.

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>

<?php
/* A direct URL to the CloudFront RTMP source; counting the file against the current User in real-time. */
$mp4_via_cf_cfg = array ("file_storage" => "cf", "file_download" => "video.mp4", "url_to_storage_source" => true, "count_against_user" => true);

/* A direct URL to the Amazon S3 source; NOT counting this variation against the current User. */
$mp4_via_s3_cfg = array ("file_storage" => "s3", "file_download" => "video.mp4", "url_to_storage_source" => true);

/* API Function `s2member_file_download_url()` returns false if access is denied to the current User. */
if (($mp4_via_cf = s2member_file_download_url ($mp4_via_cf_cfg, "get-streamer-array")) && ($mp4_via_s3["url"] = s2member_file_download_url ($mp4_via_s3_cfg))) {
?>

	<script type="text/javascript">
		jwplayer("jw-container").setup({modes: /* JW Player®. */
		[
			/* First try real-time streaming with Flash® player. */
			{type: "flash", provider: "rtmp", src: "/jwplayer/player.swf",
				config: {streamer: "<?php echo $mp4_via_cf&#91;"streamer"&#93;; ?>", file: "<?php echo $mp4_via_cf&#91;"file"&#93;; ?>"}},
				
			/* Else, try an HTML5 video tag with the `mp4` file. */
			{type: "html5", provider: "video",
			config: {file: "<?php echo $mp4_via_s3&#91;"url"&#93;; ?>"}},
			
			/* Else, this is a safe fallback. */
			{type: "download", /* Download the file. */
				config: {file: "<?php echo $mp4_via_s3&#91;"url"&#93;; ?>"}}
		],
		/* Set video dimensions. */ width: 480, height: 270
		});
	</script>

<?php } else /* Access is denied to the current User. */ { ?>
	Sorry, you do NOT have access to this file.
<?php } ?>

Here is the same thing, only this example uses File Download Keys instead of Basic Download Restrictions.

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>

<?php
if(is_user_logged_in() && current_user_can("access_s2member_level1"))
{
	/* A direct URL to the CloudFront RTMP source. */
	$mp4_via_cf_cfg = array ("file_storage" => "cf", "file_download" => "video.mp4", "file_download_key" => true, "url_to_storage_source" => true);
	
	/* A direct URL to the Amazon S3 source. */
	$mp4_via_s3_cfg = array ("file_storage" => "s3", "file_download" => "video.mp4", "file_download_key" => true, "url_to_storage_source" => true);
	
	/* Here we use API Function `s2member_file_download_url()` to generate the URLs we need below. */
	$mp4_via_cf = s2member_file_download_url ($mp4_via_cf_cfg, "get-streamer-array");
	$mp4_via_s3["url"] = s2member_file_download_url ($mp4_via_s3_cfg);
?>

	<script type="text/javascript">
		jwplayer("jw-container").setup({modes: /* JW Player®. */
		[
			/* First try real-time streaming with Flash® player. */
			{type: "flash", provider: "rtmp", src: "/jwplayer/player.swf",
				config: {streamer: "<?php echo $mp4_via_cf&#91;"streamer"&#93;; ?>", file: "<?php echo $mp4_via_cf&#91;"file"&#93;; ?>"}},
				
			/* Else, try an HTML5 video tag with the `mp4` file. */
			{type: "html5", provider: "video",
			config: {file: "<?php echo $mp4_via_s3&#91;"url"&#93;; ?>"}},
			
			/* Else, this is a safe fallback. */
			{type: "download", /* Download the file. */
				config: {file: "<?php echo $mp4_via_s3&#91;"url"&#93;; ?>"}}
		],
		/* Set video dimensions. */ width: 480, height: 270
		});
	</script>

<?php } else /* Access is denied to the current User. */ { ?>
	Sorry, you do NOT have access to this file.
<?php } ?>
Posted: Thursday Mar 1st, 2012 at 12:17 am #6863
Staff Member

You’re very welcome. Yes, please keep us updated. Thank you for the kudos!

Posted: Wednesday Feb 29th, 2012 at 11:55 pm #6861
Staff Member

Thanks for the follow-up.
I’m just posting a reference to another thread here where we addressed some of this for you.
http://www.s2member.com/forums/topic/feature-request-css-for-pro-login-form/#post-6857

Posted: Wednesday Feb 29th, 2012 at 11:51 pm #6858
Staff Member

Thanks for the follow-up.

Sorry, I’m not aware of any plugin which does this specifically. However, one way to accomplish this would be through your BuddyPress theme itself, along with functionality provided by s2Member. For instance, you might create a new Custom Registration/Profile field with s2Member, which allows a Member to choose whether they want their profile visible or not, then read that configuration value in your BuddyPress theme.

This might go somewhere in your BuddyPress theme.

<?php
global $bp;
if(get_user_field("show_public_profile", $bp->displayed_user->id)){
	// Allow display of this User's Profile.
} else {
	// Profile should NOT be visible, it's private.
}
?>

See also: s2Member API Function get_user_field()

Posted: Wednesday Feb 29th, 2012 at 11:42 pm #6857
Staff Member

Thanks for the heads up on this thread.

* A list of every class used in the pro login form for all controls; e.g., labels, text boxes, and submit button.

Great idea. I’ll see what we can do about that. In the mean time, you can find most of the classes/IDs used in s2Member Pro Forms, by inspecting your site in Firebug, or by opening the Pro Form template files for your installation, which are located inside: /s2member-pro/includes/templates/forms/

* Ability to specify an alternate image source for the submit button.

For PayPal Standard Button Shortcodes, there is an image="" Attribute for the Shortcode documented here (Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes (Explained)), which allows a site owner to override the default PayPal Button image. For Pro Forms, we are required to use the official PayPal Express Checkout button image, per the PayPal terms of service. The standard “submit” button for Pro Forms can be styled via CSS, if the default button styles for your theme are not adequate.

For example:

input.s2member-pro-paypal-submit
	{
		background: #FFFFFF;
	}

* Ability to control the parameters of the DIV containing the form to set inheritable characteristics and overall look.

I believe this is already possible. For instance, with PayPal Pro Forms, this class is attached to each Pro Form, regardless of it’s specific functionality: div.s2member-pro-paypal-form

For example:

/* Re-style all text input fields for Pro Forms. */
div.s2member-pro-paypal-form input[type="text"]
	{
		background: #EEEEEE;
	}
Posted: Wednesday Feb 29th, 2012 at 11:31 pm #6855
Staff Member

Thanks for the heads up on this thread.

I’m not aware of any issues running s2Member from a sub-directory, that’s quite common. However, I did notice in your original post from the old forum system, that you have some links with the www in them, and some without that. It it possible that your download links are not recognizing Members as being logged into the right domain variation?

Please see this topic and let me know if this could be the issue?
http://www.s2member.com/forums/topic/dont-mix-www-and-without/

Posted: Wednesday Feb 29th, 2012 at 10:58 pm #6850
Staff Member

Thanks for the heads up on this thread.
I’m very sorry for any confusion.

I fixed it only be re-adding the capabilities using User Role Editor. This took a little trial-and-error as I had to add back capabilities for different levels from memory. I’m a little afraid to upgrade now to the latest version, as I don’t want this to keep happening. Is whatever you changed with capabilities going to occur on every upgrade?

Yes, by default, s2Member will update it’s core Roles/Capabilities during an upgrade. However, if you’ve made custom modifications to these s2Member Roles/Capabilities, you can lock them in to prevent modification during future upgrades. You’ll find this documented in your Dashboard here:
Dashboard -› s2Member® -› General Options -› Membership Levels/Labels
(look toward the bottom of this section in your Dashboard)

See also, this thread please:
http://www.primothemes.com/forums/viewtopic.php?f=36&t=15420&p=45162#p45162

Instructions:

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_filter("ws_plugin__s2member_lock_roles_caps", "__return_true");
?>
Posted: Wednesday Feb 29th, 2012 at 9:51 pm #6840
Staff Member

Hi there. Thanks for your inquiry.

The line that you posted looks like it’s attempting to run a shell script,
but the path you’ve provided is actually a URL.

/bin/sh: http://www.xxxxxxxxxxx.com/?s2member_auto_eot_system_via_cron=1: No such file or directory

You will want to use something like cURL to run this CRON job and open the URL.

/usr/bin/curl http://www.xxxxxxxxxxx.com/?s2member_auto_eot_system_via_cron=1
Posted: Wednesday Feb 29th, 2012 at 9:35 pm #6834
Staff Member

The screenshots which appear on our website, were taken from various themes available at WordPress.org. We didn’t go by any specific list, we made selections at random. These themes are all available to the public at no charge. You will find several to choose from here: http://wordpress.org/extend/themes/

Some themes don’t have great CSS for forms. Currently I am looking at spending an hour or two in the theme CSS customizing the look and feel of the s2member forms. It would make me a happy man if I could somewhere download some CSS that would enhance the look of the forms without relying on the WP theme CSS.

So sorry. Actually though, this is intentional. s2Member Pro comes with basic structural CSS to get your Pro Forms to function properly. However, we leave colors and other visual effects to your theme. If your theme does not come with enough style specifications to cover forms, you would need to add styles of your own through style.css, or through a Custom CSS configuration section of your theme perhaps.

It’s also possible to use Hooks/Filters with s2Member, to either remove the default CSS, or to add custom CSS of your own. If you would like to learn more about that, I recommend this FAQ section.
Pre Sale FAQs » How can I prevent s2Member® Pro from loading it’s default CSS?

As always, we appreciate the feedback on this topic. I’ll see what we can do to improve on this.

Posted: Wednesday Feb 29th, 2012 at 12:23 am #6719
Staff Member

Thank you. Log files received.

I just took a quick look at your log files, and I’m finding many occurrences of this error.

0 => 'IPN received on: Thu Feb 23, 2012 7:10:12 am UTC',
1 => 's2Member POST vars verified with a Proxy Key',
2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
3 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ).',
4 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ) w/ update vars.',
5 => 'Unable to modify Subscription. The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access.',

This would be expected during testing with an administrative account.
Have you tried testing this after logging out of your site, as a would-be customer?

Posted: Wednesday Feb 29th, 2012 at 12:16 am #6718
Staff Member

Thanks for reporting this important issue.

submit button just hangs, so they try again.

I’m not aware of any issue within the s2Member plugin itself that would cause this. However, I have seen this happen on some client installations where there are many other plugins running together. Often times, this problem can be attributed to one or more of the following.

1. Your hosting account is getting overloaded (i.e. you might need a bigger server).
2. Or, perhaps your WordPress memory limit is just configured too low. Please see:
http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
3. Or, another plugin is conflicting with s2Member, or contains code which is slowing down your site.

Many of these issues can be detected through your Apache and/or PHP error logs. I would suggest a lengthy review of your site, where each of these points (at a minimum) is fully investigated by someone very familiar with WordPress. Hanging processes are often a symptom of a larger issue.

Posted: Wednesday Feb 29th, 2012 at 12:07 am #6717
Staff Member

Hi Grace. Thanks for your inquiry.

Sorry, what do you mean by a “Banned Level” please?

Posted: Wednesday Feb 29th, 2012 at 12:06 am #6716
Staff Member

Excellent. Thank you Michael.

Posted: Tuesday Feb 28th, 2012 at 9:34 pm #6706
Staff Member

Hi Allen. Thanks for reporting this important issue.

Yes, that’s very interesting. We’ll take a closer look to see why this might have happened on your installation. I just ran a quick test and was unable to reproduce this, but we’ll dig deeper.

In the mean time, if it’s just the crossdomain.xml causing an issue,
you can upload that file yourself, it should contain the following please.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-access-from domain="*" />
</cross-domain-policy>

To answer your question.
Yes, if problems persist, I’d try running s2Member’s auto configuration routines all over again.

Posted: Tuesday Feb 28th, 2012 at 9:26 pm #6704
Staff Member

Hi Michael. Thanks for your inquiry.

s2Member Pro Forms make it possible for your customers to cancel future billing, if you make a Pro Cancellation Form available to them, perhaps on your Login Welcome Page, or just a link to a Post/Page where you’ve added the Shortcode for the Pro Cancellation Form.

(click screenshots to enlarge please)

Posted: Tuesday Feb 28th, 2012 at 9:15 pm #6697
Staff Member

Thanks for the follow-up Rob.

Let me start by saying… this has been reported before. The solution that we recommend, is to change your BuddyPress settings in the Dashboard, and do NOT allow Members to delete their own account. Instead, use an s2Member Pro Cancellation Form, so that Members can “cancel” their own account, not delete it. If you want accounts deleted automatically (i.e. after a Member cancels, and at the correct time), you can change your EOT Behavior for s2Member here: Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior

That being said, if you’d like to integrate a more advanced solution, you could automatically cancel a Customer’s billing profile dynamically, via PHP — using s2Member’s integration with the PayPal Pro API. Here is an example.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_action("delete_user", "cancel_future_billing");
function cancel_future_billing($user_id)
	{
		$paypal = (array)array
			(
				"ACTION" => "Cancel",
				"METHOD" => "ManageRecurringPaymentsProfileStatus",
				"PROFILEID" => get_user_option("s2member_subscr_id", $user_id)
			);
		c_ws_plugin__s2member_paypal_utilities::paypal_api_response($paypal);
	}
?>
Posted: Tuesday Feb 28th, 2012 at 9:03 pm #6696
Staff Member

You’re very welcome :-) Thanks for the follow-up.

Posted: Tuesday Feb 28th, 2012 at 9:01 pm #6695
Staff Member

OK. Thanks VERY much for reporting back.
~ So it sounds like the solution here is to use the bundled copy
of PCRE that comes with PHP v5.3.8, which is PCRE version 8.12.

Posted: Tuesday Feb 28th, 2012 at 2:15 am #6647
Staff Member

Hi there. Thanks for your inquiry.

I’m very sorry, but we cannot assist with custom coding.
Please read our Support Policy for further details in this regard. Again, I’m very sorry.
s2Member® » Support Policy » Fine Lines

Posted: Tuesday Feb 28th, 2012 at 2:12 am #6646
Staff Member

Hi Martin. Thanks for keeping us updated.

Each time s2Member is upgraded, it will make an attempt to update it’s snippet inside your .htaccess file. In order for s2Member to accomplish this automatically for you, two things need to be possible.

1. Your .htaccess file needs to be writable by the server itself, so that s2Member can update this file for you automatically. In other words, set permissions to 666 or higher on the .htaccess file please.

2. The snippet inside your .htaccess file, needs to be wrapped inside these hash tags.

# BEGIN s2Member GZIP exclusions
# END s2Member GZIP exclusions
Posted: Tuesday Feb 28th, 2012 at 2:05 am #6645
Staff Member

Hi Randy, thanks for your inquiry.

Generally speaking, CSS should be applied at the theme level, either through the style.css file for your WordPress theme, or with a configurable option in your Dashboard, which is provided by some themes, usually referred to as “enter Custom CSS here”, or something similar.

You’ll want to have a look at your theme and see if it offers such an option. If so, I’d suggest using that. If not, look in your theme directory and find the style.css file instead :-)

This FAQ may also be of interest to you, in case you’d like to disable s2Member’s default CSS.
Pre Sale FAQs » How can I prevent s2Member® Pro from loading it’s default CSS?

Posted: Tuesday Feb 28th, 2012 at 2:01 am #6644
Staff Member

Hi Angie. Thanks for your inquiry.

The LOCALHOST configuration option should have no impact on s2Member conditionals. It sounds like you have define("LOCALHOST", true) in your /wp-config.php file now, so you’re good there.

Let’s take a look now at the conditionals that you’re using please.
~ Please post a code sample that is causing you trouble, and we’ll help by reviewing that with you.

Posted: Tuesday Feb 28th, 2012 at 1:57 am #6643
Staff Member

Hi there. Thanks for your inquiry.

I think the problem in your attempt was that you did not include the Custom Field IDs, only the values?

For instance, in this example taken from the s2Member Import/Export panel, there are two Custom Fields, one with the ID “interests”, and another with the ID “t_shirt_size”. The IDs should match those which you’ve configured under: Dashboard -› s2Member® -› General Options -› Registration/Profile Fields

"","johnsmith22","mY!passwrD","John","Smith","John Smith","john.smith@example.com","http://www.example.com/","2","music,videos","12/31/2000","01/10/2001","12/31/2020","12/31/2021","www.example.com|123.357.125.654","I-2342934SSER243","paypal","interests","fishing,biking,computers","t_shirt_size","xx-large"
Viewing 25 replies - 1,651 through 1,675 (of 1,909 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.