Customize elFinder in MODX Fred

Fred is a highly configurable frontend editor for MODX. With over 13K downloads, it's safe to say that it has taken off! One of the problems I recently encountered was configuring it to have some of the same image normalization standards I would normally use plugins like FileSluggy or a custom script for image handling. Since Fred uses elFinder for handling the image, it doesn't tap into the regular MODX system events. However, elFinder has it's own plugins that can be tapped into.  Create a custom plugin Fred exposes an event called "FredOnElfinderRoots"…

Extensions I replaced with Bookmarklets

I am often trying different browsers, and found that on of the biggest issues between switching is moving all of my extensions over. Especially if those extensions do not have a one-to-one alternative on said browser. It was during my time with Safari that I started to realize that quite a few of my "extensions" could be replaced with simple bookmarklets. In an effort to spread the word I will share a few of my really commonly used bookmarklets as well as how I create them.  Creating a Bookmarklet This is the easy part. Quite a few services that…

Increase Performance By Optimizing Output Filters In MODX

Why do I need to optimize Output Filters? Let's face it, we use output filters because they are easy. It's much more convenient to quickly add an :is= and a :then= than to build a whole new chunk or snippet. But where does that lead? A few months down the line you may realize those chains of output filters are piling seconds onto your response times. What is it actually hurting? Output filters increase parsing, especially if they are used haphazardly. Code left exposed between the ticks can still be processed even if it isn't being displayed…

The Cost of Being Hacked

An Ounce of Prevention is Worth a Pound of Cure Imagine waking up one day to the sound of a loud CRACK... CRASH! You are startled and run into your living room to find that a large oak tree has fallen onto your house. You go out and begin investigating only to realize the center of the tree has been hollowed out by carpenter ants. You had noticed them climbing up and down the tree this year, but couldn't have imagined the situation had gotten this bad.Now, you have to call a tree removal service, a contractor to fix your house, and figure out how…

Cache is as Good as Gold

Data processing is money, and waiting for responses can compound your site's request queue in high load situations. Whether you have a custom database or are working with external libraries, caching those responses is one of the easiest ways to speed up and scale your site. Utilizing $modx->cacheManger MODX has a built-in caching mechanism called cacheManger. This system has various functions, which can be invoked via a $modx->cacheManager call. One of the cool things about the cache manager is you have the ability to save cached responses anywhere.…