1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Email Templates

Discussion in 'XenForo Suggestions' started by digitalpoint, Jul 10, 2012.

  1. digitalpoint

    digitalpoint Well-Known Member

    There are a few issues here...

    1. Email templates are hard-coded to be blue... At the very least, shouldn't they be using the style variables like @PrimaryLight?

    2. Admin templates aren't saved as files when you have that option, so there ends up being a lot of PHP code that needs to be compiled on the fly rather than being able to use an opcode cacher (any time the system sends an email).

    3. This is more an overall thing, but why are admin templates completely separated from normal templates? We end up with two totally different systems that ultimately serve the same purpose. To make it worse, the admin template system isn't kept in-line with the normal templates. Wouldn't it make more sense to have one consolidated template system and just have an "admin" flag for admin templates? Then we could edit and search admin templates (which include non-admin things like outgoing emails) as well as the advantages as having admin templates (and emails) saved as files so the opcode cachers can do their magic...
    sheel, ncbetz, omds and 46 others like this.
  2. ragtek

    ragtek Guest

  3. digitalpoint

    digitalpoint Well-Known Member

    Actually, I did a little poking around... there are actually THREE separate template systems in XenForo that all do the same thing... normal templates, admin templates and email templates... each with their own tables and such.
    HWS and (deleted member) like this.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Valid suggestions. Moving to suggestions.

    1) I agree with this.

    2) The setting specifies that only public templates are written as files. Admin templates don't matter for performance. But I suppose you could argue for email templates being written as files.

    3) They are similar but slightly different data structures. For example, admin templates don't have styleids.
    Adam Howard likes this.
  5. jmurrayhead

    jmurrayhead Well-Known Member

    Anything else other than style IDs? That's a very small difference to not be able to leverage the same system. Style IDs could simply be left as null, for example, for admin templates.
  6. Ashley Adams

    Ashley Adams New Member

    Can't they just be combined as they seem to be the same thing just for different type of users?
  7. Adam Howard

    Adam Howard Well-Known Member

    This actually could explain the load requirement when rebuilding the templates.
  8. Carlos

    Carlos Well-Known Member

    I think the developers thought it would be confusing...
  9. DBA

    DBA Well-Known Member

    Well this sucks, upgraded to 1.1.3 the other day and overwrote my email template changes. :mad:
  10. digitalpoint

    digitalpoint Well-Known Member

    Ewww... email template changes get overwritten? Didn't know that. Yuck.
  11. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    Yes, they are .....
    My ugly workaround, I wrote a cron job that replaces the email template on the database, daily, because I am not going to remember to update the email templates every time I upgrade
    HWS likes this.
  12. digitalpoint

    digitalpoint Well-Known Member

    Were you editing the "customizable" templates or the master templates? What is the point of even having customizable email templates if they get overwritten?
  13. DBA

    DBA Well-Known Member

    There are two types of email templates? I thought the only option were the ones under the developer tab.
  14. digitalpoint

    digitalpoint Well-Known Member

    Yeah, but you can toggle between master and customizable there.
  15. Jeremy P

    Jeremy P Well-Known Member

  16. DBA

    DBA Well-Known Member

    You referring to this?


    So if I click "Show Customizable Templates" and edit those they shouldn't get overwritten?
  17. digitalpoint

    digitalpoint Well-Known Member

    That's my understanding...
  18. tommydamic68

    tommydamic68 Well-Known Member

    Glad to see there are others with the same concern- hope it is incorporated sooner than later.
  19. s.molinari

    s.molinari Well-Known Member

    Reinvigorating this thread. It's nice to finally have html emails. However, I just ran into the same experience Shawn had. Why aren't email templates

    1. in the normal templating system?
    2. have to be reached in debug mode?
    3. don't use any style properties (aka hardcoded styling)?
    4. have any decent way to test changes made to them?

    Email templates need rethinking.:)

    Jeremy P, Freelancer, thumped and 9 others like this.
  20. Martin Vium

    Martin Vium Member

Share This Page