State68

Contributing simple patches to Drupal.org using Git

Posted 06/03/2011 - 21:20 by State68

The Drupal community thrives on being a "do-ocracy": if you encounter a problem with some aspect of Drupal - a module, a theme, or Drupal core itself, for example - you can, and should, try to fix the problem yourself.

Installing Git on Mac OS X using Macports (in other words, the easy way)

Posted 04/18/2011 - 15:43 by State68

This tutorial shows you how to install the Git version control system on a Mac. It assumes a little familiarity with the Command Line. If you don't know how to use the Command Line, then check out Addison Berry's excellent series of video tutorials over at lullabot.com: you can find the first one here and the rest here.

Migrating a Drupal 6 site

Posted 10/08/2010 - 12:20 by State68

Migrating a Drupal site from one development platform to another can be a real pain. Nicole Bluto wrote a great blog post for the 2009 LA Drupalcamp on how to migrate a Drupal 6 site cleanly:

http://www.drupalcampla.nicolebluto.com/node/3

Here's a distilled, step-through version of that post, tested between two OS X accounts, both running XAMPP:

The export

  1. Download and install http://drupal.org/project/backup_migrate
  2. Navigate to admin/content/backup_migrate

Getting subthemes to inherit custom theme settings

Posted 04/14/2010 - 19:44 by State68

One of the great things about the Drupal 6 theme system is that it's possible to make sub-themes of themes that already exist. This means that if you like a particular theme but want to make a few tweaks you don't have to hack around in the theme itself: just create a sub-theme, make the tweaks there and you're done.

Clearing Drupal's cache to recover from WSODs

Posted 04/01/2010 - 02:24 by State68

One of the most frustrating things that can happen when you're building a Drupal site is for the site to go blank - entirely blank, so whenever you load the site you're presented with the infamous White Screen of Death.

There are loads of tips on that page that will help you recover from a WSOD, but the three most common causes are:

  • Issues with PHP memory limits (there's some stuff about that here).

Coding basics for Drupal themers

Posted 01/28/2010 - 19:00 by State68

Most people who don't need to code never have to learn how to code, and live their lives in bissful ignorance. This includes people like graphic designers who use a computer every day to do pretty technical things: Photoshop, for example. But when they come to do Drupal theming, these same people need to know a load of coding fundamentals that aren't covered in even the most basic PHP tutorials.

Filtering a view to show only content created by the current user

Posted 01/15/2010 - 12:58 by State68

This is very straightforward, but I always forget how to do it. I'm writing this post in part so that I have something to refer back to :-).

So, in order to filter a view so that it only shows content that has been created by the currently logged-in user:

  1. Create the view!
  2. Add an argument for User: Uid
  3. Under "Action to take if argument is not present", select "Provide default argument" and then "User ID from logged in user".
  4. Hit Update, then save your view. You're done!

Using themable functions to control the output of a view

Posted 01/02/2010 - 03:32 by State68

Earlier this year I built my first non-trivial Drupal site. It's pretty simple on the surface, but allows certain users to create nodes which represent a piece of work they've done for the organisation. using Views and Views Calc and a bit of custom code, these nodes are used to produce invoices for each of these users every month.

A couple of bash scripts to aid Drupal 7 installation

Posted 11/30/2009 - 09:05 by State68

I'm spending quite a bit of time writing and reviewing patches for Drupal 7 at the moment. The installation process is great, but there are still a couple of bits of repetitive work that I had to do every time I installed, like setting permissions and creating folders.

I've written a couple of bash scripts to automate this. Put them in the next level up from your drupal 7 site's root: for example, if your drupal7 install is at /Applications/XAMPP/xamppfiles/htdocs/drupal7, put the scripts in /Applications/XAMPP/xamppfiles/htdocs.

Simple step-through PHP debugging on a Mac with XAMPP, XDebug and MacGDBp

Posted 11/23/2009 - 15:18 by State68

Earlier this year I needed to make a bit of money so I developed a database app in Filemaker. In many ways I found it a real pain to use - selecting each line of the code you want to write from a clickable list is far from ideal - but its limitations meant that debugging was really straightforward: use the built-in step-through debugger, follow everything through, find the bug, fix it.

Syndicate content