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™

Login Welcome Page Conflicts? Watch this video.

Common Questions/Problems/Tips. Posted by Administrators & Support Reps.

Re: Login Welcome Page Conflicts? Watch this video.

Postby Jason Caldwell » December 19th, 2011, 10:55 am

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;
    }
?>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Login Welcome Page Conflicts? Watch this video.

Postby sergiobet » December 19th, 2011, 11:01 am

Nice work!!!

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

Thank you so much for your help!

Very nice plugin and excellent support!
User avatar
sergiobet
Registered User
Registered User
 
Posts: 7
Joined: December 17, 2011

Re: Login Welcome Page Conflicts? Watch this video.

Postby angelar » January 3rd, 2012, 7:25 pm

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?
User avatar
angelar
Registered User
Registered User
 
Posts: 11
Joined: December 26, 2011

Re: Login Welcome Page Conflicts? Watch this video.

Postby angelar » January 3rd, 2012, 7:33 pm

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
User avatar
angelar
Registered User
Registered User
 
Posts: 11
Joined: December 26, 2011

Re: Login Welcome Page Conflicts? Watch this video.

Postby Raam Dev » January 4th, 2012, 6:35 pm

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.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Login Welcome Page Conflicts? Watch this video.

Postby angelar » January 4th, 2012, 7:01 pm

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?
User avatar
angelar
Registered User
Registered User
 
Posts: 11
Joined: December 26, 2011

Re: Login Welcome Page Conflicts? Watch this video.

Postby Raam Dev » January 4th, 2012, 8:55 pm

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.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Login Welcome Page Conflicts? Watch this video.

Postby angelar » January 4th, 2012, 9:04 pm

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!!
User avatar
angelar
Registered User
Registered User
 
Posts: 11
Joined: December 26, 2011

Re: Login Welcome Page Conflicts? Watch this video.

Postby Raam Dev » January 4th, 2012, 9:16 pm

You're most welcome, Angela! I'm glad you figured it out. :) Let us know if there's anything else we can help with.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Previous

Return to Common Questions/Problems/Tips

Who is online

Users browsing this forum: No registered users and 1 guest

cron