Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change the URL in registration e-mail

  • @chengdu-living

    Participant

    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!

Viewing 12 replies - 1 through 12 (of 12 total)
  • @jumpmuz

    Participant

    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

    @chandersbs

    Member

    Isn’t it better to locate the file which is sending the data?

    I will look into this as well.

    @chengdu-living

    Participant

    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/$1 [R=301,L]

    # END WordPress

    @chengdu-living

    Participant

    Any ideas on how to fix the link in that e-mail?

    @chandersbs

    Member

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

    @chengdu-living

    Participant

    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!

    @tomdebruin

    Participant

    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 nnEnjoy!");

    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?

    @chengdu-living

    Participant

    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!!

    @tomdebruin

    Participant

    Try putting quotes around your address.

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

    @chengdu-living

    Participant

    That worked!

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

    :D :D :D

    @tomdebruin

    Participant

    Glad I could help out.

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

    @esteroizi

    Member

    Tom :D i want to thank you for your support

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar