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™
<?php if (current_user_can("access_s2member_level1")){ ?>
Some content for Members who are logged in with an s2Member Level >= 1.
<?php } else { ?>
Message telling the person that he needs Level 1 access to see the content in this page.
<?php } ?>
candy wrote:And what if you have 3 levels and do not know which user landed there from where?!?!
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 un-authenticated 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, it becomes important for s2Member to provide information about what the User/Member was attempting to access ( 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.
<?php if(current_user_can("access_s2member_level1") && $_GET["s2member_level_req"] === "2"){ ?>
.... they have access to Level #1 already, but they need to upgrade to Level #2 in order to view this content.
Display content here ( perhaps a Modification Button or a link to a Modification Form generated with s2Member Pro )
<?php } else { ?>
Else, display something different here.
<?php } ?>
Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest