Gallery hook configuration
We do not store the images of our partners on our server side. If someone uploads an image to our gallery, we immediately upload it to our partner’s server. It means that there has to be an upload hook to be given on our side. There are two ways to configure it. The first option happens on the dashboard, but you can do it programmatically through our API as well.
On the screenshot above you can see the part of our dashboard on which you can configure the hooks and some other things as well. The two most important ones are the upload and the delete hooks. Without them, the gallery cannot be functional. If you want to implement copy functionality, then you should set up a copy hook as well. There are three other things that you can set up here. The first two are messages that will appear if someone reached the limit what you can set up in their groups, so I will talk about those in a separate post. The last option is that you can forbid your users to set urls of the images from anywhere. This way you can force your users to use only those pictures which are hosted by you. It can be useful if you don’t want your email to be spammy. (If there are lot of different domains referenced in your email, that is generally bad for your spam score.)
You might want to configure your gallery programatically. It is useful when you create a system or plugin or whatever that you want to set up on different domains. If you include gallery setup in your install script, that will save you a lot of time. You can do it via our API. You need to generate an admin token on your server side and you can call the gallery config routes.
Gallery hook security
When we send requests to the hooks that you provided, we send a userId, a hash and a timestamp. The hash is the md5 hash of the concatenation of your magic word and the timestamp we send. This way you can make sure that we sent the request and you can send back 403 if someone is trying with some nasty things.
There is one other very cool feature on the dashboard. We call it “basic skinning” and you can find it under the skinning menu item. Basically you can customize the colors of the editor itself per API key. You just have to pick seven different colors, which will define the color scheme associated to that API key. This feature is not yet available via our API, but we are planning to introduce it as well, since some of our partners have hundreds of API keys and it’s a pain if they have to change the colors manually for every API key.
That’s all folks, by now you should be able to integrate EDMdesigner into your system with functional gallery and the colors of the editor should be aligned with the color set of your application. I hope you find these posts useful. If you have any questions, please ask. If you want me to write a post about a certain topic, please let me know.
A Step-by-Step Guide to Sending Emails with PHP
In this comprehensive guide you will learn the ins and outs of sending text and HTML emails with built-in packages and email delivery services using PHP.Read more
How to Use a Templating Language in HTML Email Development
CSS Inliner Tools Worth Considering for Your Next Email
I hope you have never tried inlining CSS to your email code manually. Thankfully there are several CSS inliner tools. Check out their pros and cons.Read more