email notification change text color

  • Affected Version
    WoltLab Suite 5.4

    I'm assuming email notification text color is based on the style. My forum style has a dark background with light text, difficult to read in an email. How to change text color for emails only? Thanks.

    • Official Post

    Hi


    You can edit the CSS within the email_html template. However the full email design, including the background color, should adapt to the default style. Can you give an example screenshot of such an email?

    • Official Post

    Hi

    email_html is not editable.

    you will need to copy the template into the predefined “Email Templates” template group. Templates within the default group can never be edited.


    Your email does not look indeed. You can find the link color in this line: https://github.com/WoltLab/WCF…plates/email_html.tpl#L22. You can just replace this by color: #123456; with #123456 being an appropriate hex color code.

    • Official Post

    Hi

    When I copy and click submit I get this error.

    This looks like an overzealous mod_security module blocking your request for alleged security reasons. Please contact your web hosting provider to disable mod_security for you. It does not harm than it selbst.

    Also I don't see a color code to substitute in the template.

    I linked the specific line that is responsible, you should see it highlighted in yellow. The colors are being inserted dynamically, that's why you don't see an actual color code in the template.

  • Where do I replace it? It's not in the code of emai_html.

    Tim linked it for you and even marked the exact Spot.

    WCF/email_html.tpl at cd4a9de4c917e11cc0249d7b7e2e007d9d410705 · WoltLab/WCF
    WoltLab Suite Core (previously WoltLab Community Framework) - WCF/email_html.tpl at cd4a9de4c917e11cc0249d7b7e2e007d9d410705 · WoltLab/WCF
    github.com


    And now all you have to do is change this:

    color: {$style->getVariable('wcfContentLink', true)};

    To this:

    color: #123456; while you have to replace 123456 with your colorcode.


    Copy the whole template into the templategroup "Email Templates" and then make your change there

  • Copy the whole template into the templategroup "Email Templates" and then make your change there

    sorry but it looks like it does not work because you do not have the opportunity to choose "Email Templates" in style :?::?:

    Norwegian language files to (WSC 5.2 + 5.3 and The New WSC 5.4 + 5.5 ) *no.xml* Unofficial Language Packs

  • It´s realy not that hard...

    Go to yourwebsite/acp/index.php?template-list/ or navigate to Customization --> Templates

    Into the "name" field on the right enter: email_html click submit and you will see now exactly 1 template-file. Click on the Icon on the left of it: "copy template"

    In the dropdown "template group", choose "email templates"

    Go to the mentioned line 22 and change color: {$style->getVariable('wcfContentLink', true)}; to color: #123456; while you change 123456 to your desired color.


    sorry but it looks like it does not work because you do not have the opportunity to choose "Email Templates" in style

    This template is applied to all styles automatically, thats why every color is declared as variable. You can change the variable in the code too. wcfContentLink is the currently used one.


    After your changes, click on submit and you are done....

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!