markupboy

Latest Notes

Listening to DOM Events

Working on a recent project, I ran into an issue with 1password autofill causing unexpected results with a form I’d built. I needed to know what browser events were being fired on a specific field in order to debug the problem. There are a few options here - bind an event listener in-code to every conceivable event and then log the arguments passed to the console to see what the event happened to be or better yet, just use monitorEvents.

Recent versions of webkit browsers and firebug support the monitorEvents method, which takes a DOM object as it’s only argument and will spit out every event occurring on that object to the console. So you can run a bit of code like so

    monitorEvents(document.getElementBy('someid'))

where someid is the id of the thing you want to monitor and you’re all set without ever having to touch your own code.

Practical Tips for Custom Plugin Development: EECI 2012

I’ll have a more extensive write up later (thought EE Insider’s write-up is pretty good on its own), but I wanted to put up a quick note that my slides and companion code are available online.

You can view the slides over on Speaker Deck and a repository for the code has been created over on GitHub.

Thanks to everyone that made it out!

Alfred Goes Back to Your Mac

With the introduction of iCloud, Apple quietly did something pretty special for nerds like me with a ton of machines - Back to My Mac was finally free.

Sure, you could open up finder, find your remote machine in the “Shared” list, click on it, wait, and then click on “Share Screen” or we can just use Alfred.

With this little extension installed, just fire up Alfred and plug in vnc followed by the name of a machine you have Back to My Mac setup on and that’s it, you’ll be screen sharing in no time.

Download the Back to My Mac Alfred Extension

Single Entry

Single Entry

Have you ever had a channel in an ExpressionEngine installation that required its own set of custom fields, but only needed one entry? Perhaps a homepage or an “About Us” section that needed its own custom content but wasn’t a traditional list of posts? Single Entry can help. With a few simple settings, your control panel can be set up to easily create and edit these posts without the risk of adding new and unnecessary entries to these channels.

Once configured, Single Entry moves your single entry channels out of EE’s standard publish and edit workflow and into a new section of your content dropdown. From there, you’ll have quick access to creating and editing the individual entries in those channels without the hassle of navigating through the standard EE edit workflow or accidentally creating a new entry in a channel that can’t use one.

Best of all, your data and development workflow aren’t changed in any way. Single entry channels are still completely native and can be assigned custom field groups, category groups and statuses, and used in templates just like always. And through the configuration panel, even the name of the new section in the content dropdown can be customized.

Single Entry is Viget’s first ever commercial ExpressionEngine Addon and available exclusively at Devot-EE

EECI 2012

The details for this year’s EECI were posted just yesterday and I can’t even begin to explain how excited I am to be speaking. Well, excited and terrified as there are a ton of really great speakers and, if last year in Brooklyn was any indication, one of the sharpest groups of attendees I’ve met at any conference.

For my part, I’ll be speaking about writing custom plugins for your projects. Everything from how to get started and the basics of plugin authoring to more advanced features and how to leverage some of ExpressionEngine’s CodeIgniter backbone to accomplish even more custom work without overburdening your templates with inline PHP.

See the rest of the notes →