41 pointsStarting to get into this DEV thingI'm new here
Terrintokyo
Member
—
1st September 2010
Hi:
I am having trouble with BP-Scholar Child theme registration page and the S2 Member plugin: the Signup Button" on the site is pointing to the BuddyPress registration page.
What should happen:
a. person pays for registration via http://www.hoopinstructors.com/signup/: they choose their registration level and are sent to PayPal.
b. after a successful checkout has occurred through PayPal, they get access to: http://www.hoopinstructors.com/register/
Where they finish the registration process. This page should never be seen at any other time in the process.
c. they get their confirmation email and sign into the site.
I went back to the S2Member plugin developer, who tested it with me until he came to this conclusion:
I. On a default installation of BuddyPress, it would work like this:
Open Registration = off
Your BuddyPress theme would detect this, and automatically disable all Signup Buttons/Links.
You would place a link to your Membership Options Page into the navigation bar somewhere instead.
II. In your case, your theme ( it would appear ) is not detecting that Open Registration is off. So it's creating a confusing situation, where there are links pointing to both /signup/ and to /register/.
III. I think the majority of the confusion here, is with the BuddyPress /register/ page. In most BuddyPress themes, the "Signup" links ( i.e. the /register/ links ) will be disabled automatically whenever Open Registration is disabled. However, there are many BuddyPress themes that just assume registration will be open ( because that's normally how BuddyPress is used ). In your theme, the Signup Button remains, even when Open Registration is off.
IV. So, here is what I suggest.
One of two things:
1. Modify your BuddyPress theme, by changing all references to /register/ over to /signup/. Thereby pointing the Signup Button to your Membership Options Page.
2. Alternatively, you could go into the BuddyPress plugin file:
/buddypress/bp-core/bp-core-signup.php
Find these lines: /* If the user is logged in, redirect away from here */
if ( is_user_logged_in() )
bp_core_redirect( $bp->root_domain );
/* If signups are disabled, just re-direct */
if ( !bp_get_signup_allowed() )
bp_core_redirect( $bp->root_domain );
And change them to this instead: /* If the user is logged in, redirect away from here */
if ( is_user_logged_in() )
bp_core_redirect( S2MEMBER_LOGIN_WELCOME_PAGE_URL );
/* If signups are disabled, just re-direct */
if ( !bp_get_signup_allowed() )
bp_core_redirect( S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL );
I am having trouble with BP-Scholar Child theme registration page and the S2 Member plugin: the Signup Button" on the site is pointing to the BuddyPress registration page.
What should happen:
a. person pays for registration via http://www.hoopinstructors.com/signup/: they choose their registration level and are sent to PayPal.
b. after a successful checkout has occurred through PayPal, they get access to: http://www.hoopinstructors.com/register/
Where they finish the registration process. This page should never be seen at any other time in the process.
c. they get their confirmation email and sign into the site.
I went back to the S2Member plugin developer, who tested it with me until he came to this conclusion:
I. On a default installation of BuddyPress, it would work like this:
Open Registration = off
Your BuddyPress theme would detect this, and automatically disable all Signup Buttons/Links.
You would place a link to your Membership Options Page into the navigation bar somewhere instead.
II. In your case, your theme ( it would appear ) is not detecting that Open Registration is off. So it's creating a confusing situation, where there are links pointing to both /signup/ and to /register/.
III. I think the majority of the confusion here, is with the BuddyPress /register/ page. In most BuddyPress themes, the "Signup" links ( i.e. the /register/ links ) will be disabled automatically whenever Open Registration is disabled. However, there are many BuddyPress themes that just assume registration will be open ( because that's normally how BuddyPress is used ). In your theme, the Signup Button remains, even when Open Registration is off.
IV. So, here is what I suggest.
One of two things:
1. Modify your BuddyPress theme, by changing all references to /register/ over to /signup/. Thereby pointing the Signup Button to your Membership Options Page.
2. Alternatively, you could go into the BuddyPress plugin file:
/buddypress/bp-core/bp-core-signup.php
Find these lines: /* If the user is logged in, redirect away from here */
if ( is_user_logged_in() )
bp_core_redirect( $bp->root_domain );
/* If signups are disabled, just re-direct */
if ( !bp_get_signup_allowed() )
bp_core_redirect( $bp->root_domain );
And change them to this instead: /* If the user is logged in, redirect away from here */
if ( is_user_logged_in() )
bp_core_redirect( S2MEMBER_LOGIN_WELCOME_PAGE_URL );
/* If signups are disabled, just re-direct */
if ( !bp_get_signup_allowed() )
bp_core_redirect( S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL );
@Terrintokyo: Scholar uses exactly the same method as the default theme - if you can get it to work in that and not Scholar I will happily look at if there is an issue in Scholar. I think you will find perhaps though that the plugin developer is a little misleading in claiming it's normal when they suggest you edit core BuddyPress files - not exactly the theme :)
However, that doesn't help you much really. Therefore I suggest you test using the default BuddyPress theme and get back to me about the results on that and we take from there. I understand when someone blames a theme so lets work through this here as much as we can without having you bounced between us and them. Sound good?
Sounds great! I want to launch on Friday, so it'll be wonderful if this is easily identified...I am backing up my public_html folder now, and will switch to BuddyPress and report back what happens.
just to recap (as much for myself), what should happen is:
a. person pays for registration via http://www.hoopinstructors.com/signup/: they choose their registration level and are sent to PayPal.
b. after a successful checkout has occurred through PayPal, they get access to: http://www.hoopinstructors.com/register/ where they finish the registration process. This page should never be seen at any other time in the process.
c. they get their confirmation email and sign into the site
So, since this is a default BuddyPress problem too, it looks like it's not the theme, but I wonder if you have any ideas on what I might do to fix it?
@Terrintokyo: Unfortunately if the steps the plugin developer provided you were both done and still didn't work you may have to go back to them to at least inform them the default BuddyPress theme is also experiencing this one. My thoughts are perhaps it's the version of BuddyPress - is it updated to the latest one?
Sadly I was sort of hoping that it wouldn't work in the default theme as the plugin developer was hinting at this - you'd assume they'd have tested in that :( If it is then it is configuration or an issue with the setup / compatibility. Sorry to suggest you ask them but we do need clarification if you've tried their steps. I would perhaps suggest you try their steps with the default BuddyPress theme - have you?
We have some membership plugins ourselves that may be useful for you though if you hit a brick wall with that plugin developer.
Thanks for your note: I spent almost 2 weeks trying the Membership plugin and finally had to give up as there were too many problem with the release candidate. That's why I switched to S2 Member, and, other than this issue, it has worked really well so far.
I'll take your advice and pass the issue back to the plugin developer - I didn't try their steps with the default theme, but that seems like one way to figure out what is wrong.
Yes, I know it's in final release. After going through that whole process of trying to understand what was going wrong, I think I just need too much hand-holding for WPMUDev: which is understandable, as this is a forum for 'Devs';-) I'm more of a highly-motivated amateur: there are huge holes in my knowledge, and I'm learning as quickly as I can, but I also have a client to work with and limited time.
Jason, the S2 Member developer is going into the dashboard to check things out and fix the problem - that's the kind of help I need on something so critical and it's not appropriate to expect it here.
I love BP-Scholar, and have a few WPMUDev plugins, as well. I just need to learn a lot more.
I think I'm figuring out a temporary fix, but I do need a bit of help: how can I change the url that the Sign-up button goes to? I looked at sign-up.php, but it's a mass of difficult code - all I want to do is change the link that the button goes to.
I pasted the code in, but what happened was that:
1. the sign-up graphic disappeared and was no longer a link
2. the Admin bar sign up text still goes to the home page.
just to make sure, here's the form code before I made the change: <?php else : ?>
Are you seeing the same result? I'm looking at it in Chrome, and I always clear my cache before checking....I'm sure it's my fault, but not sure what to do next...
@Terrintokyo: Ok lets step back - what exactly in simple terms are you trying to do and where did you see this would work / who said to do this? Lets get all the information and full picture here please if we can.
1. In the header, there are 2 Sign Up buttons, 1 at the very top in the Admin bar, and one under that.
2. When someone who is not logged in clicks either button, I want them to be taken to the sign up page, which is this one: http://www.hoopinstructors.com/signup/
3. Right now, clicking either of those buttons takes the person to either the home page (if the redirect plugin is on): http://www.hoopinstructors.com/
4. Or, they are taken to the registration page (if the redirect plugin is off): http://www.hoopinstructors.com/register
5. So, what I wanted to do is edit the url that the Sign up buttons link to and have them both link to: http://www.hoopinstructors.com/signup/ regardless of anything else.
Does that make more sense? again, sorry I'm not making things clearer.
<?php if ( bp_get_signup_allowed() ) : ?>
<a href="http://www.hoopinstructors.com/signup/"
title="Create an account">Sign up</a>
<?php endif; ?>
As for the admin bar that's a bit more complex you would have to probably edit buddypress/bp-core/bp-core-adminbar.php but I'd strongly recommend you do not as you will have to remember on upgrade and probably have issues with this.
Perhaps you have the wrong settings on the redirect plugin if that is what is causing you issues but you were saying it was a different plugin causing issues.
Whatever, I still think that doing this is probably the wrong way to go about it but you are the one working with that developer so I leave it up to you.
Another route as said would be to change the define / set it in the config:
You rock! the code part worked for the member-box sign-up button! Now, if you can just let me know how to get the button graphic back where it should be, that would be super awesome!
Now that I know that it works for the button (once the I have the image back in), I'll see if the Admin bar change happens if I change the register slug in config.php.
I'll let you know what happens.
it's such a relief that the big Sign up button goes to the right place!
Responses (17)
Theme Designer — 1st September 2010 #
@Terrintokyo: Scholar uses exactly the same method as the default theme - if you can get it to work in that and not Scholar I will happily look at if there is an issue in Scholar. I think you will find perhaps though that the plugin developer is a little misleading in claiming it's normal when they suggest you edit core BuddyPress files - not exactly the theme :)
However, that doesn't help you much really. Therefore I suggest you test using the default BuddyPress theme and get back to me about the results on that and we take from there. I understand when someone blames a theme so lets work through this here as much as we can without having you bounced between us and them. Sound good?
Member — 2nd September 2010 #
Hi Tammie:
Sounds great! I want to launch on Friday, so it'll be wonderful if this is easily identified...I am backing up my public_html folder now, and will switch to BuddyPress and report back what happens.
thanks again.
Terri
Member — 2nd September 2010 #
Hi Tammie:
Okay, here we are:
Your suggestion was to see if the same problem exists in BuddyPress default theme.
1. BuddyPress Default activated
2. clicking the Sign Up button leads again to http://www.hoopinstructors.com/register
3. entering the url: hoopinstructors.com leads to http://www.hoopinstructors.com/register instead of to the home page
4. entering http://www.hoopinstructors.com leads to http://www.hoopinstructors.com/
5. clicking Join Hi leads to: http://www.hoopinstructors.com/signup/?s2member_level_req=1
just to recap (as much for myself), what should happen is:
a. person pays for registration via http://www.hoopinstructors.com/signup/: they choose their registration level and are sent to PayPal.
b. after a successful checkout has occurred through PayPal, they get access to:
http://www.hoopinstructors.com/register/ where they finish the registration process. This page should never be seen at any other time in the process.
c. they get their confirmation email and sign into the site
So, since this is a default BuddyPress problem too, it looks like it's not the theme, but I wonder if you have any ideas on what I might do to fix it?
thank you very much.
Theme Designer — 2nd September 2010 #
@Terrintokyo: Unfortunately if the steps the plugin developer provided you were both done and still didn't work you may have to go back to them to at least inform them the default BuddyPress theme is also experiencing this one. My thoughts are perhaps it's the version of BuddyPress - is it updated to the latest one?
Sadly I was sort of hoping that it wouldn't work in the default theme as the plugin developer was hinting at this - you'd assume they'd have tested in that :( If it is then it is configuration or an issue with the setup / compatibility. Sorry to suggest you ask them but we do need clarification if you've tried their steps. I would perhaps suggest you try their steps with the default BuddyPress theme - have you?
We have some membership plugins ourselves that may be useful for you though if you hit a brick wall with that plugin developer.
http://premium.wpmudev.org/project/membership
http://premium.wpmudev.org/project/supporter
Member — 2nd September 2010 #
Hi Tammie:
Thanks for your note: I spent almost 2 weeks trying the Membership plugin and finally had to give up as there were too many problem with the release candidate. That's why I switched to S2 Member, and, other than this issue, it has worked really well so far.
I'll take your advice and pass the issue back to the plugin developer - I didn't try their steps with the default theme, but that seems like one way to figure out what is wrong.
Thanks,
Terri
Theme Designer — 2nd September 2010 #
@Terrintokyo: Are you aware the membership plugin is now in final release? It was in beta before - perhaps that could solve your issue.
Member — 2nd September 2010 #
Hi Tammie:
Yes, I know it's in final release. After going through that whole process of trying to understand what was going wrong, I think I just need too much hand-holding for WPMUDev: which is understandable, as this is a forum for 'Devs';-) I'm more of a highly-motivated amateur: there are huge holes in my knowledge, and I'm learning as quickly as I can, but I also have a client to work with and limited time.
Jason, the S2 Member developer is going into the dashboard to check things out and fix the problem - that's the kind of help I need on something so critical and it's not appropriate to expect it here.
I love BP-Scholar, and have a few WPMUDev plugins, as well. I just need to learn a lot more.
Thanks, though,
best,
Terri
Member — 4th September 2010 #
Hi Tammie:
I think I'm figuring out a temporary fix, but I do need a bit of help: how can I change the url that the Sign-up button goes to? I looked at sign-up.php, but it's a mass of difficult code - all I want to do is change the link that the button goes to.
Looking forward to your help.
thanks,
Terri
Theme Designer — 5th September 2010 #
@Terrinktokyo: Hmm sounds a weird fix you can edit includes/member-box.php:
<?php if ( bp_get_signup_allowed() ) : ?>
<?php printf( __( 'Sign up', 'buddypress' ), site_url( BP_REGISTER_SLUG . '/' ) ) ?>
<?php endif; ?>
However this won't solve links apart from the header one to the sign up form.
You could edit BP_REGISTER_SLUG in the config file but to be honest I have never done that so can't really comment on the implications.
Member — 5th September 2010 #
Hi Tammie:
Thanks very much.
maybe, in my newbieness, I'm not expressing it well.
please see the attached screenshot I took with Firebug.
my question is: where can I find the link to the header sign-up button and sign-up text in the admin bar that now goes to http://www.hoopinstructors.com/register, as in the screen shot, and change just that url for those two places only to http://www.hoopinstructors.com/signup/ in the source code?
appreciate your patience and help,
best,
Terri
Theme Designer — 5th September 2010 #
@Terrintokyo: I told you the place :) includes/member-box.php has that code for you the code I pasted in just change that.
Member — 5th September 2010 #
Hi Tammie:
Oh! I may have done it wrong, sorry.
I pasted the code in, but what happened was that:
1. the sign-up graphic disappeared and was no longer a link
2. the Admin bar sign up text still goes to the home page.
just to make sure, here's the form code before I made the change:
<?php else : ?><?php do_action( 'bp_before_sidebar_login_form' ) ?>
<form name="login-form" id="login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login' ) ?>" method="post">
<label><?php _e( 'Username', 'buddypress' ) ?>
<input type="text" name="log" id="userbar_user_login" class="input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="12" /></label>
<label><?php _e( 'Password', 'buddypress' ) ?>
<input type="password" name="pwd" id="userbar_user_pass" class="input" value="" size="12" /></label>
<span class="forgetmenot"><label><input name="rememberme" type="checkbox" id="userbar_rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ) ?></label></span>
<?php do_action( 'bp_sidebar_login_form' ) ?>
<input type="submit" name="wp-submit" id="userbar_wp-submit" value="<?php _e('Log In'); ?>" tabindex="100" />
<input type="hidden" name="redirect_to" value="<?php bp_root_domain() ?>" />
<input type="hidden" name="testcookie" value="1" />
<?php if ( bp_get_signup_allowed() ) : ?>
<?php printf( _ _( 'Sign up', 'buddypress' ), site_url( BP_REGISTER_SLUG . '/' ) ) ?>
<?php endif; ?>
</form>
and here's the form code after I made the change:
<?php do_action( 'bp_before_sidebar_login_form' ) ?><form name="login-form" id="login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login' ) ?>" method="post">
<label><?php _e( 'Username', 'buddypress' ) ?>
<input type="text" name="log" id="userbar_user_login" class="input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="12" /></label>
<label><?php _e( 'Password', 'buddypress' ) ?>
<input type="password" name="pwd" id="userbar_user_pass" class="input" value="" size="12" /></label>
<span class="forgetmenot"><label><input name="rememberme" type="checkbox" id="userbar_rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ) ?></label></span>
<?php do_action( 'bp_sidebar_login_form' ) ?>
<input type="submit" name="wp-submit" id="userbar_wp-submit" value="<?php _e('Log In'); ?>" tabindex="100" />
<input type="hidden" name="redirect_to" value="<?php bp_root_domain() ?>" />
<input type="hidden" name="testcookie" value="1" />
<?php if ( bp_get_signup_allowed() ) : ?>
<?php printf( _ _( 'Sign up', 'buddypress' ), site_url( BP_REGISTER_SLUG . '/' ) ) ?>
<?php endif; ?>
</form>
I've put the modified members-box.php back into bp-scholar includes.
Are you seeing the same result? I'm looking at it in Chrome, and I always clear my cache before checking....I'm sure it's my fault, but not sure what to do next...
Thank you!
best,
Terri
Theme Designer — 5th September 2010 #
@Terrintokyo: Ok lets step back - what exactly in simple terms are you trying to do and where did you see this would work / who said to do this? Lets get all the information and full picture here please if we can.
Member — 5th September 2010 #
Hi Tammie:
No problem -sorry if I'm not being clear.
I've put back the original members-box.php, so we're all clear.
Here's the problem:
http://www.hoopinstructors.com
1. In the header, there are 2 Sign Up buttons, 1 at the very top in the Admin bar, and one under that.
2. When someone who is not logged in clicks either button, I want them to be taken to the sign up page, which is this one: http://www.hoopinstructors.com/signup/
3. Right now, clicking either of those buttons takes the person to either the home page (if the redirect plugin is on): http://www.hoopinstructors.com/
4. Or, they are taken to the registration page (if the redirect plugin is off): http://www.hoopinstructors.com/register
5. So, what I wanted to do is edit the url that the Sign up buttons link to and have them both link to:
http://www.hoopinstructors.com/signup/ regardless of anything else.
Does that make more sense? again, sorry I'm not making things clearer.
hopefully,
thanks,
Terri
Theme Designer — 6th September 2010 #
@Terrintokyo: Hmm not tried it but should be able to just do this:
Becomes:
As for the admin bar that's a bit more complex you would have to probably edit buddypress/bp-core/bp-core-adminbar.php but I'd strongly recommend you do not as you will have to remember on upgrade and probably have issues with this.
Perhaps you have the wrong settings on the redirect plugin if that is what is causing you issues but you were saying it was a different plugin causing issues.
Whatever, I still think that doing this is probably the wrong way to go about it but you are the one working with that developer so I leave it up to you.
Another route as said would be to change the define / set it in the config:
http://wpmu.org/daily-tip-customize-the-url-slugs-of-buddypress-components/
You can add a url to the BP_REGISTER_SLUG define.
Member — 6th September 2010 #
Hi Tammie:
You rock! the code part worked for the member-box sign-up button! Now, if you can just let me know how to get the button graphic back where it should be, that would be super awesome!
Now that I know that it works for the button (once the I have the image back in), I'll see if the Admin bar change happens if I change the register slug in config.php.
I'll let you know what happens.
it's such a relief that the big Sign up button goes to the right place!
thanks so much,
best,
Terri
Theme Designer — 6th September 2010 #
@Terrintokyo: If you change the slug you don't need to change that link just change the slug and works for all cases.
Become a member