Support

Home Forums Event Espresso Premium Message Template Variations Procedure

Message Template Variations Procedure

Posted: February 11, 2015 at 11:51 pm

Viewing 14 reply threads


Lawrence Le Lievre

February 11, 2015 at 11:51 pm

Dean from the Support Staff on 1/8/15 wrote:

“I received some further feedback from the developers. Due to upcoming changes to the messaging system in EE4.5.0 we will not be able to fix this issue, as in 4.5.0 it will not exist as the the filter will be deprecated.
Instead there will be a different way to handle template variations.”

Now that 4.6 has been released, what is this “different” way to handle template variations? In other words, how would one make changes to email_main_default.css, email_preview_default.css and email_wpeditor_default.css without having the changes overwritten during upgrades? Your system of message templates is very difficult and time consuming to deal with, and this information would help. Thank you.


Lawrence Le Lievre

February 12, 2015 at 12:07 am

I found what I believe to be an error in your email_main_default.css on lines 162 and 163. You forgot to remove “#ee-message-preview-container” from those lines, which is why the actual sent email message has incorrect formatting (one of the issues I?m trying to deal with). Even moreso, I need to know how to change these files without having them overwritten, as I have to change the error in your email_main_default.css file to get my messages to format properly. Thank you.


Darren Ethier

February 13, 2015 at 10:23 am

Hi Lawrence, here are some developer docs that may help you accomplish what you desire to do:

http://developer.eventespresso.com/docs/introducing-message-template-packs-and-variations-overview/
http://developer.eventespresso.com/docs/registering-a-messages-template-variation/
http://developer.eventespresso.com/hooks/fhee__ee_messages_template_pack__get_variation/

If you are just looking to replace a single css file, that last doc will likely be the most useful for you. However, if you are adding additional options for the templates, the docs on adding variations will be helpful because then users can pick different css per message template to use via the dropdown.

Regarding the css error you found, you are correct that appears to be a bug. I’ve created a ticket for that and will see that a fix gets in one of the next releases (hopefully the next one). Since you appear to be familiar with code, I suggest you request access to our github repo (https://eventespresso.com/developers/request-repo-access/) as you can fix things and submit pull requests which generally get much quicker turnaround for minor bug fixes such as this.

Hopefully that documentation is helpful for you!

  • This reply was modified 9 years, 8 months ago by Darren Ethier.


Darren Ethier

February 13, 2015 at 12:21 pm

Hey Lawrence, just a heads up that the fix for the css issue you reported will be in the next release.


Lawrence Le Lievre

February 13, 2015 at 12:53 pm

Hi Darren, thanks for the reply. After checking out the documentation you provided, it looks like it?s too much work to implement changes the way it?s been setup now. You have to be a PHP programmer to pull it off, which I?m not. A simple method of creating common headers and footers would be all many of us would need.

BTW, that last link you cited, http://developer.eventespresso.com/hooks/fhee__ee_messages_template_pack__get_variation/, as far as I know, does not work anymore. I believe it?s been deprecated per Dean from the Support Staff. Is this true or does that hook still work in the latest version of EE4?


Lawrence Le Lievre

February 13, 2015 at 12:59 pm

It looks like that hook still works – thanks! Could I get an quick example swapping out the email_main_default.css for another file, let’s call it email_test_default.css in the wp-content/uploads/espresso/css directory? Thank you!


Darren Ethier

February 13, 2015 at 1:06 pm

BTW, that last link you cited, http://developer.eventespresso.com/hooks/fhee__ee_messages_template_pack__get_variation/, as far as I know, does not work anymore. I believe it?s been deprecated per Dean from the Support Staff. Is this true or does that hook still work in the latest version of EE4?

The filter Dean referenced WAS deprecated and replaced by the one I linked to. So as you’ve discovered, the one I linked to does work, it was introduced with 4.6.

I’m unable to do a snippet example for you right now but I’ve made your request known to the support staff so there will likely be someone in here to help you within 12 hours.


Lawrence Le Lievre

February 13, 2015 at 1:23 pm

Thank you – that would make dealing with the CSS of the message system much more like a child theme type of situation. I appreciate your time.


Josh

  • Support Staff

February 16, 2015 at 7:40 pm

Hi there,

A little update: The #ee-message-preview-container styles are removed in Event Espresso 4.6.7.p.


Lawrence Le Lievre

February 16, 2015 at 9:04 pm

Thanks for the warning, but if this is the case, that the filters to access message CSS files are constantly being changed, then what’s the point of using the filter? EE badly needs a permanent child system in place that will not break or be changed every other month. Changing the look of the messages without access to a global CSS file is difficult at best, and one can’t use global CSS with your messaging system because of the fear of the files being overwritten. Also, global header and footers for the messages would save a huge amount of time and is very important. Thank you.


Josh

  • Support Staff

February 16, 2015 at 10:00 pm

Hi Lawrence,

I’m sorry, I think you misunderstood what the update included, so I’ll try to be more clear. The update did not change any of the filters that access message CSS. They are not constantly being changed. The point of the filter is so that developers can programmatically allow for more message theming than what’s built in.

In your earlier reply in this topic you wrote:

I found what I believe to be an error in your email_main_default.css on lines 162 and 163. You forgot to remove “#ee-message-preview-container” from those lines, which is why the actual sent email message has incorrect formatting.

So here is what was done for this release: The “#ee-message-preview-container” was removed from lines 162 and 163.

Thanks again for reporting!


Lawrence Le Lievre

February 18, 2015 at 3:55 am

OK – sorry for the misunderstanding. If any support staff has time to do the snippet I needed mentioned previously in this post, it would be greatly appreciated. Thank you.


Josh

  • Support Staff

March 4, 2015 at 5:35 pm

Hi Lawrence,

I’m sorry for the delay. Support staff has been swamped with general support for the last few weeks and we’ve not had much time to dive into coding up custom code snippets.

In Darren’s earlier reply he recommended to sign up for github access. One cool thing about the development version of Event Espresso on github is it includes a test folder. In that test folder is a readymade Message Template pack that you can use to get started on adding your own custom stylesheets for messages.


Lawrence Le Lievre

March 6, 2015 at 4:06 pm

Thanks for the tip! I can’t find the Message Template Pack though. Once I’m in event-espresso-core/tests in Github, where do I find this?


Lorenzo Orlando Caum

  • Support Staff

March 6, 2015 at 7:56 pm

Hi Lawrence,

Could you try this location?

event-espresso-core/tests/mocks/addons

Thanks


Lorenzo

Viewing 14 reply threads

The support post ‘Message Template Variations Procedure’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso