Blog Archives

Sort “Select an existing field” options in Drupal by Label instead of Type

Normally Drupal sorts the “Select an existing field” select list by the field types. Here’s an example of what this looks like: This looks good at first glance, but often it’s hard to quickly find the field you want to

Tagged with: , ,
Posted in Development

Keyboard Maestro URL Handler – Link Injection

Introduction This post outlines some advanced usage of the Keyboard Maestro URL handler (KMLink). A few weeks ago I was automating some Chrome form filling with Keyboard Maestro. It occurred to me that the perfect trigger for what I was

Tagged with: , , , , , ,
Posted in Development, Tech Tips

Userscript: Hulu Right-Click for Pop Out Video

Hulu’s default rather large video player is usually too big for my needs. I prefer the “Pop Out” player. So, I often load the large video, click the cog wheel, move my mouse to the “popout” link, click it, then

Tagged with: , ,
Posted in Development

Maintaining Lightbox2 Templating

Lightbox2 is a very popular and powerful Drupal module. One of the helpful features is that you can render a Drupal node in a lightbox rather easily in either PHP or HTML. View detailed explanation. The issue is that when you click

Tagged with: , , , , , ,
Posted in Development

Make menu header a link to its first child link

We use menu block a lot to create sidebar menus with specific depths, starting points, etc. The following snippet shows how we can use jQuery to turn a normal <h2> tag into a link. The link’s destination will be the

Tagged with: ,
Posted in Development

How to check if a jQuery plugin is loaded

The following snippet is one way to determine if a jQuery plugin is loaded an available. There are probably other ways to achieve the same behavior, however this one never seems to fail me.

 

Tagged with: ,
Posted in Development

Open All External Links in a New Window/Tab using jQuery

… and to match two urls/domains/whatever:

 

Tagged with: ,
Posted in Development

Add Javascript to a Specific Page

There are several ways to add javascript code to a page in Drupal. The method outlined below involves a modification to your theme’s template.php file. You’ll be editing (and un-commenting if necessary) your theme’s preprocess_page function. This basically lets you

Tagged with: , , , ,
Posted in Development

Dynamic and AJAX-driven Select Lists in Webform

This example is a two-for-one deal! I’m going to demonstrate how to dynamically populate a webform select list on page load dynamically populate a webform select list based upon the value chosen in another webform select list For both parts of

Tagged with: , , , , , , , ,
Posted in Development