Submitted by mario on Tue, 17/04/2012 - 16:58
Unfortunately the str_getcsv function doesn't exist in PHP < 5.3, and I really needed it for a particular project, and wasn't keen on writing my own version.
Turns out you can use the related function fgetcsv to similar effect using a bit of trickery to get your string as a resource stream first.
Submitted by mario on Mon, 12/03/2012 - 12:30
Drupal's database abstraction layer is pretty cool, but sometimes unexpected results on complicated queries can do your head in, so it's nice to be able to see the final SQL statement Drupal is planning on running.
Submitted by mario on Wed, 29/02/2012 - 19:19
Embedding the node add/edit form is pretty easy, but what if you want a new and improved node form, with some of your excellent additions/modifications, without messing around with the core node//edit form?
Submitted by mario on Sun, 15/01/2012 - 20:22
Was migrating a few sites between Drupal-7.7 and Drupal-7.10 platforms and came across the following PHP notice:
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of /srv/drupal-7.10/includes/install.inc).
Submitted by mario on Fri, 09/12/2011 - 21:38
I'm managing a large number of git submodules on a particular project, and found their working directories often became dirty in various ways (i.e. file perms changing with an Aegir deployment).
Submitted by mario on Wed, 20/07/2011 - 12:43
I wanted to get notifications for mentions/messages on a remotely screened session of Irssi, and came across a cool notify.io irssi script.
Submitted by mario on Wed, 26/01/2011 - 12:40
You can add extra display modes using hook_entity_info_alter.
Say you have a custom module 'myModule' and want to add a custom view to the node entity:
Submitted by mario on Fri, 21/01/2011 - 19:55
Drupal 6/7 make use of the PECL uploadprogress library for upload progress. This is how to install it.
Submitted by mario on Thu, 15/04/2010 - 09:27
It appears that if you're trying to get nodes by type in your Drupal module or theme (i.e. not on a page, in which case you should use Views) then a quick and easy way to get them is through an SQL query.