State68

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).

Programming basics for Drupal themers

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

I'm currently working with a graphic designer who wants to do Drupal theming. I've been taking her through the theming basics (I'm not a themer, as anyone whose seen any of my sites will already know, but I do know how the theme system works) and the problem we've hit is that she's not really done any computer programming before.

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.

SystemRescueCd is the best thing ever

Posted 10/30/2009 - 18:27 by State68

I occasionally do a bit of tech support work. It's well paid, and relatively stress free and straightforward. Usually.

A couple of weeks back a client asked me to have a look at his Dell Vista box. It was running slowly - the usual things; Spyware, cluttered registry, a load of old temp and swap files - so I set to cleaning it up. It soon became apparent that the OS was well behind the times in terms of updates, so I started going through those, too.

Fine-grained user profile permissions

Posted 08/20/2009 - 22:29 by State68

I'm developing a module that gives fine-grained user profile permissions: see http://drupal.org/node/546188 for more information.

The attached zip file is the 0.0.0.1 dev release of the User Profile Access module - totally untested, pretty hacky and potentially dangerous; use at your own risk. I'll post newer version as I develop the module. Eventually I'd like to get a proper contrib module on CVS, but as this module requires patching user.module I'll have to wait a little while for that.

Changing the position of Flags in the node edit form

Posted 08/12/2009 - 14:10 by State68

Using the Flag module it is possible to add flags to your node edit forms. For example, you might want to give your users the option of flagging a node for review by a senior editor, or flagging a node as complete but in need of subediting.

Syndicate content