Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-18T13:23:27-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16790 2012-01-18T13:23:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16790&p=60894#p60894 <![CDATA[Re: PostAccess Restrictions without redirect and without log]]>

Statistics: Posted by Raam Dev — January 18th, 2012, 1:23 pm


]]>
2012-01-17T17:09:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16790&p=60860#p60860 <![CDATA[Re: PostAccess Restrictions without redirect and without log]]>

Statistics: Posted by InfoKing — January 17th, 2012, 5:09 pm


]]>
2012-01-15T00:22:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16790&p=60555#p60555 <![CDATA[Re: PostAccess Restrictions without redirect and without log]]>
Code:
<?php
$post_or_page_id 
= get_the_ID();
if(
c_ws_plugin__s2member_sp_access::sp_access($post_or_page_id, "read-only"))
    {
        // The current visitor has Specific Post/Page Access to this Post/Page.
    }
?>


Code:
<?php
if(c_ws_plugin__s2member_sp_access::sp_access(123, "read-only"))
    {
        // The current visitor has Specific Post/Page Access to Post ID #123.
    }
?>

Statistics: Posted by Jason Caldwell — January 15th, 2012, 12:22 am


]]>
2012-01-11T16:18:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16790&p=60286#p60286 <![CDATA[Re: PostAccess Restrictions without redirect and without log]]> Yes, that's fine. But if I use "Specific Post/Page Access Restrictions", how can I show a part of the post for someone who has not bought?
I need something like that code, but for Specific Post/Page Access Restrictions!
Code:
<?php if (current_user_can("access_s2member_ccap_1")){ ?>
    Some content for Members who has bought this post. For example the_content
<?php } else { ?>
    Some public content. For example the_excerpt
<?php } ?>

Do you understand my problem?

Maybe I could use ws_plugin__s2member_sp_access in the page template to detect if the visitor has bought the post and show different content??

Statistics: Posted by InfoKing — January 11th, 2012, 4:18 pm


]]>
2012-01-11T14:52:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16790&p=60265#p60265 <![CDATA[Re: PostAccess Restrictions without redirect and without log]]>
If you don't want the user to register, you should use Specific Post/Page "Buy Now" buttons. You don't use Custom Capabilities (ccaps) for this. You will need to generate the code one time for each post/page that you want to sell. Once you generate the button code, you can put that code into your page template.

Here's the process:

1) Protect the page in s2Member by going to WP Admin -> s2Member -> Restriction Options -> Specific Post/Page Access Restrictions
2) Go to WP Admin -> s2Member -> PayPal Buttons -> PayPal Specific Post/Page (Buy Now) Buttons
3) Select the page that you protected in Step 1 and set the price/description options
4) Click 'Generate Button Code'
5) Copy the 'Resulting PayPal Button Code' (NOT the shortcode, the shortcode won't work in your PHP page template)
6) Add the button code to your page template where the PayPal button should show up.

When a user clicks on that button, they will be sent to PayPal. Once they finish paying, they will immediately be transferred back to the protected page where they will have full access to it. They will also receive an email with an access link to view the page (good for 72 hours by default).

Statistics: Posted by Raam Dev — January 11th, 2012, 2:52 pm


]]>
2012-01-10T17:33:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16790&p=60160#p60160 <![CDATA[PostAccess Restrictions without redirect and without login]]>
I want to show only the_excerpt from each post and hide the_content. I want to place the paypal-button directly to the post-template (see below), the user should not be redirected to the options-page! To see the entire post, the user should use BuyNow. Than he should have access only to this one post. I think that might work like this:

Code:
<?php if (current_user_can("access_s2member_ccap_1")){ ?>
        <?php the_content(); ?>
<?php } else { ?>
        <?php the_excerpt(); ?>
        <p>Bitte kauf diesen Artikel, um den Inhalt zu sehen</p>
        <!-- PayPal BuyNow Button Code -->
<?php } ?>

So that he can only see this one post, I have to create for each post one ccap, right? Not pretty, but might work.
But now comes the big problem: I want that the user must not register!
Is this only possible if I use Specific Post Restrictions? But then the user will be redirected and i dont want to redirect. :(

I've seen something like this in the Plugin EasyPayPal.

Usage:
[paybutton]{Item Name*}|{Item Number*}|{Amount*}|{Currency Code}|{Subscription Days}|{Hidden Text}[/paybutton]*Required
Simple Pay Now (No Login Required)
http://www.voiceoftech.com/swhitley/?page_id=129

How is it possible with S2Member?

Sorry for the bad English. I hope you can help! :)

Statistics: Posted by InfoKing — January 10th, 2012, 5:33 pm


]]>