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.

About: Micael Olsson

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing topic 1 (of 1 total)
Topic Count Last Reply
level 0 URI restrictions stopped working

By:  Lori Mercer in: Community Forum

voices: 4
replies: 9

3 years, 8 months ago  Cristián Lávaque

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Monday Apr 15th, 2013 at 7:54 am #47483

Cristián,

Before I start Troubleshooting…
I’m using Quick Cache from PriMoThemes.com / WebSharks, Inc.
I haven’t even thought about that not working since it’s both WebSharks… Would Quick Cache cause a problem?

BR,
Micael

Posted: Friday Apr 12th, 2013 at 11:03 am #47311

Hi,

Sorry to barge in on your thread but this has happened twice for me as well.
I have set pages to “no membership level” i.e. the blank option in the drop list.
It has, by it self, changed it to Membership Level #1 on two occasions now…
I hope this will help both Lori and me. :)

Thanks, Micael

Here’s what I have at Dashboard -› s2Member® -› API / Scripting -› Membership Options Page/Variables:

Membership Options Page Variables (some scripting required)

At the core of s2Member, is it’s ability to protect content (i.e. Posts, Pages, Tags, Categories, URI word fragments, etc). Whenever a public User, or even an existing Member attempts to access an area of your site that is unavailable to them; either because they are not logged-in, not a paying Member at all; or maybe they are logged-in, but they don’t have access to content you’ve protected at a higher Membership Level; s2Member will always redirect these unauthenticated requests to your Membership Options Page.

So your Membership Options Page is a key element of your site. It serves as the focal point of your s2Member installation. Understanding this, you can see it becomes important for s2Member to provide information about what the User/Member was attempting to access (e.g. before they were redirected to the Membership Options Page). This is where s2Member’s MOP Vars come in (i.e. Membership Options Page Variables). Whenever s2Member redirects a User/Member to your Membership Options Page, it will include these important MOP Variables in the query string of the URL. These Variables can be used to provide more informative messages; or even to provide a different set of Membership Options (i.e. Payment Buttons), based on what a User/Member was attempting to access.

TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex.
See Also: s2Member Codex -› API Constants, and s2Member Codex -› API Functions.

———————————————————————————————————–
Example redirection links, including many of the possible MOP Variable variations.
———————————————————————————————————–

…/membership-options-page/?_s2member_seeking[post]=369&_s2member_req[sp]=369
…/membership-options-page/?_s2member_seeking[page]=559&_s2member_req[sp]=559
…/membership-options-page/?_s2member_seeking[page]=587&_s2member_req[level]=1
…/membership-options-page/?_s2member_seeking[post]=545&_s2member_req[level]=2
…/membership-options-page/?_s2member_seeking[catg]=698&_s2member_req[level]=4
…/membership-options-page/?_s2member_seeking[ptag]=447&_s2member_req[level]=3
…/membership-options-page/?_s2member_seeking[page]=887&_s2member_req[ccap]=music
…/membership-options-page/?_s2member_seeking[post]=871&_s2member_req[ccap]=videos
…/membership-options-page/?_s2member_seeking[file]=example.zip&_s2member_req[level]=1
…/membership-options-page/?_s2member_seeking[ruri]=aHR0cDov…&_s2member_req[level]=1

———————————————————————————————————–

Here is a breakdown on each of these Variables:

* `_s2member_seeking[post|page|catg|ptag|file|ruri]` = (Post ID, Page ID, Category ID, Tag ID, File, URI)
Tip: `_s2member_seeking[file]` = (File path, relative to /s2member-files/, or your Amazon® S3 Bucket)
Tip: `_s2member_seeking[ruri]` = (A base 64 encoded URI; only applies w/ Membership URI Restrictions)
Tip: These array elements are mutually exclusive: [post|page|catg|ptag|file|ruri].
Only ONE of these array elements (i.e. Content Types) will be specified.

* `_s2member_req[level]` = a Membership Level # required for access (only applies to Membership Level Access)
* `_s2member_req[ccap]` = a Custom Capability required for access (only applies to Custom Capability Restrictions)
* `_s2member_req[sp]` = a Specific Post/Page ID required (only applies to Specific Post/Page Access Restrictions)
Tip: `_s2member_req[level|ccap|sp]` are mutually exclusive Requirement Types.
Only ONE of these three elements will be passed in combination with:
`_s2member_seeking[post|page|catg|ptag|file|ruri]`.

———————————————————————————————————–

Additional Variables that might be useful to developers:

* `_s2member_seeking[_uri]` = (A base 64 encoded URI; the URI they were originally seeking)
Tip: this is ALWAYS passed through, regardless of which Content Type was protected.

* `_s2member_seeking[type]` = (A string. One of: post|page|catg|ptag|file|ruri)
Tip: this is ALWAYS passed through, regardless of which Content Type was protected.

* `_s2member_req[type]` = (A string. One of: level|ccap|sp)
Tip: this Requirement Type Variable is ALWAYS passed through.

* `_s2member_res[type]` = (A string. One of: post|page|catg|ptag|file|ruri|ccap|sp|sys)
Tip: Actual Restriction Type that’s preventing access; may differ from `_s2member_seeking[type]`.
Tip: Restriction Type `sys` Systematic (i.e. something s2Member protects automatically)
Tip: Restriction Type `ccap` represents Custom Capability Restrictions by s2Member.
Tip: Restriction Type `sp` represents Specific Post/Page Access Restrictions.
Tip: this Restriction Type Variable is ALWAYS passed through.

———————————————————————————————————–

* The use of MOP Vars is 100% completely optional (for advanced site owners).

Code Samples: This may give you some ideas [ click here ].

Backward compatibility: The structure of s2Member’s MOP Vars changed a bit in Nov, 2011. However, s2Member still provides the same MOP Vars that it used in previous versions, for backward compatibility. These old MOP Variables were more difficult to use; they are now deprecated (i.e. they WILL eventually be removed). Going foward, please go by the new documentation above.

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

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.