Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Change subjects of welcome, password reset, etc. emails

edited October 2011 in Questions
Which file needs to be edited to modify the subject of outgoing emails to users?

I primarily want to remove the [brackets] from around my Forum's name that appears in the subject line.

Thanks!

Answers

  • I think the ones you want are at /applications/dashboard/locale/en-CA/definitions.php

    I wouldnt change them there though, there are 3 other places to try (not sure which is best)

    /applications/vanilla/locale/en-CA/definitions.php

    /locales/skeleton/other_definitions.php

    /conf/locale.php

    all my translations are at /conf/locale.php. Good luck mate.
  • normally you rename the skeleton file. it is called skeleton because it is an example.

    There actually another two places, where translations can happen. Best leave anything in the applications folder. that is basically part of the core defaults. It gets replaced.

    Where you put it depend on what you want. You don't have to pick one necessarily.

    /conf/locale.php is totally global I prefer not use this personally.

    /locales/ I use this, you can have several locales, perhaps your site is multinational and has a switcher. This is what you enable through the dashboard.

    themes/theme_name/locale/ this is if you want terms to be linked to your theme, it might be that your theme has extra terminology that you want to be portable.

    plugin/plugin_name/locale/ much like above, but for plugins

    grep is your friend.

  • x00x00 MVP
    edited October 2011
    sometimes translations aren't in the locale files they are on the fly in the in the code. That is where grep comes in handy.

    grep -R --include="*.php" "T('[^']*\[" for clues.

    To override:
    $Definition['[%1$s] %2$s']='%1$s %2$s';
    $Definition['[%s] Invitation']='%s Invitation';
    $Definition['[%1$s] Membership Approved']='%1$s Membership Approved';
    $Definition['[%s] Welcome Aboard!']='%s Welcome Aboard!';
    $Definition['[%s] Password Reset']='%s Password Reset';
    $Definition['[%s] Password Reset Request']='%s Password Reset Request';

    grep is your friend.

  • Thanks guys. I've looked through all of those but can't find the one line that needs to be edited to change the subject line.

    By default, when a user gets an email, the subject reads:
    [My Forum Name] Change password blablablabla

    Where "My Forum Name" is the correct name of my forum.

    I simply want to remove the two brackets [ ] around my forum's name.

    Would you know the exact file/line that I should edit to accomplish this? I can't find it for the life of me :)

    Thanks!
  • First have you added the definitions above to your locale?

    I can't find anything like that are you sure you are not using a specific translation or plugin?

    The only reference to Change Password is in profile.

    grep is your friend.

  • edited October 2011
    Sorry, my last post was misleading. Here is an exact example of the email:

    * Here's the subject:

    [GM Authority Forum] WBodyFan commented on your discussion.

    * And here's the body:

    WBodyFan commented on your discussion.

    [Do we really need the Trailblazer?]
    This is where the comment text would go -- I've replaced it here to save space.

    ---
    Follow the link below to check it out:
    http://gmauthority.com/forum/discussion/comment/39#Comment_39

    Have a great day!

    * And that's the end of the email. I simply want to get rid of those pesky brakes around the forum name and discussion title.
  • I simply want to get rid of those pesky brakes around the forum name and discussion title.
    At first glance I would say:
    Install firefox and the firebug plugin of firefox. Right click on for example your discussion title and click on "Inspect element"
    You will see in which CSS file your element is styled.
    Most likely it's the line-height that is the problem in this case.

  • @sashok have actually put the definitions I gave you, that should do it.

    @UnderDog this is email not styling.

    grep is your friend.

  • Also I think you need to check

    $Configuration['Garden']['Title']

    and other plugin that you are suing.

    grep is your friend.

  • Here's a hack:

    Look for:

    $Email->Subject(sprintf(T('[%1$s] %2$s'), Gdn::Config('Garden.Title'), $ActivityHeadline));

    in aplications\dashboard\models\class.activitymodel.php

    Or just search for [%1$s] , and replace the [ ] with your delimiter of choice.

    Pamela
Sign In or Register to comment.