Thursday, September 30, 2010

You Got CodeIgniter In My ExpressionEngine

Since the release of ExpressionEngine 2.0 I have been writing plugins for it like crazy. There have been a few frustrations here and there. Also some WTF moments when I look at the EE code (Have you seen how they do custom fields in the database?). Overall though I have had little trouble bending EE to my will.

Some neat plugins I have written which due to my current employment might be sold instead of given away despite my own personal wishes.

A simple input plugin that handles both get and post input values. (There are tons of these but I am particularly proud of how I was able to leverage CI for an extremely clean code set.)

A field injection plugin which takes on EE field and puts it into another at a specified position. 

A simple email plugin that sends an email out. (There are tons of these)

A module to populate a channel via CSV. This one probably took me the longest and is the most complex, it also brought to the surface a code bug in EE that I made a bug ticket for you can read more about it here:

I also wrote a plugin that is an extremely simple shopping cart implementation it is unique in that it doesn't have any kind of check out methods or anything of that nature it is just a cart (as the plugin's name implies). This was quite a challenge because for some reason EE does not grant access to a users session. They actually override the CI implementation which despite many complaints still remains true. I was able to get around this by copying CI's session library and renaming it, then using it as a custom library. I documented all the steps involved here:

After working out that session stuff I made a plugin around that as well.

All in all having CI to fall back on (in most cases) makes plugin writing for EE a dream. It is amazingly easy to get EE to do whatever you want, and you already have a powerful CMS on your hands.

No comments:

Post a Comment