User login

done

How to programmatically rename a content type (change node type machine name)

Set old_type if you want to programmatically update a node type / machine name.

(This is not about changing the type of a node, but changing what type is called on the machine-info level.)

$type->old_type is what node_type_save() checks for when updating a node type, if it's not set it will create a new node type even if orig_type is set to an existing bundle. So really all you need to do right before saving a modified content type is set the old_type to the orig_type, such as:

Configure Memcache on a Drupal site

This has to be done for each site. This is after installing Memcache on your server.

Memcache module

Then, in settings.php, add:

MySQL Query to Get Quick Overview of Nodes by Content Type

mysql> SELECT nt.name, nt.type, COUNT(n.nid) FROM node_type nt LEFT JOIN node n ON nt.type = n.type GROUP BY (nt.type);

Exporting views to files to be managed by version control: Drupal 7

The trick to somewhat Drupal 8-esque configuration management in Drupal 7, when it comes to Views, is to make your view defined in the user interface to be defined by a module instead. This is done with hook_views_default_views().

From Michelle Lauer's Views chapter in the Definitive Guide to Drupal 7:

Editing a subscriber's information in Mailchimp

First, note that people can edit their own information in Mailchimp, and of course add it, so be sure you know it is incorrect before you change it.

LibrePlanet coming up in Boston— some sessions we're looking at

LibrePlanet is on March 22-23 at MIT and the schedule was recently released. A whole lot of awesome sessions, as well as keynotes, lightning talks, and social gathering opportunities.

Here are some i especially want to attend— i swear this isn't the whole schedule!

Saturday

10:55 - 11:40 | Session block 1

Building an open digital archive in India: knowledge, access and other issues

A couple VCL changes when upgrading to Varnish 3

The error messages Varnish provides are very informative.

tail -f /var/log/varnish/current

Install Claws Mail on Ubuntu

How to install Claws Mail, "the user-friendly, lightweight, and fast e-mail client" on Ubuntu:

JavaScript to open external sites (not on domain or subdomain) in new target

It's bad Web practice to open any links in a separate window, but it does help when going for an HTML mobile app and it's becoming accepted expected behavior for anything with a stream.

So here's the JavaScript:

Overriding a string the second-simplest way in Drupal 7

Here's the situation: You don't need administrator-customizable strings like the String Overrides modules provide, but you'd like the changes in a more share-able (or consistently version controlled) place than settings.php, which details an easy $conf way of doing string overrides.

Well, here's how to do it with a variable set function that can go in a module's install or update hook:

Syndicate content