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.

Change the content of the Private message notification?

What file do I edit to change the content of the Private message notification? I want users to be able to login to check the message and make it a little more secure.

Comments

  • Welcome to the community!

    What version number of Vanilla are you running?

    Are you looking to not show the body of the message in the email?

    If so, you can disable that in 2.0.18.11 by adding the following definition to your /conf/locale.php file:

    $Definition['EmailStoryNotification'] = "%1\$s\n\n%2\$s";
    

    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.

  • nrmnrm New
    edited April 2014

    It is 2.0.18.11. Can you please shed some light or point me to where I can find the definitions for these variables?

  • Open up /conf/locale.php or create it if necessary. Then put the above definition in that file. If you had to create the /conf/locale.php file, you should paste the following in there:

    <?php if (!defined('APPLICATION')) exit()
    $Definition['EmailStoryNotification'] = "%1\$s\n\n%2\$s";
    

    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 you are asking how I figured out what to put in there, I will explain myself. I searched for the notification method of new conversation messages. I found that it uses the activity model to send notifications. From there I saw it uses a translatable string along with sprintf() to add the body text.

    Knowing this, I set up a translation definition using the key I found, 'EmailStoryNotification'. I changed it from the original ""%3\$s\n\n%2\$s" to the above. The new definition is passed back to the sprintf() which no longer has a place to put the body text of the message.

    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.

  • Awesome Thank you for the explanation.

Sign In or Register to comment.