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™

s2member does not protect page?

s2Member Plugin. A Membership plugin for WordPress®.

s2member does not protect page?

Postby Margruss » June 4th, 2011, 7:20 pm

Hello,

I am getting acquainted with s2Member, it is really a nice plugin. Because I am in the beginning of the learning curve, maybe I am missing something, but here you have:

1. I created 3 pages in my Wordpress website
2. I added those 3 pages using the Wordpress menu feature
3. 2 of those pages, are redirected to a subdomain which is protected by SSL
4. 1 of those pages is not redirected.

I configured s2Member to protect those three pages. I added the pages IDs to the respective field in s2Member, separated by a comma (142, 2045, 3084 - not the real IDs).

s2Member protects only the page that is not redirected. The two pages that are redirected, are not protected, they will redirect to the HTTPS subdomain.

I checked in each page, and the three are configured to be protected using their membership levels.

Is there any way to solve this?

Thank you in advance
User avatar
Margruss
Registered User
Registered User
 
Posts: 9
Joined: June 3, 2011

Re: s2member does not protect page?

Postby Cristián Lávaque » June 6th, 2011, 1:22 am

What do you mean two are redirected? Do you use a plugin to forward from those pages to the subdomain?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: s2member does not protect page?

Postby Margruss » June 6th, 2011, 2:13 am

Hello Cristián,

Yes, I use a plugin to redirect to another page, in this case a HTTPS page. When there is no redirection, s2Member blocks access and takes the user to the register page. When there is redirection, s2Member does not blocks access. Is there any way to solve this? :-)

Thank you
User avatar
Margruss
Registered User
Registered User
 
Posts: 9
Joined: June 3, 2011

Re: s2member does not protect page?

Postby Cristián Lávaque » June 6th, 2011, 4:46 am

Hmm... Then try redirecting the person with JavaScript instead of that plugin, that way if the person can't access the page he'll be sent to the Membership Options Page, but if he can access it the JavaScript will send him to where you want. Be sure to use the HTML editor instead of the Visual one.

Code: Select all
<script type="text/javascript">window.location = 'https://secure.yoursite.com/';</script>


I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: s2member does not protect page?

Postby Margruss » June 6th, 2011, 5:22 am

Thank you Cristián. Any hints on how to hardlink this javascript in my wordpress menu? I looked into the theme files, did not find where. Has this to be done in the wp config files instead of the theme files?
User avatar
Margruss
Registered User
Registered User
 
Posts: 9
Joined: June 3, 2011

Re: s2member does not protect page?

Postby Harty » June 6th, 2011, 5:26 am

You may have to log out to see s2member working as expected.
User avatar
Harty
Registered User
Registered User
 
Posts: 104
Joined: April 27, 2011
Location: New Zealand

Re: s2member does not protect page?

Postby Cristián Lávaque » June 6th, 2011, 5:34 am

Margruss wrote:Thank you Cristián. Any hints on how to hardlink this javascript in my wordpress menu? I looked into the theme files, did not find where. Has this to be done in the wp config files instead of the theme files?


You'd add this to the page using the WordPress editor.

And Harty's right, try this logged in and out to see the difference.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: s2member does not protect page?

Postby Margruss » June 6th, 2011, 7:55 am

Hi Harty, thank you, yes I am logged out when testing s2Member. Cristián, Wordpress 3.0 menu feature will not accept javascript links only http/s. My theme has js enabled because it has a slideshow working in it (Nivoslider). The theme header.php where it calls the menu is this one:

Code: Select all
<?php } ?>
</div><!-- /xs-header -->
   <div id="xs-primary-menu">
      <?php
      if ( function_exists('wp_nav_menu') ) {
         wp_nav_menu( array(
         'theme_location' => 'primary',
         'sort_column' => 'menu_order',
         'menu_class' => 'sf-menu'
         
         ));
      }
      ?>
   <div class="clear"></div>
   </div><!-- /xs-primary-menu -->
<div id="xs-container">


Where exactly I should insert the javascript hardlink code you provided me?

Thank you in advance :)
User avatar
Margruss
Registered User
Registered User
 
Posts: 9
Joined: June 3, 2011

Re: s2member does not protect page?

Postby Margruss » June 6th, 2011, 7:57 am

Sorry, forgot to tell that I am using Google Analytics to track this redirection link, will this impeach s2Member from blocking access?
User avatar
Margruss
Registered User
Registered User
 
Posts: 9
Joined: June 3, 2011

Re: s2member does not protect page?

Postby Cristián Lávaque » June 6th, 2011, 1:45 pm

The JavaScript I showed you is not a link and doesn't go in a link, it goes in the page's body, you know, the one you edit with WordPress with the edit form, but use the HTML editor, not the Visual one.

It's most likely that the Google Analytics code at the bottom of the page won't have a chance, so you could track with the redirection URL, add a variable or do something you can pick up in the target page, that will let you know when the redirection happened.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 0 guests

cron