latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

restricted posts allow access

Home Forums Community Forum restricted posts allow access

This topic contains 5 replies, has 2 voices. Last updated by  David Welch 4 years, 9 months ago.

Topic Author Topic
Posted: Wednesday Apr 11th, 2012 at 2:39 pm #10595

like many, i am testing out s2member before going pro on a test site. I have a custom post type called “hosts” and, in the s2member -> restrictions -> post restrictions I have set level 1 to “all-hosts” and yet, all users can access the posts published in htis custom post type.

now, if i change this to just “all” the restriction works.

If i add in the post ID it is also restricted.

It appears to just be a problem with the custom post type name, but, I have checked it a million times, tried the singular “host” and plural “hosts” and of course got the ‘all-‘ in front of it.

anyone any ideas?

thanks
Darren

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Wednesday Apr 11th, 2012 at 2:56 pm #10596
David Welch
Username: dwbiz05

Do they have access to that specific page or is it just showing in the blog roll?

Check this setting:
s2member-> Restrictions -> Alternative View Protection -> Filter ALL WordPress® queries; protecting all Alternative Views.

Dave

Posted: Wednesday Apr 11th, 2012 at 3:08 pm #10597

hi, thanks for the response,

they can access the page directly in full -by going to the post url/permalink – and from the blog roll, anyway actually. I just clicked the alternate view to protect everything and can still access the post, directly.

i am not signed in at all and can see the post.

:-(

unfortunately the site is a dev site so accessing via hosts files, so you cannot easily see by my posting the url.

The protection works just fine if i change post restriction to “all” or the “post id” then its restricted as it should be, but, changing that to “all-hosts” (which is the plural name of the custom post type which contains the posts) does not restrict the access.

There seems a problem with custom post types.

thanks
Darren

Posted: Wednesday Apr 11th, 2012 at 3:22 pm #10599
David Welch
Username: dwbiz05

EDIT: I’m an idiot… lol!

try “all-hostss” with the extra “s” on it like I have it… just for kicks.. :)

Dave

  • This reply was modified 4 years, 9 months ago by  David Welch.
  • This reply was modified 4 years, 9 months ago by  David Welch.
Posted: Wednesday Apr 11th, 2012 at 3:32 pm #10602

well done that man! how bizaar – that got it, thats bit of a bug, as i used the plural name, not a plural of a plural , but, it worked so I am happy.

not to hijack my own post (and I promise I will by upgrading to pro as I love the plugin and appreciate the effort in it) but, on a dev site i was playing on yesterday to test the paypal bits, i notived that when somebody landed back on the site from paying via paypal, they landed on the ugliest page i have ever seen, but i cannot find this page to theme it/make it make sene, was some grey box saying account updated log back in.

is there a way to get to this page to edit it?

also, whilst i dont think its easily possible, on my site i allow front end posting, i would like people to be able to view their own posts but not others (unless they have the right membership level), is this something that is achievable with some api scripting?

thanks to that man, beer on its way via pro upgrade

thanks
Darren

Posted: Wednesday Apr 11th, 2012 at 3:44 pm #10603
David Welch
Username: dwbiz05

For those looking at this later…

The reason adding an extra “s” worked is because in the s2member code, they are parsing the post type using “all-” your post type here “s”. So if your post type is a plural, you have to add an extra “s” to get it to be parsed correctly.

Return Page:

I believe the correct file is found in your directory here:
wp-content/plugins/s2member/includes/templates/returns/default-return.php

I have not messed with this file, so I’m not 100% sure that’s it.

Post Viewing:

I’m sure this is possible using the API scripts, or at least doing your own scripting using the API constants or something. However, without knowing your system, I couldn’t tell you the best way to pull it off! lol! But, it’s probably possible.

Dave

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.