Statistics: Posted by drbyte — January 5th, 2012, 12:22 pm
<?php
delete_user_option ($user_id, "s2member_file_download_access_log");
?>
<?php
$user_id = 123;
delete_user_option ($user_id, "s2member_file_download_access_log");
?>
I'll see what I can do about this for a future release.
This would work check_user_counter and would be a plus to get it working.
s2Member automatically resets this log each time a promotion or demotion occurs, including Subscription Modifications. So unless you need to purge it on-demand for a specific User, you shouldn't need to worry about this aspect.
So If a member on Level 6 with unlimited streaming and 60 downloads per month downgrading the membership to level 1, they would not be able to get the unlimited streaming unless I delete the download logs.
Statistics: Posted by Jason Caldwell — January 5th, 2012, 12:18 am
<?php
delete_user_option ($user_id, "s2member_file_download_access_log");
?>
Statistics: Posted by drbyte — January 3rd, 2012, 4:07 am
if($user_previous_file_downloads >= $user_file_downloads["allowed"]
if($updating_user_counter && $user_previous_file_downloads >= $user_file_downloads["allowed"]
Statistics: Posted by Jason Caldwell — January 2nd, 2012, 10:35 pm
Statistics: Posted by drbyte — January 2nd, 2012, 12:28 pm
As far the unlimited streaming plus an option to download, I am stuck..
Statistics: Posted by Jason Caldwell — December 31st, 2011, 9:01 am
<?php
$cfg = array ("file_download" => get_post_meta(get_the_ID(), "movie", true), "check_user" => true); ?>
<?php if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>
<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["streamer"]; ?>", file: "<?php echo $mp4["file"]; ?>"}},
],
autostart: false,
controlbar: "bottom",
skin: "new/glow.zip",
/* Set video dimensions. */ width: 750, height: 480
});
</script>
<?php } else /* Access is denied to the current User. */ { ?>
<?php } ?>
https://site.com?s2member_file_download=<?php echo get_post_meta($post->ID, "movie", $single = true); ?>
/?s2member_file_download=example-file.zip
<?php
delete_user_option ($user_id, "s2member_file_download_access_log");
?>
Statistics: Posted by drbyte — December 31st, 2011, 12:58 am
"url_to_storage_source" => true, "check_user" => true, "count_against_user" => true); ?>
check_user" => true
Update 2:
After couple of tries, the JWPlayer player disappears when the count reach it's limits
Any Ideas of how to keep the Player and just limit the number of downloads
Yes, this is on our list. s2Member is currently undergoing a rewrite to make it more powerful at a fundamental level, but we are also working from a master TODO list, and this is on it. In the mean time, it's possible to reset the counters via PHP, by deleting the meta key.
Is there any future plans to incorporate Reset Download Restrictions button to the user profile?
<?php
delete_user_option ($user_id, "s2member_file_download_access_log");
?>
Sorry, it's difficult to troubleshoot things like this, because there are just so many variables at play. For instance, browser cache could be a factor. By default, s2Member will NOT allow browser caching on file downloads. However, with CloudFront, the ball is entirely in your court with this. See screenshot below. Also, it's possible that you're generating links differently (i.e. with or without check_user?). If you can give me a specific path to follow in reproducing this, I'll be happy to investigate it further though. Code samples perhaps.
Sometimes, even when the download limit has been exceeded, on some pages you can still see the Player. Sometimes, in IE9 when you click on the download link, it takes you to an error page. Sometimes it takes you to the download exceed page.
Statistics: Posted by Jason Caldwell — December 30th, 2011, 11:21 pm
Statistics: Posted by drbyte — December 30th, 2011, 3:29 am
Statistics: Posted by drbyte — December 30th, 2011, 2:30 am
"url_to_storage_source" => true, "check_user" => true, "count_against_user" => true); ?>
"url_to_storage_source" => true, "check_user" => true, "count_against_user" => true); ?>
check_user" => true
Statistics: Posted by drbyte — December 29th, 2011, 10:59 pm