meHi - welcome to my site. I am a web developer and partner in leafish.co.uk: providing dynamic sites and supported hosting based around Drupal.

I might randomly blurt out some Drupal ideas or code from time to time, or perhaps take some photos or write some stuff about other stuff for anybody out there who cares.

Role Weights gets Token support and a 6.x branch

22nd Jun
2009

Role Weights finally gets a bit of loving in the form of a 5.x-1.4 release with a couple of new features, namely Token support for a user's lightest and heaviest roles and the optional re-ordering of /admin/user/roles and /admin/user/access forms by role weight. These features were introduced in 5.x-1.3, however 5.x-1.4 also fixes a bug which left orphaned entries in the role_weights table after roles got deleted.

I've also branched for 6.x compatibility (at last) - snapshots from 6.x-1.x-dev should be functional and in line feature-wise with 5.x-1.4, bar Views 2 support. I'd love to improve Role Weights for 6.x: re-writing support for Views 2 and adding drag and drop re-ordering of roles being two areas that need some attention, but I'm just too darn short on time at the moment. As always, patches and reviews are welcome in the issue queue!

As a side note, I found this reference pretty useful regarding some function/API changes not mentioned elsewhere.

Dropping the x

27th Oct
2008

With just three days to go before the official launch of Ubuntu 8.10 and its variants, I've switched from Xubuntu (yet another Drupal site!) one to plain old Ubuntu. This is mostly because I spent an evening last week blitzing my laptop's hard drive and installing a vanilla Ubuntu 8.10 beta.

Xfce and Thunar were faves of mine way back when running SomeRandomDistro, which led me to using it on my Dell Inspiron 1501. Kudos should be given here to redDEAD over at Ubuntu on Dell Inspiron 1501 for all the tips. Things were reasonably good, but there seemed to always be issues. Broken ATI drivers, naff in-built Wi-Fi card, me being a mong, etc etc...

So far the beta (its now RC, folks) has been awesome. Pretty much all those niggles I had previously on this 'top have been fixed/addressed/alleviated/vanisherated:

  • Compiz, or probably the ATI/fglrx drivers, work without fuss or having something weird like one X session within another going on
  • volume control works, via the Fn keys or a panel icon
  • screen brightness adjustments works, via the Fn keys or a panel icon
  • network/wireless set up was easy, but I've yet to try WPA again (something was seriously afoot here with the inbuilt Wifi card)
  • Flash player for Firefox seems less crashy, was an issue getting this to work on an amd64

Depending on one's point of view, these could be down to (a) various things being fixed in the latest release; or perhaps more likely (b) me still being a bit of a noobus when it comes to Linux's innards and running a bodged up distribution on a piece of crap Dell.

Going wayback...

5th Oct
2008

Inspired by Google's 10th birthday and their 2001 search index, I had a poke around and found one of the very first web sites (or pages) I put together for local games company Jester Interactive.

Jester Interactive splash page

Archived version from the Web Archive.

Look! Curved corners in 2002 - I was so ahead of the times. Just don't ask me what I was on when I dreamed up that layout.

NexusFont

25th Aug
2008

nexusfont_fonts_image_0.pngSometimes my fonts directory can be a great source of inspiration when getting started designing a logo. For years I used The Font Thing which seemed to be one of the best freebies around for previewing custom text in multiple, selected fonts at once as well as managing, archiving and installing/uninstalling fonts.

Unfortunately, The Font Thing hasn't been updated since 1999 and was a little bit shaky when previewing folders with a large amount (500+) of fonts.

So, colour me chuffed when I took another look on SnapFiles and stumbled on NexusFont by xiles.

Simple permissions for uploads per node type

19th Aug
2008

Simple bit of Drupal module code from yesterday: permissions are provided for each node type which can have attachments, providing a more granular permission set based on node type. Then, we alter any node add/edit forms and set the #access property for the attachments part of the form based on these new permissions.

Check the code out after the break, hope its of some use somewhere. Does anyone have any thoughts on unsetting form elements like this? Is it a wise thing to do, or is there a better way? Cheers to those who commented, I've modified the snippet accordingly.

Listing authenticated users without roles

1st Jul
2008

Sometimes we'd like to list users who have registered with a Drupal site, but haven't been placed into any proper roles yet via subscriptions, purchases, membership approval or whatever.

Try this join query to get started:

  1. SELECT users.uid, name, created, access, login, status
  2. FROM {users}
  3. LEFT OUTER JOIN {users_roles}
  4. ON users.uid = users_roles.uid
  5. WHERE users_roles.uid IS NULL AND users.uid != 0

Firefox 3 and "virus scanning"

20th Jun
2008

security_0.jpg Or, "I'm checking it, honest!"

Hmm. A mate noticed this earlier - his Macbook is currently fried so he's temporarily working on his girlfriend's machine with Windows XP (anyone feel his pain?).

On goes the spangly new Firefox 3... sooner or later he notices the new "Scanning for viruses" message which briefly appears at the end of a download.

Hang on a mojo: he has no virus scanner. Come to think of it, I thought, I've noticed this in Firefox 3 recently and neither have I. Yes, this is on my Windows machine - I've not run a virus checker for a long time. Only stupid people get infected. OK, OK, I admit my hard drive back when I worked at Jester once got trashed by some malicious shittery or other, but that was down to my own stupidity.

Anyway, that ends the invitation to send me viruses. So what exactly is Firefox doing with our downloads?

Night time Micra action

15th Jun
2008

dance_parties.pngTonight I discovered a new favourite choon when speeding home late at night in my super powered Micra: Dance Parties [Mechanised] by 65daysofstatic. This song has almost everything, and needs to be listened to loud.

(Must remember to turn volume back down on stereo in the morning.)