• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Forum email notifications include needlessly long URLs

Terry_Kennedy

Aspiring Daemon

Thanks: 253
Messages: 874

#1
For example, I received a notification that there was a new reply to a post in a thread. The URL provided in the email was https://forums.freebsd.org/threads/kernel-panic-zio-c-line-270-freebsd-10-2-or-10-3.55123/. But https://forums.freebsd.org/threads/this-string-doesnt-do-anything.55123 or even https://forums.freebsd.org/threads/.55123 resolves to the same location. This can get even sillier if someone uses a really long title for the thread.

Given that the subject line of the notification email contains the thread title, which is repeated in the email body, is it really necessary to use such overly-long URLs in the notification email?

[In case anyone is wondering why I care, I may be the last person on the planet who doesn't read their email with a web browser, and these long URLs require multiple line cut-and-pastes to reconstruct the URL, where a short URL that fits entirely on one line (in my terminal emulation program) is a hotlink simply by holding the control key and clicking left-mouse.]
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 3,558
Messages: 13,856

#2
A web search suggests that easily-edited email templates are desired, and even that there are currently email templates, but there are no specifics on how to change them and they do not appear to be available from the admin panel.
 

Terry_Kennedy

Aspiring Daemon

Thanks: 253
Messages: 874

#3
A web search suggests that easily-edited email templates are desired, and even that there are currently email templates, but there are no specifics on how to change them and they do not appear to be available from the admin panel.
Thanks for checking. I just looked, too, and it seems like this is something that XenForo users / admins have been asking about for over 5 years now, and the answer still seems to be "turn on debug mode and then it's in the development tab". Ick.
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 3,558
Messages: 13,856

#4
There is an ugly alternative. You could use mail/maildrop to postprocess received mail, shortening the URLs.
 

Carpetsmoker

Daemon

Thanks: 180
Messages: 1,010

#5
There is an ugly alternative. You could use mail/maildrop to postprocess received mail, shortening the URLs.
Unleashing regular expressions on all your incoming emails. What could possibly go wrong?
 

jrm@

Daemon
Developer

Thanks: 438
Messages: 1,158

#6
In case anyone is wondering why I care, I may be the last person on the planet who doesn't read their email with a web browser, and these long URLs require multiple line cut-and-pastes to reconstruct the URL, where a short URL that fits entirely on one line (in my terminal emulation program) is a hotlink simply by holding the control key and clicking left-mouse.]
I also eschew the modern fandangle that is the graphical/web mail client. My workaround is to have a keybinding to toggle line wrapping. When I encounter a long URL, I turn off wrapping just so I can deal with it, then turn it back on.
 

Carpetsmoker

Daemon

Thanks: 180
Messages: 1,010

#8
I had a look at those developer templates on another Xenforo forum and I wouldn't wish that on my worst enemy. You're basically hand-crafting weird CSS-like templates with oddly placed whitespace in a small window.
I like to use "It's all text" to just launch a Vim session and edit in there. I've been doing MediaWiki templates as of late (you think you have it bad, hah!) and this is the only wayI can stay vaguely sane.
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator

Thanks: 2,493
Messages: 11,097

#9
I have deactivated this option:
Code:
Include Content Title in URLs
With this disabled, a URL such as /threads/my-thread.128/ would exclude the title and be output as /threads/128/
It seems to take immediate effect on the forums; we'll have to see what the email looks like. I hope that the old URLs on search engines link correctly.

Edit: the latter apears to be the case.
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 3,558
Messages: 13,856

#11
I kind of liked that thread links in the forum gave the user some idea of what they were about, though.