PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

block all by default - list exceptions

s2Member Plugin. A Membership plugin for WordPress®.

block all by default - list exceptions

Postby arthomas » May 11th, 2011, 11:51 pm

Hello

Is it possible to block all posts, and just list the few exceptions?
I only want to allow a few posts, all other should be protected, it would be much easier to just list the 5 posts that are allowed, instead of having to list or tag all the protected.

In other words, instead of the default being everything allowed and having to list what I want blocked, is it possible to do it in just the opposite way?
User avatar
arthomas
Registered User
Registered User
 
Posts: 19
Joined: September 21, 2010

Re: block all by default - list exceptions

Postby Cristián Lávaque » May 12th, 2011, 12:27 am

Not that I know...

Tags is probably what I'd use, since you can tag posts in bulk... Same for categories.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: block all by default - list exceptions

Postby arthomas » May 12th, 2011, 12:42 am

interesting how such simple stuff (see my previous posts for 2 more) are not implemented in an otherwise such well developed and mature plugin.
just saying... really not complaining.
User avatar
arthomas
Registered User
Registered User
 
Posts: 19
Joined: September 21, 2010

Re: block all by default - list exceptions

Postby Cristián Lávaque » May 12th, 2011, 1:07 am

Well, it's quite advanced, but it's still got a way to go. It's the great feedback from guys like you that helps push the plugin forward. We're also discussing several things that will be coming out in future releases. So, yeah, pretty mature, but still more to come. Thanks for the great feedback! :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: block all by default - list exceptions

Postby arthomas » May 12th, 2011, 1:55 am

I am glad you are listening to the feedback.
great work guys!
User avatar
arthomas
Registered User
Registered User
 
Posts: 19
Joined: September 21, 2010

Re: block all by default - list exceptions

Postby arthomas » May 12th, 2011, 4:55 pm

Cristián Lávaque wrote:Not that I know...

Tags is probably what I'd use, since you can tag posts in bulk... Same for categories.


how would one tag 1000+ posts?
User avatar
arthomas
Registered User
Registered User
 
Posts: 19
Joined: September 21, 2010

Re: block all by default - list exceptions

Postby Cristián Lávaque » May 12th, 2011, 6:41 pm

Maybe a tagging plugin will let you do that easily. Checked a few and this one seems to do what you need https://wordpress.org/extend/plugins/we ... ng-system/

Let me know if it helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: block all by default - list exceptions

Postby Jason Caldwell » May 13th, 2011, 4:39 am

Thanks for the great question.
~ and thanks for the heads up Cristián.

Yes, this is possible.
Until we have this integrated into the UI panel for s2Member,
you can use this Filter/hack to accomplish what you need to.

1. Protect "all" Pages, or "all" Posts using s2Member's UI panel in the Dashboard.
2. Now, create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_filter 
("ws_plugin__s2member_check_post_level_access_excluded", "my_post_page_exclusions");
add_filter ("ws_plugin__s2member_check_page_level_access_excluded", "my_post_page_exclusions");
function my_post_page_exclusions ($excluded = false)
    {
        $excluded_posts = array (3345, 49343); /* Comma-delimited Post IDs to exclude. */
        $excluded_pages = array (3004, 39494); /* Comma-delimited Page IDs to exclude. */
        /**/
        if (($excluded_posts && is_single ($excluded_posts)) || ($excluded_pages && is_page ($excluded_pages)))
            return ($excluded = true);
    }
?>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron