Community Support Forums — WordPress® ( Users Helping Users ) — 2012-02-04T16:51:42-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=17065 2012-02-04T16:51:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=17065&p=62319#p62319 <![CDATA[Re: Specific access and post types?]]>
Custom capabilities are equivalent to "special rights" a user can purchase regardless of its restriction level, like buying tickets to special rides in an amusement park.

Custom capabilities are not stored like categories, so any ccap could be purchased by a user if we created a button for it, and therefore, the PayPal buttons to purchase those could be created programmatically. We could have a PayPal button on each page that sells a capability named after the page ID, and check for each page if that ID capability was purchased.

The procedure would be the following:
- Put some conditionnal code that checks if the user has capability "show_[show id]"
- If he does, show the show. If not, put a message with a PayPal button
- After the user has paid for the show, he is prompted to login or create his account.
- The user can now watch the show.

Am I correct so far?

Statistics: Posted by n1c0_ds — February 4th, 2012, 4:51 pm


]]>
2012-02-04T15:44:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=17065&p=62318#p62318 <![CDATA[Re: Specific access and post types?]]> Statistics: Posted by n1c0_ds — February 4th, 2012, 3:44 pm


]]>
2012-02-03T04:06:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=17065&p=62241#p62241 <![CDATA[Re: Specific access and post types?]]> the_simpsons. The button to purchase the access would have that ccap, which after checkout will be added to the user's profile. Then when you check for this ccap if the user tries to load that show, the conditions would check current_user_can(access_s2member_ccap_the_simpsons).

http://www.s2member.com/custom-capabilities-video/

Now, if you added that ccap as a restriction to a page/post using the s2Member meta box on the right of the edit page, no one without that ccap in his profile would be able to see it. That's why I suggest that, instead, you use conditionals, so that it can either be the ccap or the Level 1 access what the user has that'd let him see the content.

I hope that makes sense.

Statistics: Posted by Cristián Lávaque — February 3rd, 2012, 4:06 am


]]>
2012-02-02T12:03:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=17065&p=62153#p62153 <![CDATA[Re: Specific access and post types?]]>
Is there a functionality that allows purchase of individual items regardless of the situation? From what I'm reading, you seem to suggest that I create a different subscription level for every single show. Considering that there might be as many as 5 shows a week, that would get very complicated very fast.

Thanks a lot for your time and patience. I'm fairly familiar with WordPress and its code, but s2m is new to me.

Statistics: Posted by n1c0_ds — February 2nd, 2012, 12:03 pm


]]>
2012-01-30T23:16:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=17065&p=61964#p61964 <![CDATA[Re: Specific access and post types?]]>
Code:
[s2If current_user_can(access_s2member_level1) OR current_user_can(access_s2member_ccap_showA)]
     Video player for Show A
[/s2If]


I hope that helps. :)

Statistics: Posted by Cristián Lávaque — January 30th, 2012, 11:16 pm


]]>
2012-01-29T10:37:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=17065&p=61863#p61863 <![CDATA[Re: Specific access and post types?]]> Statistics: Posted by n1c0_ds — January 29th, 2012, 10:37 am


]]>
2012-01-29T04:29:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=17065&p=61855#p61855 <![CDATA[Re: Specific access and post types?]]>
If having the user register is not a problem, which I assume it may not be since you're planning to sell a yearly subscription, then you could instead use the category or tag access restrictions.

To sell individual shows, you may want to look at custom capabilities and control the access with conditionals. If you don't use the conditional and instead require the custom capability from the meta box in the edit page, you won't be able to sell the subscription without also giving that user all show's capabiliites. With a conditional you can check for the capability for that show or the subscription for all shows.

http://www.s2member.com/custom-capabilities-video/
WP Admin -> s2Member -> API / Scripting -> Simple/PHP Conditionals
WP Admin -> s2Member -> API / Scripting -> Advanced/PHP Conditionals


I hope that helps. :)

Statistics: Posted by Cristián Lávaque — January 29th, 2012, 4:29 am


]]>
2012-01-28T13:49:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=17065&p=61832#p61832 <![CDATA[Specific access and post types?]]>
I just installed s2Member, and after browsing around, I haven't been able to find a way to allow specific access to post types.

For example, we have a list of shows which a user can purchase. Instead of entering each and every show's post ID in "Specific post/page access restrictions", we would like to simply enter the post type so our client doesn't have to update the options each time a new show is added.

This is the flow: User sees list of shows (custom post type: show), decides to purchase access to single show or to subscribe for a year and access all shows.

Is this possible?

Statistics: Posted by n1c0_ds — January 28th, 2012, 1:49 pm


]]>