Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-16T17:26:54-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=3008 2012-01-16T17:26:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=60733#p60733 <![CDATA[Re: MOP Variable Help]]>

So you can check for that variable in the $_GET array and if it's there, you know the person got redirected to the Membership Options Page.


I kind of thought of this solution already, but that will require editing the theme, which I want to avoid. Is it possible to use a shortcode for that? Or, I guess that question is "Does such shortcode exist?". That would most definitely help make it much easier and cleaner way to implement.

Thanks!

Statistics: Posted by TotalWeb — January 16th, 2012, 5:26 pm


]]>
2011-08-16T13:43:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=32056#p32056 <![CDATA[Re: MOP Variable Help]]> Statistics: Posted by rwilki — August 16th, 2011, 1:43 pm


]]>
2011-04-07T16:28:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9307#p9307 <![CDATA[Re: MOP Variable Help]]>
@TODO: Add a few simplified examples for MOP Vars to built-in documentation for s2Member.

Statistics: Posted by Jason Caldwell — April 7th, 2011, 4:28 pm


]]>
2011-04-06T02:48:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9197#p9197 <![CDATA[Re: MOP Variable Help]]>

I'll mention your suggestion to Jason, seems like a good idea to document it as an example. In the meantime it'll be available to those who search the forums.

Statistics: Posted by Cristián Lávaque — April 6th, 2011, 2:48 am


]]>
2011-04-06T01:35:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9195#p9195 <![CDATA[Re: MOP Variable Help]]>
Thanks for sticking with me Cristian. You've made my night!

PS This seems like it could be a useful and widely used example that could be included in the MOP vars docs....

Statistics: Posted by dev9833 — April 6th, 2011, 1:35 am


]]>
2011-04-06T00:27:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9192#p9192 <![CDATA[Re: MOP Variable Help]]>
If you see the MOP Vars documentation WP Admin -> s2Member -> API / Scripting -> Membership Options Page / Variables, you'll notice that one variable is always passed:

`s2member_seeking` is always passed in; it is never excluded.


So you can check for that variable in the $_GET array and if it's there, you know the person got redirected to the Membership Options Page.

The your condition could go like this:

Code:
<?php
if 
(isset($_GET['s2member_seeking']))
    echo '<p>The page you were trying to view is protected. Please become a member.</p>';
?>


I hope that helps you. :)

Statistics: Posted by Cristián Lávaque — April 6th, 2011, 12:27 am


]]>
2011-04-05T22:50:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9190#p9190 <![CDATA[Re: MOP Variable Help]]>
All I want to know is...

How can I use MOP variables to create the if statement that I outlined in my first post?

IF the user was redirected to the MOP because they were denied access, THEN display X.

Statistics: Posted by dev9833 — April 5th, 2011, 10:50 pm


]]>
2011-04-05T22:46:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9189#p9189 <![CDATA[Re: MOP Variable Help]]>
Since this is the default page s2Member will send people to because of lack of access, I suggest you just use it for that.

To talk about your product or service you can create another page that isn't tied to this behaviour of s2Member. ;)

Statistics: Posted by Cristián Lávaque — April 5th, 2011, 10:46 pm


]]>
2011-04-05T22:32:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9188#p9188 <![CDATA[Re: MOP Variable Help]]>
In other words, I *only* want this message to show if they have been redirected to the member options page because they tried to access protected content.

Statistics: Posted by dev9833 — April 5th, 2011, 10:32 pm


]]>
2011-04-05T22:20:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9185#p9185 <![CDATA[Re: MOP Variable Help]]>
OK, so you only have protected content set to Level 1, and that's the only level your members would have?

Then you don't need to check anything, you already know that if they were sent to the Membership Options Page it's because they tried to view Level 1 content and they weren't in a Level 1 account (either don't have it or weren't logged in).

Since you know why they were sent there, there's nothing to figure out and you can simply give the message you see fit. You don't need to check what the required Level is, you know it's 1.

Does that help or are you trying to achieve something I missed? :)

Statistics: Posted by Cristián Lávaque — April 5th, 2011, 10:20 pm


]]>
2011-04-05T16:37:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3008&p=9165#p9165 <![CDATA[MOP Variable Help]]>
First off, big thanks for all the work you've put into developing and support s2 member. Much appreciated.

I'm trying to do something pretty straightforward... I'd like to add a conditional statement to my Member Options page that basically says, if the user has arrived at the Member options page because they are not logged in, echo "you've come to this page because you are not logged in or need to become a member" followed by the rest of the page's content.

Another way to say that is, if the page has been denied, tell the user why, then give them the member options page beneath that explanation.

At this point, I only have one level of membership - paid. I don't have any level 0s, just level 1s.

I tried using
Code:
<?php if($_GET["s2member_level_req"]){ ?><p>The page you were trying to view is protected. Please become a member.</p><?php } ?>
but this didn't seem to work for me .

Do I need to declare a variable first? I'm doing all of this in my template by the way, not using shortcodes or in the HTML editor using php-exec.

You help is appreciated.

Thanks.

Statistics: Posted by dev9833 — April 5th, 2011, 4:37 pm


]]>