Page 1 of 1

Extending the time of a post/page access link expiration

PostPosted: May 30th, 2011, 8:18 am
by sensei
Good Morning!

We currently run a webcast behind s2 which we sell access to (using the post/page access via google buttons). This access also includes 48 hours of on demand viewing.

We have run into the situation where the streaming service had a small hiccup on the on-demand service and we would like to extend the customers expiration time for the link they purchased. Is there a way to do this through the s2 interface or can it be accessed in the sql database.

We would do this manually, but with almost 1000 people registered, that would take a while.....

Thanks!

Marc

Re: Extending the time of a post/page access link expiration

PostPosted: May 30th, 2011, 12:53 pm
by Cristián Lávaque
I don't know how to do that, but I sent Jason an email asking how it could be done.

Re: Extending the time of a post/page access link expiration

PostPosted: May 31st, 2011, 6:20 am
by Jason Caldwell
Hi Marc.

Specific Post/Page Access, is that correct?
If so, sorry. No, each link contains it's expiration time ( embedded into the link itself ).

The only ways to extend the time, are as follows.

1. Generate new links for each of your Customers.
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
$exp_hours 
= 72;
$ids = "1443,2233";
$link = c_ws_plugin__s2member_sp_access::sp_access_link_gen($ids, $exp_hours);
?>
* There is also a tool in your Dashboard for this, under:
s2Member -> Google Buttons -> Specific Post/Page Access Links.

2. Either that, or you can temporarily exclude content restrictions for specific Posts/Pages.
Create this directory and file: /wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_filter
("ws_plugin__s2member_sp_access_excluded", "my_filter", 10, 2);
function my_filter($excluded = FALSE, $vars = array())
    {
        $post_or_page_id = $vars["sp_id"];

        if($_GET["s2member_sp_access"] && $post_or_page_id == 123)
            return true;
        else
            return false
;
    }
?>
* Remove the file after Customers are satisfied.