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,676 through 1,700 (of 1,909 total)
Author Replies
Author Replies
Posted: Tuesday Feb 28th, 2012 at 1:52 am #6642
Staff Member

Thanks for your inquiry.

Sorry, I think you might have the wrong forum here.
~ We don’t offer a classified ads plugin.

Can I make someone sign up as level 0 contributor?

I’m so sorry, we do NOT currently support Administrative Users within WordPress. s2Member is designed for end-users of a site, and not for Users/Members that actually gain access to your Dashboard in some way. This could certainly be accomplished, using s2Member as a framework on which to build such a site, but it’s not something that s2Member provides by default. You might need to seek assistance from a WordPress developer on this.

Posted: Tuesday Feb 28th, 2012 at 1:48 am #6641
Staff Member

Hi Sherri. Thanks for your inquiry.

unless I put links to the 3 pages in the body of the “welcome once you have logged in” page. They should see links in the left side bar that are accessible. I should also say that they also get access to one more page which is linked on the sidebar via an image.

Sorry, can you please elaborate just a bit further on how these links in the Sidebar are setup? Did you integrate some type of WordPress menu there? Or is it using conditionals in either PHP or with Shortcodes? Why should these links be shown exactly? And what do you think the source of the issue is?

Posted: Tuesday Feb 28th, 2012 at 1:45 am #6640
Staff Member

Thanks for your inquiry.
With BuddyPress, you can protect all Profiles using s2Member’s URI Restrictions.
For instance, you might protect all URIs with this word fragment.

/profile/

See also: Dashboard -› s2Member® -› Restriction Options -› URI Access Restrictions

* I hope this helps. Please let us know if you need further assistance in this regard.

Posted: Tuesday Feb 28th, 2012 at 1:40 am #6639
Staff Member

Thank you. I believe this issue was reported once before, and we discovered that it’s actually NOT related to the Markdown library or with s2Member, but rather it’s a known bug in the PCRE library that is sometimes compiled in with your installation of PHP.

The bug was also reported here, and I’d suggest reviewing this article.
http://drupal.org/node/1255780

If you can, please run <?php phpinfo(); ?> on your site, and determine the current version of PCRE that you’re running. Upon running <?php phpinfo(); ?>, you should find the version of PCRE that your installation of PHP is running with. See: http://php.net/manual/en/function.phpinfo.php

In short, you can try reverting to an older version of PHP, or compiling PHP against a patched version of the PCRE library, or perhaps upgrade to PHP v5.3.10 to see if that helps. I’ve tested this against PHP v5.3.8 and was unable to reproduce the issue against the bundled copy of PCRE v8.12. However, it’s possible that your installation of PHP was compiled against a different version of PCRE that already existed on the server (i.e. instead of the bundled copy that comes with PHP v5.3.8).

See also: http://www.php.net/manual/en/pcre.installation.php
See also: http://bugs.exim.org/show_bug.cgi?id=1136

Posted: Monday Feb 27th, 2012 at 10:55 pm #6633
Staff Member

Thanks for the heads up on this topic.
Please use this Hook: ws_plugin__s2member_during_login_redirect

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("ws_plugin__s2member_during_login_redirect", "my_login_redirect");
function my_login_redirect($vars = array())
	{
		$location = get_page_link($GLOBALS&#91;"WS_PLUGIN__"&#93;&#91;"s2member"&#93;&#91;"o"&#93;&#91;"login_welcome_page"&#93;);
		$location = add_query_args(urlencode_deep(array("foo" => "bar")), $location);
		wp_redirect($location).exit();
	}
?>
Posted: Monday Feb 27th, 2012 at 10:44 pm #6631
Staff Member

Thanks for the follow-up.

Yea, this is where logging can be of assistance. If you enabled logging as I mentioned earlier, then you can submit your log file for review, and we’ll be happy to have a look for you. Please use our Private Contact Form to submit any log entries: s2Member® » Private Contact Form

Posted: Monday Feb 27th, 2012 at 10:42 pm #6630
Staff Member

Yes, that’s just fine to do that. There’s nothing in the software to prevent this. However, we do review installations periodically, and we ask that you keep the Primary Domain updated in your account here at s2Member.com, so that your Primary Domain reflects your *live* installation of s2Member.

There’s nothing wrong with running multiple instances of s2Member on development sites though. This is normal, and we expect this to occur. Again, there’s nothing in the software to prevent this.

Posted: Monday Feb 27th, 2012 at 10:39 pm #6629
Staff Member

1. I could theoretically create a registration system where users would ONLY be able to register for the free account. Once registered, I would be able to change their account types via the admin panel, but they would NOT be able to change their account types or try to buy a different account type themselves. Correct?

Yes, that’s certainly possible. You can always change their Role via the Dashboard, bumping them to a higher Membership Level. If you don’t want anything done automatically, just don’t make any Payment Buttons or Payment Forms available on the site. For instance, Payment Buttons and/or s2Member Pro Forms allow Customers to upgrade/downgrade by supplying billing details. If you want to avoid that, you can do everything manually through the Dashboard instead. You could still use a Pro Form for Free Registration though.

2. Can s2 send out an automated email with all a user’s information upon registration? We have a membership committee, and it’s easier to forward an email than to copy-paste member information into an email before we send it out to the other committee members for review.

Yes, this is already built into s2Member. These emails can be further customized in your Dashboard here: Dashboard -› s2Member® -› General Options -› Email Configuration

3. Can one create “hidden” user fields that to track specific member data without members being able to change it?

Yes, in WordPress, this is called a User Option, or a User Meta field. You can set values via PHP using the existing functionality provided by WordPress. Please see: update_user_meta().

Note. In your Dashboard, s2Member also has an Administrative Notes field, which allows administrators of the site to make notations about a User/Member, without that information being made public in any way. This might be an easier alternative for you, depending on what you’re trying to accomplish exactly.

Posted: Monday Feb 27th, 2012 at 10:25 pm #6626
Staff Member

Hi Scott. Sorry if I misunderstood.

My complaint is that I don’t want him to be logged out when he gets promoted. Is THAT possible?

No, s2Member doesn’t log them out during an upgrade. If this is happening on your installation, you might check what Cristian mentioned. It could be a www vs. non-www issue, as discussed here in this KB article:
Knowledge Base » Don't mix www and without

Posted: Monday Feb 27th, 2012 at 10:22 pm #6625
Staff Member

Great to hear this was resolved. Thanks for following up!
~ Much appreciated :-)

Posted: Monday Feb 27th, 2012 at 10:20 pm #6624
Staff Member

Thanks for the follow-up.

It sounds like the s2Member Pro add-on was being installed as a plugin for WordPress, and since it’s not, you received an error. s2Member Pro should just be uploaded via FTP please. As Eduan mentioned, this article walks you through the installation process. s2Member® » Pro » Install/Upgrade Instructions

Posted: Monday Feb 27th, 2012 at 10:18 pm #6623
Staff Member

Closing this topic, thank you VERY much for the follow-up :-)

Posted: Monday Feb 27th, 2012 at 10:17 pm #6622
Staff Member

Hi Jordan. Thanks for the follow-up.
So sorry, nothing jumping out at me yet. Please feel free to post further updates.

Posted: Monday Feb 27th, 2012 at 10:12 pm #6621
Staff Member

Thanks for the feedback :-) Much appreciated. I’ll see what we can do.

Posted: Monday Feb 27th, 2012 at 10:10 pm #6620
Staff Member

Hi Bendix. Just checking back in here. Has this been resolved? Or still having trouble?

Posted: Monday Feb 27th, 2012 at 10:09 pm #6619
Staff Member

Hi Bendix. Yes, this article talks about the ideal server configuration for s2Member.
http://www.s2member.com/forums/topic/ideal-server-configuration-for-s2member/

I took a quick look at your PHP configuration, that looks good. If you continue to have trouble, please post a copy of your .htaccess file also, and/or any other Apache configuration options you’re running.

Posted: Monday Feb 27th, 2012 at 9:03 pm #6616
Staff Member

Closing this thread, in favor of the solution offered here:
http://www.s2member.com/forums/topic/cloudfront-and-rtmp-streaming-jw/#post-6601

Posted: Monday Feb 27th, 2012 at 9:01 pm #6615
Staff Member

Right. Or, you could also generate a PayPal Button with s2Member, and make that available along with your Pro Form. That’s just another option for now, until we’ve integrated Pro Forms for Authorize.Net, directly with Express Checkout. If you’re running Pro Forms with a PayPal Pro account, this is already possible, but with Authorize.Net as your primary integration, you will need to add PayPal Buttons separately, for now please.

Posted: Monday Feb 27th, 2012 at 8:07 pm #6608
Staff Member

Regarding TTLs. This is documented in your Dashboard for Amazon S3 under: Dashboard -› s2Member® -› Download Options -› Amazon® S3/CDN Storage, but I don’t think we’ve added this to the Dashboard documentation for CloudFront yet. Actually, it’s a very rare occasion where these need to be altered.

These Filters are mentioned in the s2Member Codex, but I’ll go ahead and provide some examples below.
http://www.s2member.com/codex/stable/s2member/files/package-filters/

If you’re running Amazon S3 only, without CloudFront.
Create this directory and file to increase or decrease the TTL.
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )
/wp-content/mu-plugins/s2-hacks.php

<?php
add_filter("ws_plugin__s2member_amazon_s3_file_expires_time", "my_s3_file_expires_time");
function my_s3_file_expires_time($default = "30 seconds")
/* Anything compatible with PHP's strtotime() function.
	30 seconds is the default, and that's more than enough time
	for someone to connect to the file in your Amazon S3 Bucket
	(i.e. you want this to be a very low value). */
{ return /* You might say... */ "2 hours"; }
?>

If you’re running Amazon S3 *with* CloudFront tied in also.
Create this directory and file to increase or decrease the TTL.
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )
/wp-content/mu-plugins/s2-hacks.php

<?php
add_filter("ws_plugin__s2member_amazon_cf_file_expires_time", "my_cf_file_expires_time");
function my_cf_file_expires_time($default = "24 hours")
/* Anything compatible with PHP's strtotime() function.
	24 hours is the default. Here we need to allow a little more time,
	in case streaming playback is seeked, or paused and then resumed. Again, it's very
	rare that you'd need to change this default value. I recommend 24 hours. */
{ return /* You might say... */ "2 days"; }
?>
  • This reply was modified 4 years, 10 months ago by  Jason (Lead Developer). Reason: Made code sample clearer
Posted: Monday Feb 27th, 2012 at 7:30 pm #6601
Staff Member

Thanks for the follow-ups.

Let me start here please…

@luisrosario

Hey there Jason, am I correct in recognizing if we look at page source, one can copy the download link distribution and download the file? So logged in user if they have access to a specific video, all they have to do is look at page source to download the file?? Can you confirm if this is the case? Thank you.

Right. Exposing the HTML5 video tag option, or direct download option; as fallbacks, makes the MP4 URL available. So you’d want to remove those additional fallbacks if you’re concerned about this (i.e. if you only want to allow true RTMP streaming). RTMP streaming is the most secure option, and should work fine for most visitors.

This is a usability vs. security issue. If you want to maximize usability, allow the fallback options. If you’re more concerned about security, you’ll need to require Users/Members to have Flash®, so they can view the RTMP stream; but NOT allow them to access the MP4 file directly (i.e. remove the direct MP4 fallbacks).

In addition to NOT making the MP4 URLs available, you might also want to disable any type of direct downloading of these files through other means (i.e. to prevent a logged in Member from typing a URL directly to the file download). By default, all files are available to Users/Members who pass your Basic Download Restrictions. Your S3 Bucket is a drop-in replacement for the normal /s2member-files/ directory, so the ability to download files through a direct link remains possible.

For example, even if you don’t make the MP4 URL available in your JW Player code, I could still type a URL like this one. If I’m logged into your site, and I pass your Basic Download Restrictions, I can download the MP4.

http://example.com/?s2member_file_download=video.mp4

Here is one way to prevent this from occurring.
Don’t set any Basic Download Restrictions for s2Member, causing your installation of s2Member to NOT allow any direct downloads at all. Instead, you’ll need to take further control over the way File Downloads are handled, through Advanced Download Restrictions, with File Download Keys (i.e. only you, as the site owner, will decide when/where File Downloads are going to be allowed). If you go this route, you’d need to issue a File Download Key when generating your RTMP streamer with s2Member.

For example… file_download_key => true
Reference docs on: s2member_file_download_url()

<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 } ?>
  • This reply was modified 4 years, 10 months ago by  Jason (Lead Developer). Reason: Made code sample clearer
  • This reply was modified 4 years, 10 months ago by  Jason (Lead Developer). Reason: Made code sample clearer
  • This reply was modified 4 years, 10 months ago by  Jason (Lead Developer). Reason: Updated to "file_download_key" => true
Posted: Monday Feb 27th, 2012 at 6:16 pm #6591
Staff Member

Thanks for the heads up on this thread.

The problem may be that they are then filling out the free
registration form but the reason why I directing them to this is because:
I need to use captcha to stop spam so cannot leave open registration on.
I have many fields that need filling out so the level one form is long and off putting.
Once the user has paid, to show them another form to fill out with a pay button at the bottom looks confusing.

Right, a Free Registration Form is designed to facilitate a Free Registration at Level #0 by default, or at a specific Membership Level, as dictated by the Shortcode Attribute level="0" (i.e. you could change the Membership Level for new Free registrants by changing the level="" Attribute in your Free Registration Form Shortcode). However, in a Free Registration Form, that’s hard coded in, and is NOT detected during registration, based on what has been purchased. s2Member assumes that you’ve implemented a Free Registration Form to allow *new* visitors to register for free access (i.e. there is no payment involved).

I need to use captcha to stop spam so cannot leave open registration on.
I have many fields that need filling out so the level one form is long and off putting.

All s2Member Pro Forms support the captcha="clean" Attribute.
Only the Free Registration Forms have this enabled by default, but you can enable it for other Pro Forms if you’d like, by setting the captcha="" Attribute to a value of captcha="clean".

Regarding the number of Custom Registration/Profile Fields that you’re running with…
If a User/Member is already logged in, s2Member Pro Forms automatically pre-fill things like Username/Email, and any Custom Registration Fields are excluded automatically, reducing the number of fields that someone needs to enter (i.e. an existing User/Member is assumed to already have this information on file, from a previous registration that granted them an account on your site).

What I would like to happen is
That after the user pays they have access to the pro form without the payment capabilities.
That they can then register on the free form but automatically get bumped up to level one if already paid.
Not to use paypal buttons but use pro forms and only have the essential information on show before they pay so they are not put off by the amount of form fields they have to fill in. (it happens like this for already registered users when they are shown the pro form for level one upgrade)

It sounds like you’re trying to use Standard PayPal Buttons, but with Pro Forms, which are designed to work with PayPal Pro. While this is not the intended approach, I suppose you could make this work like you want, but you’d need to do something creative with your Free Registration Form Shortcode.

As I mentioned earlier, a Free Registration Form is designed to facilitate a Free Registration at Level #0 by default, or at a specific Membership Level, as dictated by the Shortcode Attribute level="0" (i.e. you could change the Membership Level for new Free registrants by changing the level="" Attribute in your Free Registration Form Shortcode). However, in a Free Registration Form, that’s hard coded in, and is NOT detected during registration, based on what has been purchased. You could try setting the level="" Attribute in a more dynamic way though. This article might be of some interest to you. Please see: http://www.primothemes.com/forums/viewtopic.php?f=36&t=1604

Posted: Monday Feb 27th, 2012 at 5:53 pm #6587
Staff Member

Hi there. Thanks for the follow-ups.

Yes, I suppose that I am. But I’m skating the question because it’s my job to report what is possible in the current release clearly. While we are working to further improve s2Member overall (and yes, this is something we’re working on), it’s NOT possible in the current release. You would need to use BuddyPress, or bbPress perhaps.

A member directory is coming in a future release of s2Member though, so yes. In the mean time, if BuddyPress or bbPress is not an option for you, the core WordPress function get_users() could be used to build your own, blending it with your theme for WordPress. See: http://codex.wordpress.org/Function_Reference/get_users

Posted: Monday Feb 27th, 2012 at 5:10 pm #6573
Staff Member

Hi there. Thanks for the heads up on this topic.
@extremecarver … What version of PHP is your server running please?

Posted: Monday Feb 27th, 2012 at 5:06 pm #6570
Staff Member

Hi Rob & Cristian :-)
Thanks for the heads up on this thread.
Rob, are you running s2Member Pro Forms with a PayPal Pro account, or PayPal Standard Buttons?

Posted: Monday Feb 27th, 2012 at 5:01 pm #6564
Staff Member

Thanks for the heads up on this thread.

Our approach on this, in the release of s2Member v120219 was to update the .htaccess rule for compatibility with Apache v1.x as well. Removing this section of the .htaccess file seems to resolve the issue. Making s2Member compatible with both Apache 1.x and Apache 2.x.

Instead of: RewriteCond %{QUERY_STRING} (?:^|\?|&)s2member_file_download\=.+
Go with: RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+

See also: s2Member® Unified Changelog » v120219

Installing s2Member v120219 should resolve this for you automatically. If the problem remains, please update your .htaccess file manually. Please make sure you have this section in your .htaccess file.

# BEGIN s2Member GZIP exclusions
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+
	RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions
Viewing 25 replies - 1,676 through 1,700 (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.