Fork me on GitHub
  • Posted by skenow
  • Posted on 17/11/2013

Going Deeper: Preloads

Since we are now focusing on publishing patches for very specific features, there are lots of opportunities to go deeper under the covers of ImpressCMS and expand, strengthen and share what makes it so great. Patches aren't just quick fixes, they have a lot of value in so many ways. 

We need to bring attention to why someone would want to use ImpressCMS instead of another sytem, like Wordpress, Joomla!, Drupal or XOOPS. There is so much we have available to us, just waiting to be discovered!

learn more about ImpressCMSTake the recent patch for Smarty and the email protection feature as an example - it wasn't really a fix, just an update to an external library and a small improvement that makes future updates easier. And, it also separated some code we had added into Smarty that didn't need to be there. To accomplish this, we leveraged the preloads feature - custom actions you that can be triggered by events throughout the core.

Other platforms use different language to describe this feature - they are commonly called hooks, listeners, or events. ImpressCMS uses these triggers for some of our best features - custom tags, multilanguage, autotasks, and now - email protection.

I've already blogged about separating the email protection from Smarty, so I won't go into that much more. But, it does offer us a perfect opportunity to examine this powerful feature in the core, improve some of our documentation - in the code comments, the wiki and also provide a video to accompany them all.

So, after all that, here's what has come out of a single, simple patch - 

  • An update to an external library (Smarty)
  • A separation of email protection from the template engine (the template engine really has nothing to do with this)
  • Updated code documentation for preloads
  • Updated wiki information about preload events
  • A video explaining the basics of preloads


The comments are owned by the poster. We aren't responsible for their content.