Page 1 of 1

Is there a way to alert non-members about pages?

PostPosted: June 7th, 2010, 8:03 am
by drcoach
Sorry if this topic is already covered but I can't find it anywhere.

It seems confusing to me that when a non-member enters my site they are re-directed to the same page no matter what they click without any explanation about why they can't navigate the site.

Does s2Member have a way of alerting people about membership? In other words is there any way to have a pop-up or message that appears stating something like, "Seeing this page over and over? You need to be a member to see the rest" or something like that?

Re: Is there a way to alert non-members about pages?

PostPosted: June 23rd, 2010, 3:50 pm
by Jason Caldwell
Great question. s2Member redirects all non-Members, who attempt to access a protected area of your site, to a special Page that you configure. This is called your Membership Options Page. You can configure this inside your WP Dashboard, under: s2Member -> General Options -> Login Welcome Page

So what you'll do is customize that Page, to give information about joining your site. Most visitors will get the picture. However, if you need to get more creative with it; you can use the variables that s2Member passes to your Membership Options Page.

Whenever s2Member redirects a non-Member to your Membership Options Page, it will also pass a query string variable to your Membership Options Page, indicating which Membership Access Level is required to view the content they're trying to access; based on your s2Member configuration.

The variable is:
?s2member_level_req = 0, 1, 2, 3, 4 ( where 0 = Free Subscriber )

So, inside your Membership Options Page, you could do something like this, using a PHP code snippet:
Code: Select all
<?php if($_GET["s2member_level_req"]){ ?>
"Seeing this page over and over? You need to be a member to see the rest" or something like that?
<?php } ?>

In order to use PHP code snippets inside a Post/Page, you will need this plugin:
http://wordpress.org/extend/plugins/exec-php/

Re: Is there a way to alert non-members about pages?

PostPosted: September 28th, 2010, 8:57 pm
by drcoach
Hi. Kind of a delayed reply here - just working on this again. I inserted the code you gave above in my membership options page after installing Exec-php, activating it, turning off the wysiwyg editor in my user and editing the text for the message in the code, but nothing is happening.

When I'm logged out and redirected to the membership options page nothing changes.

Was I supposed to do something with
?s2member_level_req=0,1,2,3,4,(where 0 = Free Subscriber) ?

If so, what was I supposed to do with that and where?

Sorry to be so thick - not a professional programmer!

Re: Is there a way to alert non-members about pages?

PostPosted: September 29th, 2010, 10:18 am
by mspackman
Hi drcoach.

I'm not a professional programmer either. I used Jason's videos to understand how this plug-in works. http://www.primothemes.com/forums/viewtopic.php?f=4&t=205. The first and second videos offered answers your question. I created my s2Member plug-in content while watching the video - the beauty of the pause button.

I hope this helps.

Smiles!

Re: Is there a way to alert non-members about pages?

PostPosted: September 29th, 2010, 2:55 pm
by drcoach
HI mspackman,
the link you left was a link back to this same thread. Could you try again? Thanks!
Carmen

Re: Is there a way to alert non-members about pages?

PostPosted: September 29th, 2010, 8:53 pm
by mspackman
LOL. Sorry about that. Here is the link: http://www.s2member.com/videos/
Michael