You are here


Moving Files Around A Node

Corey Pennycuff's picture
plupload image
Image from

When building websites, we use a lot of smoke-and-mirrors to get things accomplished, and we often do it by re-purposing preexisting functionality and code. Once the page is themed, who will be the wiser, right? Unfortunately, a seemingly straightforward idea can become unwieldy when you are unfamiliar with the underlying APIs involved. Such was the case for me when I needed to be able to programmatically move a file from one file field to another in Drupal 7.

My Latest Project: Integrating Drupal and DreamHost DreamObjects

Corey Pennycuff's picture
DreamHost DreamObjects image
Image from DreamHost.

For a recent project, I needed to find a good, reliable, and inexpensive cloud storage solution to integrate with my Drupal site. As we know, developers are creatures of habit, and we often reuse the same solutions for similar problems. In looking for cloud storage solution, I first went to the two main competitors: Amazon S3 and Rackspace.

I don't want to spend a lot of time on this topic, but I will say, first of all, that both companies are excellent choices and well-respected providers of cloud storage service. Both of them even have similar pricing. As it turns out, pricing was the major issue and the Achilles' heel of my project. In the worst case scenario, it was just too expensive to use either of them for cloud storage, and in the best case profits would be too slim to offset the worst-case threat.

Comparing Two Algorithms In A Limited Memory Environment

Corey Pennycuff's picture
Arduino TVout library showing a maze

We are wasteful in modern computing, mainly in the area of memory and computing power. Both are so inexpensive that we (I mean programmers) become careless about how much we use of either. All of that changed for me, however, when I started playing with an Arduino.

This is a quick post comparing two different ways of solving a simple problem, yet with precious little resources. In my case, I found the TVout library for Arduino and decided to try to make a maze generation program. That's when everything I learned about structured programming went out the window.

Pruning the Taxonomy Term Tree Widget

Corey Pennycuff's picture
Taxonomy Term Tree Widget
Image from

Taxonomy is a great tool in Drupal for categorizing information, unfortunately it is not often very "pretty" for the end user to interact with. Taxonomy Term Tree Widget addresses this deficiency by generating a pleasant, familiar tree structure from the target vocabulary's terms and their corresponding hierarchies. There is one problem, however, and that is that it is very difficult to filter the visible terms programmatically. The list can be filtered using a view (a setting accessible in the widget configuration form) however such a simplistic approach may not be flexible enough for most applications.

Make HTML Form Navigation Behave Like A Spreadsheet

Corey Pennycuff's picture

If necessity is the mother of invention, then clients are the source for interesting programming problems, and the need to solve those problems are a never-ending source of discovery for programmers. Such was the case for a recent project in which a lot of data had to be entered quickly and efficiently into an HTML form. The customer was accustomed to using spreadsheets, and wanted, most specifically, for the form to replicate the action of a spreadsheet when pressing enter. To put it plainly, they wanted the focus to go to the next row when they pressed enter.

The normal behavior for a form is that the browser will submit the form when enter is pressed (unless the element is a multi-line text area). Preventing this is easy enough using jQuery's keypress() event and listening and acting on the keyboard input as appropriate.


Subscribe to RSS - blogs