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

Changing the Follow the link below

edited November 2011 in Vanilla 2.0 - 2.8

I am running Vanilla 2 embedded into my website. I have EMailSubscribe running. When an email is sent to a user the URL has
Follow the link below to check it out:
http://www.mysite.com/vanilla/discussion/comment/21119#Comment_21119

I would like to change the url to show
http://www.mysite.com/forum#/discussion/comment/21119#Comment_21119

I would like it if my users when they click on a URL in an email would go to the embedded version of Vanilla.

Answers

  • edited December 2011

    I had to change two files.
    plugins/EMailSubscribe/default.php - Line 82

    applications/dashboard/models/class.activitymodel.php - Line 693

    $unchanged_message = sprintf(
    T($Story == '' ? 'EmailNotification' : 'EmailStoryNotification'),
    $ActivityHeadline,
    Url('/discussion/'.$DiscussionID.'/'.Gdn_Format::Url($DiscussionName), TRUE),
    $Story
    );
    $changed_message = str_replace('vanilla','forum#',$unchanged_message);
    $Email->Message($changed_message);
    
  • ToddTodd Vanilla Staff

    There is a better way to do this in your config:

    $Configuration['Garden']['ExternalUrlFormat'] = 'http://www.mysite.com#/%s';
    
  • Todd said:
    There is a better way to do this in your config:

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

    Where's the config file?

  • /conf/config.php

    There was an error rendering this rich post.

  • Do I add that line to the file? I am not seeing that as an option? I am running Version 2.0.18.

  • sahotataran said:
    /conf/config.php

    Thanks sahotataran!

    This only fixed the main link to the forum, however the confirmation link remained the same. Do you know of any fixes for that as well? Thanks

  • Hey soundgod1818,

    I added it to the file and replaced the URL.

  • Hi,

    I am also facing this same issue with embed version. I am using Vanilla Version 2.5.1 with jsconnect plugin. I added the following line to my config.php file to replace vanilla installation URL with Embed URL.

    $Configuration['Garden']['ExternalUrlFormat'] = 'https://mysite.com/forum#/%s';

    Whenever I use "ExternalUrlFormat" configuration, In "ConversationMessage" notification email action URL get encoded which leads to "Page Not found" upon link/button click.

    e.g

    https://mysite.com/forum#/messages/39#Message_195
    converts to
    https://mysite.com/forum#/messages/39%23Message_195

    Thank you.

Sign In or Register to comment.