_fuchs
March 3, 2018, 10:11am
1
We want to modify user_notifications.reply_by_email
to achieve something similar to this:
To help transition listserv and email users to the online forum, I added the following footer to the reply-by-email notification. I thought I would share.
The email footer
View Thread or reply to this email. Your response will be posted to the site and emailed to the group.
Reply to sender privately about this topic.
Visit sender’s profile for more info.
Update your profile and set your email preferences.
View Email Tips for help on posting by email.
How to implement
Admin → Customize →…
While this worked fine editing the text is now impossible because topic_title_url_encoded
and username
are invalid now:
The following interpolation key(s) are invalid: “username, topic_title_url_encoded”
I suppose that this has to do with the validation (see Bulk Invite from File resets the Invite Forum Mailer customized text - #16 by tgxworld ). However i am not sure why username and the title url should not be in the e-mail response.
Additionally, topic_title_url_encoded
should be whitelisted but is still “invalid”.
By the way: Is there a list of (valid?) Interpolation keys?
Thank you very much
2 Likes
_fuchs
March 13, 2018, 9:41pm
3
Workaround:
TL;DR: Just Overreide the value in the Database
1. Make shure the user_notifications.reply_by_email has been customized in some way. (Just add gibblish)
2. Create a Backup just to make shure
3 Modify the Value in the Database
For a Docker Installation acces the Database using
docker exec -it --user postgres [name of Docker Container] psql discourse
Obviously replacing the name
Then run
UPDATE public.translation_overrides SET value =
'[Desired Text using all Interpolation Keys you want]'
WHERE translation_key = 'user_notifications.reply_by_email' AND locale = 'de';
The locale should match obviously.
That’s it. Interpolation keys work fine as long as you dont hit edit for user_notifications.reply_by_email.
2 Likes
tomtjes
(Thomas Reintjes)
February 11, 2019, 5:46pm
4
Once I figured out [name of Docker Container]
is app
for standard installations, this worked great.
Question: On the command line, how do you enter linefeeds in the [Desired Text using all Interpolation Keys you want]
?
I also have an issue with topic_title_url_encoded
: It doesn’t work as intended in the subject line. Screenshot: