Page 2 of 2

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: December 19th, 2011, 10:55 am
by Jason Caldwell
Very sorry. You'll need the additional parameters: , 10, 2

Please use this updated code sample:
Code: Select all
<?php
add_filter 
("ws_plugin__s2member_login_redirect", "s2_login_redirection", 10, 2);
function s2_login_redirection ($what_s2_says, $vars = array ())
    {
        return (!$vars["user"]->has_cap ("administrator")) ? true
            
: /* Else what s2Member says. */ $what_s2_says;
    }
?>

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: December 19th, 2011, 11:01 am
by sergiobet
Nice work!!!

That's pretty good, now it's working.

Thank you so much for your help!

Very nice plugin and excellent support!

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: January 3rd, 2012, 7:25 pm
by angelar
Hello. I am loving s2 member so far :D . I am having a problem with how these 2 pages are being displayed. I am using s2 free version and weaver 2.26 themes (which they say is compatible).

On the login welcome page - http://hawaiiloversonlyclub.com/welcomelogin/ guarded by s2 as loginwelcome
and on the membership options page - http://hawaiiloversonlyclub.com/memopt/ ‎(which is the member option page with s2). My sidebar widgetsare being pushed all the way down to the bottom of the page. It is not happening on any of my other pages that are s2protected, it only seems to be happening with these 2 pages.

it should look like this page - http://hawaiiloversonlyclub.com/hloclub/ and all the pages are set up the same in the theme.

I did view it as a subscriber and it looks fine, could it just be an admin issue?



Any ideas?

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: January 3rd, 2012, 7:33 pm
by angelar
oops, I was wrong. When I signed in as a paying subscriber, level 1 the membership options page looks funny with the sidebar. see shot.

s2problem.png


I dont know if you would be willing to look at it from the admin side for me.

Thanks,
Angela

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: January 4th, 2012, 6:35 pm
by Raam Dev
Hi Angela,

Comparing the source HTML of those two pages, I can see where the problem lies.

Here's the working page:

Code: Select all
<html lang="en-US" dir="ltr">
   <head>
   <body class="page page-id-67 page-template-default custom-background">
      <div id="wrapper" class="hfeed">
         <div id="header">
         <div id="main">
            <div id="container" class="container-page">
            <div id="primary" class="widget-area" role="complementary">
         </div>
         <div id="footer">
      </div>
      <div id="fb-root">
      <script type="text/javascript">
   </body>
</html>


Notice how the primary DIV, which is your sidebar, is inside the main DIV (which is the white area).

Now on the broken page, look where the primary DIV (the sidebar) shows up:

Code: Select all
<html lang="en-US" dir="ltr">
   <head>
   <body class="page page-id-67 page-template-default custom-background">
      <div id="wrapper" class="hfeed">
         <div id="header">
         <div id="main">
         <div id="primary" class="widget-area" role="complementary">
      </div>
      <div id="footer">
      <div id="fb-root">
      <script type="text/javascript">
   </body>
</html>


Now it's outside the main DIV, which is what's making the sidebar appear underneath the main white area.

Are you using a different WordPress page template for the Membership Options page? Can you tell us how your WordPress theme is generating the sidebar? If it's using a non-standard way of generating the sidebar, that could be screwing things up when s2Member protects the page.

A quick test to see if this is theme-related would be to temporarily switch to the default TwentyTen theme.

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: January 4th, 2012, 7:01 pm
by angelar
Raam Dev wrote:Are you using a different WordPress page template for the Membership Options page? NO - the same as others Can you tell us how your WordPress theme is generating the sidebar? not sure what this means If it's using a non-standard way of generating the sidebar, that could be screwing things up when s2Member protects the page.

A quick test to see if this is theme-related would be to temporarily switch to the default TwentyTen theme.


Hello. Im not sure what the above quote means about generating the sidebar. It is working correctly on the other pages (that are also protected but not in the same way as chosen from a drop down menu in the initial setup for welcome and login pages).

If I switch to the default twentyten theme will that mess up all of my changes to my site? I have been working very hard on this and I dont want to lose anything.

Could I just change the code to the proper way above?

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: January 4th, 2012, 8:55 pm
by Raam Dev
angelar wrote:It is working correctly on the other pages (that are also protected but not in the same way as chosen from a drop down menu in the initial setup for welcome and login pages).


Could you clarify that? Are you saying that s2Member-protected pages that are protected using the s2Member Widget on the edit page/post screen are showing up fine, but core s2Member pages like the Membership Options page and the Login Welcome page are showing the problem with the sidebar?

angelar wrote:Could I just change the code to the proper way above?


Unfortunately all of that code is generated by WordPress, so there isn't an easy way to just go in and "change it". :( It's better if we figure out what's causing the problem in the first place.

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: January 4th, 2012, 9:04 pm
by angelar
I figured it out, finally!!! It was my own fault Im not used to shortcodes. :roll: I didnt C + V when I put in some shortcodes, I redid the page and its fixed. Thats, what I get, I generally code everything myself :>
Thanks for your help Raam!!

Re: Login Welcome Page Conflicts? Watch this video.

PostPosted: January 4th, 2012, 9:16 pm
by Raam Dev
You're most welcome, Angela! I'm glad you figured it out. :) Let us know if there's anything else we can help with.