the singularity of being and nothingness
Posts tagged Plugin

CKEditor Plugin: Redux
Jan 21st
In my last post, I showed how it’s not only possible, but also pretty dang easy to make a custom CKEditor plugin that can interact seamlessly with a module. While it worked pretty well in modern browsers, it completely bombed on older versions of Internet Explorer (surprise, surprise).
The main *problem* with older IE support is the use of a custom html tag (<fiddle>) to store the complex data type in CKEditor. Not only does CSS styling on this unknown element fail in <IE8, but it’s insertion into CKEditor also fails completely, presumably because of the old DOM implementation.
While annoying, this is hardly a deal killer. The choice to use a “fiddle” element was hardly required…I did it because I wanted to. However, in the spirit of backward-compatibility, I’ve updated the plugin to work with a plain-old <div>.
Without further ado, here are a relevant pieces that I’ve updated:
EntryHelper.cfm (The File Where the Insertion Occurs)/* * Common method to prepare fiddles for insertion...and insert them * @inputs - collection of inputs */ function prepareFiddle( inputs ) { ... // create double-mustache syntax html += ' <div id="cbjsfiddle">jsFiddle - {1}'.format( vals[0], vals[1], vals[2], vals[3], vals[4], vals[5], vals[6], vals[7], vals[8] ); // insert into More >

ContentBox: Creating a CKEditor Plugin for Complex Data Types
Jan 19th
I recently developed a simple module for ContentBox called jsFiddle. Basically, it allows you to insert “fiddles” from the excellent http://jsfiddle.net into your posts and pages. In developing this module (and CKEditor plugin), I wanted to be able to insert complex data into the content editor, but then be able to re-edit that content after insertion. I’m pretty happy with how it turned out.
In the following paragraphs, I’m going to walk through the process of developing a ContentBox module that includes a CKEditor plugin which is capable of content re-editing. Hopefully this will inspire some others to develop some killer new ContentBox modules with helpful CKEditor plugins.
Some ContextNOTE: In this walkthrough, i will include snippets of code, but most of them will be severely trimmed for the purposes of this post. If you really want to follow along with the full code, please grab it from the GitHub repo. Furthermore, I’m not advocating that this is the “best” or “only” way to accomplish this. My only intention is to share some ideas about things that have worked for me. So if you have corrections or suggestions for how things can be done better, I’m always ready and willing for civil, constructive feedback 🙂
Before we More >

Woot! My First WordPress Plugin!
May 29th
Over the last week and a half, I have been working with an old co-worker of mine on a project that he started about a month (or so) ago: searchwebjobs.com. This site is a pretty cool job listings site that is really easy to browse for jobs.
In brainstorming how to make the site better, I suggested that we create a WordPress plugin that would allow others (presumably, CSS galleries…) to grab a feed of our jobs and display them on their site.
So, grabbing my PHP 5 manual (and dusting it off…), I set to work. Fortunately, I have had some recent exposure to WordPress, so I felt reasonably sure that something could be done.
In all honesty, I couldn't be more impressed with WordPress' support for plugins. Consider this: it took me–a complete idiot at PHP–only 3 hours to program then entire plugin from nearly scratch. Not bad.
The beauty of WordPress' plugin support–IMO–is the default database that is so easily exposed. Instead of having to create stupid PHP connections, that stuff already exists, so all you have to do is basically write SQL. Plus, there are a few native functions to WordPress that allow you to use a row More >