Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

Notifications going to forum URL, not Embed URL

v 2.3.1, embeded.

Hello, I have a forum embeded in a codeigniter site.

The URL's (linking to the topics) in the notification emails are going to the actual forum location.

I need them to go to the embed location URL.

Anyone know how to make that change?

Thanks,
Donovan

Comments

  • This is rather important for us and I can't seem to figure this out.

    To clarify, for example, on the email 'Commented On' Notifications, I am seeing something like this:
    [code]
    Site Name http://www.thedomain.com/pathtoforum/

    FirstName LastName commented on The Topic of Interest

    Check it out: http://www.thedomain.com.com/pathtoforum/discussion/comment/14#Comment_14
    [/code]

    I need this notification rather to be in the following format (referencing the embeded location instead of the actual location):
    [code]
    Site Name http://www.thedomain.com/forum/

    FirstName LastName commented on The Topic of Interest

    Check it out: http://www.thedomain.com/forum/#/discussion/comment/14#Comment_14
    [/code]

  • CaylusCaylus ✭✭
    edited February 15

    Hey Donovanb,

    Could you try setting $Configuration['Garden']['ExternalUrlFormat'] to something like "http://www.thedomain.com/forum/#/%s"?

    I believe the key lies in the externalUrl function in \library\core\functions.general.php, that contains this snippet:

        function externalUrl($path) {
            $urlFormat = c('Garden.ExternalUrlFormat');
    
            if ($urlFormat && !isUrl($path)) {
                $result = sprintf($urlFormat, ltrim($path, '/'));
            } elseif (stringBeginsWith($path, '//')) {
                $result = Gdn::request()->scheme().':'.$path;
            } else {
                $result = Url($path, true);
            }
    
            return $result;
        }
    
    R_J
  • 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.

  • You don't change the link.

    The best approach is to force embedding, which you can do in the the the embed settings in the dashboard. That way the page will redirect in the bowser to the embed. url.

    grep is your friend.

  • Thanks for the reply.
    I made the changes as you mentioned. Basically, it's not setting the exact embed forum link in the notification email but it redirects you to the embed forum page upon click on it.

    Is there any way we can also set embed forum URL instead vanilla installation link in all notification emails?

Sign In or Register to comment.