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™

Me thinks I'm being dense here....

s2Member Plugin. A Membership plugin for WordPress®.

Me thinks I'm being dense here....

Postby johnmont » May 15th, 2010, 9:13 pm

This plugin looks awesome, especially the upcoming pro version. But I'm doing something wrong out of the gate and not sure what....to the point I feel a bit like an idiot. I've installed the plugin and activated it. Gone through some of the basic setup, but left most of the settings in their default. I would like to restrict posts by category as a start, so I set level 1 category settings to "all". In my thought, this should make posts not visible (at least those that aren't uncategorized).

However, a vistor who is not logged in still sees posts when they visit my dev blog home page. My thinking is that any post that is not "uncategorized" would not be visible. Am I correct regarding this?

I don't have any plugins installed other than the Category Image(s) plugin.

Just a sanity check to make sure I'm not starting off on the wrong foot....
User avatar
johnmont
Registered User
Registered User
 
Posts: 10
Joined: May 15, 2010

Re: Me thinks I'm being dense here....

Postby Jason Caldwell » May 19th, 2010, 6:20 am

johnmont wrote:This plugin looks awesome, especially the upcoming pro version. But I'm doing something wrong out of the gate and not sure what....to the point I feel a bit like an idiot. I've installed the plugin and activated it. Gone through some of the basic setup, but left most of the settings in their default. I would like to restrict posts by category as a start, so I set level 1 category settings to "all". In my thought, this should make posts not visible (at least those that aren't uncategorized).

Hi there. Your assumption is correct, and this IS how s2Member functions under normal circumstances. If your site is not behaving properly, you may want to test s2Member using the default theme for WordPress®. Some themes pull data directly from the WordPress® database using custom queries; and this can complicate the protection routines used by s2Member.

After testing in the default theme, please report back and let me know what you've discovered. If all else fails, you can always use URI Level Restrictions to overcome any limitations being imposed by your theme.
~ 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

Re: Me thinks I'm being dense here....

Postby johnmont » May 27th, 2010, 6:35 pm

I installed the new default 3.0 theme (and s2Member 3.0.2) and am getting the same thing.

What is quite interesting is that I used the advanced conditionals within an article (Example #5: Uses s2Member API Constants, instead of functions.) and the output displayed on the web page accurately reflected the user level of the user viewing the home page. I tried with not logged in, logged in, level 1, and admin users. All displayed the correct text based upon the conditional. However, even if the category for this article is set to ID=13 and I restrict this category....all visitors to the site can actually see the article.

Curious. :)
User avatar
johnmont
Registered User
Registered User
 
Posts: 10
Joined: May 15, 2010

Re: Me thinks I'm being dense here....

Postby Jason Caldwell » May 28th, 2010, 1:58 pm

Hi John. Is this Category being displayed on your Front Page perhaps? s2Member will never block content from the Home Page. If you have Posts that appear on your Front Page, they will always be available, no matter what. The Home Page is a special section that is not protected by s2Member in any way at all.

If you were to restrict access to a Category, and try to view that Category in an archive view ( typical behavior ), then s2Member WILL restrict access. So the Front Page is the only exception.
~ 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

Re: Me thinks I'm being dense here....

Postby johnmont » May 31st, 2010, 11:55 am

Thanks, Jason. Yes, the main page is the home page: http://dev.fxguide.com/, so what you're saying makes sense. I'll do some more doc reading with the API and see if there is a simple way to get home page functionality that doesn't show restricted posts.

However, it also seems as though it's visible in archive view. I've deactivated all plugins except for Exec-PHP and I can still view it when not logged in:

http://dev.fxguide.com/date/2010/05
http://dev.fxguide.com/category/fxginsider

Thanks again for your help....looking forward to Pro
User avatar
johnmont
Registered User
Registered User
 
Posts: 10
Joined: May 15, 2010

Re: Me thinks I'm being dense here....

Postby Jason Caldwell » June 23rd, 2010, 10:09 pm

Ok thanks for the followup.

Just to be clear for anyone else reading this also.
s2Member will do this:

Code: Select all
if(is_category([protected category ID])){
// deny access
}

So if you have a custom query somewhere in your theme that renders the is_category() function invalid, it could cause this broken behavior. There is an article here, and documentation about this issue. The trick is to use the wp_reset_query() function after any custom queries in your theme files:
http://webstractions.com/wordpress/undo ... set_query/
http://codex.wordpress.org/Function_Ref ... eset_query
~ 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: Exabot [Bot] and 1 guest

cron