Forums

Join
bbPress Support ForumsTroubleshootingChange the URL in registration e-mail

Info

Change the URL in registration e-mail

  1. When users register on my bbPress installation, they receive a URL to login. Except the URL to login is the bbPress install location, not the URL of the bbPress install as it sits inside my WordPress site design. How can I change the URL in that e-mail?

    If that wasn't clear, here's what I mean. The registration e-mail is forwarding users to http://www.chengduliving.com/bbpress but where I want them to go is http://www.chengduliving.com/forum

    Thanks!

  2. It's because your bbpress install is in a different directory than your WP
    You can try copying this to .httaccess

    '
    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^([^.:]+\.)*chengduliving.com/bbpress\.?(:[0-9]*)?$ [NC]
    RewriteRule ^(.*)$ http://www.chengduliving.com/forum/$1 [R=301,L]
    '

    If that dosn't work try here:
    http://en.wikipedia.org/wiki/URL_redirection

  3. Isn't it better to locate the file which is sending the data?

    I will look into this as well.

  4. I added that bit to .htaccess and it doesn't seem to have changed anything. Perhaps it takes time to take effect? Here's what my .htaccess looks like:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^([^.:]+\.)*chengduliving.com/bbpress\.?(:[0-9]*)?$ [NC]
    RewriteRule ^(.*)$ http://www.chengduliving.com/forum/ [R=301,L]
    
    # END WordPress
  5. Any ideas on how to fix the link in that e-mail?

  6. @chengdu living I tried locating the file, but didn't find it.

  7. I'm still trying to fix this problem!! The URL redirection didn't work for me but I think a better fix would be to change what's output in the registration e-mail, if that's possible!

    If anyone has a solution I'd be eternally grateful!

  8. Have you looked at bb-includes/functions.bb-users.php?

    In

    function bb_send_pass( $user, $pass ) {
    	if ( !$user = bb_get_user( $user ) )
    		return false;
    
    	$message = __("Your username is: %1$s \nYour password is: %2$s \nYou can now log in: %3$s \n\nEnjoy!");
    
    	return bb_mail(
    		bb_get_user_email( $user->ID ),
    		bb_get_option('name') . ': ' . __('Password'),
    		sprintf($message, $user->user_login, $pass, bb_get_uri(null, null, BB_URI_CONTEXT_TEXT))
    	);
    }

    have you tried changing the bb_get_uri(null, null, BB_URI_CONTEXT_TEXT) to your web address?

  9. Thanks for your help Tom,

    How would I add my web address into that line? I tried the following but it gave me an error:

    sprintf($message, $user->user_login, $pass, http://www.chengduliving.com/forum/)

    Thanks!!

  10. Try putting quotes around your address.

    i.e. sprintf($message, $user->user_login, $pass, "http://www.chengduliving.com/forum/")

  11. That worked!

    Thank you so much for your help, Tom!!!

    :D :D :D

  12. Glad I could help out.

    Be aware that this is 'core hack'. If/when an upgrade comes out that will be overwritten.

  13. Tom :D i want to thank you for your support

  14. You must log in to post.