blog

Jan 22 2011

Bootsrapping Drupal

by Joseph Smith

If you are using Drupal, someday you may find yourself wanting to grab or edit content in a Drupal system without actually having to go through Drupal to do it. It is easy to boostrap Drupal by doing the following. ...

Sep 05 2010

drupal_to_js() vs vanilla PHP json_encode() for conversion to JSON

by Joseph Smith

When needing to output JSON for a module I've been working on, I turned to drupal_json() and found this to be a very frustrating function to work with, as it simply doesn't seem to work. It's...

Jul 13 2010

Introducing drush, drush make and installation profiles

by Joseph Smith

One of the inherent weaknesses of Drupal is the setup time involved to get a project up and running. D7 has remedied this somewhat by adding many commonly used contributed modules to core, but the issue of setup/maintenance time does not stop there. ...

Jun 28 2010

Using MAMP Mysql from the command-line

by Joseph Smith

While attempting a DB export from a Drupal site via drush, I hit an obvious problem. OS X's mysql and MAMP's mysql are not equal. to access MAMP's mysql from the command line (and drush), you can create a .my.cnf file in your home directory and save the...

Mar 20 2010

"Requiring" Attributes in Ubercart

by Anya Petersen

Attributes in Ubercart can be "required", but what does this mean? My first impression was that I should check "required" if I did not want a user to be able to add the product to their cart without setting the value for that attribute. In fact, the attribute will...

Mar 05 2010

Quickly create template elements using drupal_get_path_alias()

by Joseph Smith

Often, when creating themes in Drupal, I find myself asking "is there a better way to add this <body> class or <h1>...