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 Hamid

Hamid


My Latest Replies (From Various Topics)

Viewing 11 replies - 51 through 61 (of 61 total)
Author Replies
Author Replies
Posted: Wednesday Jul 11th, 2012 at 5:06 am #18894
Hamid
Username: zawiyaprojects

I love you Raam, you rock. It all works now. However I would like to point out a syntax error.

In your s2hack.php, you have the following

<?php
add_action('ws_plugin__s2member_after_configure_user_registration', 's2_redirect_after_registration');
function s2_redirect_after_registration($vars = array()) {
    if (!is_admin() && $vars['processed'] === 'yes') {
	
        $_POST['redirect_to'] = "http://example.com/thank-you/" . 
        			'?email=' . urlencode($vars['email']) . 
				'&fname=' . urlencode($vars['fname']) . 
				'&lname=' . urlencode($vars['lname']) .
				'&my_custom_field=' . urlencode($vars['fields']['my_custom_field']) .
				'&username=' . urlencode($vars['login']) );
    }
}
?>

the &username line has an extra ). It should read

<?php
add_action('ws_plugin__s2member_after_configure_user_registration', 's2_redirect_after_registration');
function s2_redirect_after_registration($vars = array()) {
    if (!is_admin() && $vars['processed'] === 'yes') {
	
        $_POST['redirect_to'] = "http://example.com/thank-you/" . 
        			'?email=' . urlencode($vars['email']) . 
				'&fname=' . urlencode($vars['fname']) . 
				'&lname=' . urlencode($vars['lname']) .
				'&my_custom_field=' . urlencode($vars['fields']['my_custom_field']) .
				'&username=' . urlencode($vars['login']) ;
    }
}
?>

Again thanks so much for your help, I’m sooooooo happy!!!

Now on to the next piece. I’m loving s2member, I just hope you guys dont get tired of me :)

Posted: Tuesday Jul 10th, 2012 at 1:33 pm #18823
Hamid
Username: zawiyaprojects

Thanks Philly,

But the file is in the root directory of my s3 bucket…. that’s why I cant figure this out.

Posted: Tuesday Jul 10th, 2012 at 8:46 am #18803
Hamid
Username: zawiyaprojects

I cannot seem to get jwplayer to work (even after following the instructions) using s3 and CloudFront.

I CAN download the same file via a different test page using the shortcode:

<a href="[s2File download="20120504_Review_10.54-58.mp4" download_key="true" /]">Download</a>

I just can’t get jwplayer to stream the file. The test page Im using for jwplayer comes up with the following text:

JW Player® appears here.

Raw html plugin is installed and all four checkboxes for Disable wptexturize, Disable automatic paragraphs, Disable convert_chars, Disable smilies are checked.

Here is the code for the test page:

<?php
// Configuration.
$s2_jw_config["jwplayer"] = "/jwplayer/"; // Relative URL path to JW Player files directory.
$s2_jw_config["mp4_video_file_name"] = "20120504_Review_10.54-58.mp4"; // Name of your MP4 test file.
// Don't edit anything else below unless you know what you're doing.
?>

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="<?php echo $s2_jw_config["jwplayer"]; ?>jwplayer.js"></script>

<script type="text/javascript">
    /* The Shortcode here will return a JSON object for JavaScript notation. */
    /* A direct URL to the RTMP source; counting the file against the current User in real-time. */
    /* API Shortcode `s2File` returns a null object if access is denied to the current User/Member. */
    var mp4 = [s2File download="<?php echo $s2_jw_config["mp4_video_file_name"]; ?>" url_to_storage_source="true" count_against_user="true" get_streamer_json="true" /];
</script>

<script type="text/javascript">
    if(typeof mp4 === 'object') /* `s2File` returns a null object if access is denied to the current User. */
        {
            jwplayer("jw-container").setup({modes: /* JW Player®. */
            [
                /* First try real-time streaming with Flash® player. */
                {type: "flash", provider: "rtmp", src: "<?php echo $s2_jw_config["jwplayer"]; ?>player.swf",
                    config: {streamer: mp4['streamer'], file: mp4['file']}},
            
                /* Else, try an HTML5 video tag. */
                {type: "html5", provider: "video",
                    config: {file: mp4['url']}},
            
                /* Else, this is a safe fallback. */
                {type: "download", /* Download the file. */
                    config: {file: mp4['url']}}
            ],
            /* Set video dimensions. */ width: 480, height: 270
            });
        }
    else /* Else, `s2File` returned a null object value. */
        {
            document.write('Sorry, you do NOT have access to this file.');
        }
</script>

JWplayer is installed in root directory and I can access the player.swf directly.

Not sure why it’s not working. Any ideas? What am I missing or doing wrong. Really need some help her guys :(

Posted: Tuesday Jul 10th, 2012 at 4:08 am #18787
Hamid
Username: zawiyaprojects

I dont know what changed but after getting a confirmation email with auto-generated password after registering the first user, all subsequent registration attempts does not send out an email to the user or admin.

I have to step away from this for a minute…

Posted: Tuesday Jul 10th, 2012 at 3:52 am #18785
Hamid
Username: zawiyaprojects

Getting there…

I removed all reference to the custom field “gender_title” in the s2hacks.php and in the success URL and in the thank-you page and it now sends out an email to the user with their auto-generated password. But it does NOT send an email to the admin informing that a user has registered.

1.) What am I doing wrong with the custom field?

2.) Why do I not get an email informing a user has registered.

Posted: Tuesday Jul 10th, 2012 at 3:36 am #18783
Hamid
Username: zawiyaprojects

OK here what happens.

1.) Registration goes through and member is redirected to the thank-you page.

2.) The thank-you page does not display custom registration field “gender_title” before first name but it does display first name:

Hello  Hamid

Thank you for joining Domain.com.

We hope you enjoy your free membership which will entitle you to free content on a regular basis.

If you end up loving our lessons, you can always upgrade to a paid subscription that will give you access to more downloads.

Looking forward to serving you at Domain.com

To log into your account, please check your email address for your auto-generated password.

Admin

3.) No email is send to new user with their auto-generated password.

4.) No email is sent to admin (informing that a new user has registered).

Posted: Tuesday Jul 10th, 2012 at 3:22 am #18782
Hamid
Username: zawiyaprojects

Hello Raam

[Allow Custom Passwords during Registration] is set to “No (send auto-generated password via email; after registration)”.

I had deleted the original success url so I can’t say if it had the double double quotes. I re-entered it correctly and will let you know what happens.

Here is my mu-plugin code for s2hacks.php. I added a line for gender_title:

<?php
add_action('ws_plugin__s2member_during_configure_user_registration', 's2_redirect_after_registration');
        function s2_redirect_after_registration($vars = array()) {
                if (!is_admin() && $vars['processed'] === 'yes') {
                $thank_you_page = "http://www.domain.com/thank-you/";
                wp_redirect($thank_you_page . '?email=' . urlencode($vars['email']) .
                '&gender_title=' . urlencode($vars['gender_title']) .
                '&fname=' . urlencode($vars['fname']) .
                '&lname=' . urlencode($vars['lname']) .
                '&username=' . urlencode($vars['login']) );
                exit();
                }
        }
?>

And here is my code for the thank-you page

Hello  <?php echo $_GET['gender_title']; ?> <?php echo $_GET['fname']; ?>

Thank you for joining Domain.com.

We hope you enjoy your free membership which will entitle you to free content on a regular basis.

If you end up loving our lessons, you can always upgrade to a paid subscription that will give you access to more downloads.

Looking forward to serving you at Domain.com

To log into your account, please check your email address for your auto-generated password.

Admin

Are all the components set up correctly? (I will test it now and get back to you :)

Posted: Monday Jul 9th, 2012 at 7:53 am #18663
Hamid
Username: zawiyaprojects

Hello Bob, your response came in just in time…

I had been debating whether to serve files off of Amazon S3 and CloudFront. I decided to go with Amazon and I just finished setting up my new bucket and configuring s2member. Let hope the cost isn’t that much :)

Thanks for sharing… you made me feel good about our decision to go with s2member (even though I’m a newbie to s2member, I’m really starting to love it).

Posted: Sunday Jul 8th, 2012 at 5:11 pm #18624
Hamid
Username: zawiyaprojects

Hello Mary May, curious to know the resolution. Can you share?

Posted: Sunday Jul 8th, 2012 at 9:54 am #18612
Hamid
Username: zawiyaprojects

Thanks Cristian

Posted: Thursday Jul 5th, 2012 at 4:48 am #18365
Hamid
Username: zawiyaprojects

Thanks for the quick reply Raam.

I sure hope you get enough interest as it is a great tool to increase sales of “digital goods”.

Instead of having users go through the checkout process every time they purchase digital goods (that may not be offered at a membership level), having a credit system gives members the option to pay once, download many, similar to how Themeforest and Codecanyon work.

Personally speaking I have purchased themes only because I had credits in my account; had they not been there, I definitely would not have downloaded/purchase some of them.

It’s a great selling tool folks, if you want to generate extra revenue on your site… please show some interest :)

P.S. Is there a possibility of having this functionality commissioned? We’re dead in the water without it.

Viewing 11 replies - 51 through 61 (of 61 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.