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.
Can I change subject and message [in email ], when vanilla send message to user
Arisrpl
New
Can I change subject and message [in email ], when vanilla send message to user
I try to change in applications\dashboard\models\class.activitymodel.php
but no effect,
thanks,
Tagged:
0
Comments
http://vanillaforums.org/discussion/23562/tutorial-how-to-customize-your-emails
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
thanks,
That tutorial describes how to modify the body of the email. I need to modify the Subject line.
The rationale here is very simple. I have a support forum, and the engineers are cc'ed on new posts. When they see "user123 has started a discussion" there's no hook that draws them to read the email, and so they ignore it. If, on the other hand, the subject was "user123: How do I transgrominate the frooblizer?" they'd immediately know whether the post was in their area of expertise.
I've got a few hacks that are making this happen, but, of course, the next time we upgrade I'll have to hack it again, which is suboptimal.
Hopefully I just missed something in that tutorial. Going to read it again a few times ...
You should be able to hook in to the activity model before notifications are sent and modify the subject.
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.
Followup: Thanks to @hgtonight, I've written the plugin that you can find at https://github.com/rbowen/VanillaMungeEmailSubject It can certainly stand to be improved, but scratches my immediate itch. I'm sure that someone more familiar with the Vanilla object model could make it more efficient, and I also want to get rid of the explicit references to activity type ID numbers, but for the moment, it works. Patches welcome.
So... I was going to issue a pull request. In looking in to this, the headlines are stored in the database. Even better than that, they are run through the translate function.
This means you can set them via definitions. Below are the defaults in a 2.0.18.8 installation.
I also decided to figure out what variables are available.
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.
IF we had a %12s that was the activity subject line, that would be ideal. I wonder if that's a better place to aim the plugin?
What do you mean by that? There are 9 activities that have headlines: RoleChange, ActivityComment, Import, ConversationMessage, AddedToConversation, DiscussionComment, DiscussionMention, CommentMention, and BookmarkComment.
You can set the actual headline to whatever you want through locale definitions.
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.
You can set them to a static string, right? Not to a runtime variable. Am I missing something? Can I do something there that sets it to the discussion subject line?
The discussion subject is not passed into activity headlines in 2.0.18.8, I do see it in later development versions though.
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.