Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-28T16:30:49-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15990 2011-11-28T16:30:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15990&p=54100#p54100 <![CDATA[Re: Temporary Access Links]]> Statistics: Posted by fx_keith — November 28th, 2011, 4:30 pm


]]>
2011-11-28T14:59:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15990&p=54095#p54095 <![CDATA[Re: Temporary Access Links]]> Unfortunately, I'm getting a redirect to signup page before that action even fires. I have it rolled up into a plugin, so maybe it's an execution order type thing. I'm looking into what's causing the redirect right now.

Statistics: Posted by fx_keith — November 28th, 2011, 2:59 pm


]]>
2011-11-22T18:10:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15990&p=53722#p53722 <![CDATA[Re: Temporary Access Links]]> Thanks for the heads up on this thread.

It will be very difficult to avoid all aspects of s2Member's protection and Alternative View Restrictions in this regard. However, if you are generating links that point directly to the Permalinks for these Posts/Pages via Specific Post/Page Access, you might do something like this.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php

add_filter 
("ws_plugin__s2member_check_post_level_access_excluded", "my_s2_exclusions");
add_filter ("ws_plugin__s2member_check_page_level_access_excluded", "my_s2_exclusions");

/* Now build the function. */ function my_s2_exclusions ($s2_says = FALSE)
    {
        global $post; /* Global ```$post`` object reference. */
        /**/
        if (!empty ($post->ID) && c_ws_plugin__s2member_sp_access::sp_access ($post->ID, "read-only"))
            return /* Exclude it, because it's allowed by Specific Post/Page Restrictions. */ ($my_s2_says = true);
        /**/
        return /* Otherwise return whatever s2Member says. */ $s2_says;
    }
?>
* This provides for temporary exclusions of User Level Restrictions whenever a specific Post/Page ID is explicitly allowed via s2Member Specific Post/Page Access Restrictions. I think this is what you're after.

Statistics: Posted by Jason Caldwell — November 22nd, 2011, 6:10 pm


]]>
2011-11-21T13:03:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15990&p=53646#p53646 <![CDATA[Temporary Access Links]]>
I though I could solve it by tapping into the 'Specific Post/Page Access' functionality. Specifically 'c_ws_plugin__s2member_sp_access::sp_access_link_gen' to provide me with the expiring link. But since the posts are also under the user access restrictions, the links require the users to be logged in as well. I know the documentation warns about that, but I'd really like to get around it. Are there any other ways I can bypass the access restrictions in this scenario?

Statistics: Posted by fx_keith — November 21st, 2011, 1:03 pm


]]>