HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Change link urls in the confirmation email

Hi,

I have an embedded Vanilla forum in my site. I have enabled email confirmation. That is, a user who applies for membership should confirm by clicking on the link sent via email. The link url in the confirmation email redirects the user to the full-screen vanilla forum and not my site which has the embedded forum. So, I need to change the link urls to my site webpage which contains the embedded form. How can I do this?
Please suggest.

Thanks in advance..

Comments

  • hgtonighthgtonight ∞ · New Moderator

    What version of Vanilla are you running?

    I am overly familiar with embedded forums, but you should be able to get away with a locale definition for 'EmailConfirmEmail'.

    This is a suggested definition:

    $Definition['EmailConfirmEmail'] = 'You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: http://www.example.com/forums/entry/emailconfirm/{User.UserID,rawurlencode}/{EmailKey,rawurlencode}';
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    JohnDoyle
  • Thank you for the reply hgtonight. I will try it out. I run Vanilla version 2.0.18.2
    I could find a locale definition file at vanillaFolder/locales/skeleton/other_definitions.php. I hope this is the place I need to add the $Definition['EmailConfirmEmail'].

  • LincLinc Detroit Admin

    In your config.php, add this:

    $Configuration['Garden']['ExternalUrlFormat'] = 'http://site.com#/%s';

    Replacing "site.com" with the URL of the page your forum is embedded in. Everything from the # onward must stay the same. E.g. if the page is site.com/forum, it would be: 'http://site.com/forum#/%s';

    AdrianhgtonightUnderDogJohnDoyle
  • It is probably obvious but if you need to dissect the link with php instead of javascript you can change the format to something like this:


  • I am trying to do the same thing and change the URL so that it points to my embedded URL within Wordpress.

    Which one of these methods worked best?

  • peregrineperegrine MVP
    edited February 2014

    @pwolfe said:

    I am trying to do the same thing and change the URL so that it points to my embedded URL within Wordpress.
    Which one of these methods worked best?

    Unfortunately, since the op never responded back as to whether they were successful or not with any solution. I see your conundrum.

    If one were going to work through this thread logically.

    You have one post by one of the people who writes the vanilla software. So I would try this one.
    http://vanillaforums.org/discussion/comment/187389/#Comment_187389
    especially since it refers to the url. Another possilble indicator is it got 3 positive reactions (notice that people click on reactions).
    If that doesn't work try this - generally this is used for changing wording.
    http://vanillaforums.org/discussion/comment/187280/#Comment_187280

    And if you are using an old version of vanilla - you could try this (depending on your version the line numbers will change.).
    http://vanillaforums.org/discussion/comment/170455/#Comment_170455

    since you didn't mention your version of vanilla you are using, its hard to tell which may work for you.

    As you can see responding back on success as well as clicking on reactions for ideas that helped - may help future people reading discussions

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • well

  • pwolfepwolfe New
    edited February 2014

    I am using Vanilla version: 2.0.18.10

    First, I tried the first recommended option of adding the line of code to the config.php file...

    ($Configuration['Garden']['ExternalUrlFormat'] = 'http://site.com#/%s';

    That sent me to the correct embedded URL of the forum within my Wordpress theme, however it never confirmed the email. The message in the box at the bottom of the browser keeps appearing: 'You need to confirm your email address. Click here to resend the confirmation email'. So that method sends users in a continuous loop without getting confirmed access to the forum.

    Since that didn't work, I tried editing the definitions.php file with this line of code...

    $Definition['EmailConfirmEmail'] = 'You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: http://www.example.com/forums/entry/emailconfirm/{User.UserID,rawurlencode}/{EmailKey,rawurlencode}';

    That sent me to my Wordpress theme, but my Wordpress site shoots back an ERROR 404. PAGE NOT FOUND message.

    So those two methods were unsuccessful. Perhaps the first one is closest if that continuous loop issue can be resolved with a quick fix to one of the files, but I'm not sure how to do that or what to edit.

  • peregrineperegrine MVP
    edited February 2014

    .

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • pwolfepwolfe New
    edited February 2014

    Well, since those three strategies don't seem to be working for me I am wondering if there is a way to customize the 'emailconfirm.php' landing page. When users click to confirm their email address they get sent to this page that is a URL outside of the embedded Wordpress theme.

    On this page, I am thinking of simply adding a link BACK TO the embedded version of the forum in the Wordpress theme after the confirmation message, "Your email has been successfully confirmed."

    The only problem with this is that I have the upper bar of links (Discussions, Activity, Inbox, Username, Sign Out) of the embed-friendly Vanilla Forums theme appearing at the top where users could access.

    So my question is... could there be a way to remove these links ONLY on the emailconfirm.php file so it only shows the confirmation message (and the link back to the Wordpress site)?

Sign In or Register to comment.