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

Email Templates

digitalpoint

Well-known member
#1
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...
 

digitalpoint

Well-known member
#3
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.
 

Jake Bunce

XenForo moderator
Staff member
#4
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.
 

jmurrayhead

Well-known member
#5
3) They are similar but slightly different data structures. For example, admin templates don't have styleids.
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.
 

digitalpoint

Well-known member
#12
Were you editing the "customizable" templates or the master templates? What is the point of even having customizable email templates if they get overwritten?
 

DBA

Well-known member
#13
Were you editing the "customizable" templates or the master templates? What is the point of even having customizable email templates if they get overwritten?
There are two types of email templates? I thought the only option were the ones under the developer tab.
 

s.molinari

Well-known member
#19
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.:)

Scott