User login

How to

Information on how to do something... anything.

Installing Cygwin for Drupal patch testing and development

Update: See Randy Fay's Cygwin quickstart tutorial, http://randyfay.com/node/70

Many Drupal things are best done in a UNIX-like environment. One solution is to run a Linux distribution like Ubuntu in a virtual machine, as is provided by http://drupal.org/project/quickstart. Another solution (on Microsoft Windows) is Cygwin, to bring the power of the UNIX command line to Windows.

Send an e-mail to an administrator when a new user registers on a Drupal 7 site

10:13 benjamin-agaric: Drupal 7 - the simplest way to have an administrator e-mailed when a new user signs up? Can't find any core setting and no trigger does it either? Seems we should have a way to get this functionality short of Rules module... thoughs?
10:22 benjamin-agaric: Answer: it can be done through Drupal core- an advanced action simply has to be configured first at admin/config/system/actions/configure and then back to trigger configuration.

Ignore all Vim temporary files


v ~/.gitignore

*.swp
*.swo


git config --global core.excludesfile ~/.gitignore

Using Imagecache for a theme's user-provided logo

Agaric considers it best practice (meaning we do it occasionally) to keep a logo (the user-uploaded logo), so that the site principal can have its logo swapped out by an administrator, and not only by a developer or themer. Practically, some designs will have the logo so integrated that it should not be swappable, but note that one additional advantage of having a clean and separate logo file is that people can swipe it and display their brand loyalty while linking to you. Or maybe add devil horns to it in MS Paint.

How make double rounded borders with CSS3 (and using an extra div)

I couldn't find a way to do this in straight CSS3.

A light colored border, a white (transparent) space in between, and a blue background, all rounded.

Also, note that by using CSS3, we are oh-so-subtly telling Internet Explorer users (before IE9, anyway) that we don't care that the site doesn't look as pretty as it does to people sensible enough to use good web browsers.

First, let's get the extra HTML out of the way.

Using Drush 3.1 by installing it in your local user directory

The version of drush in Debian is way behind. Drush 3.1 has been out for a month, Drush reached stable 3.0 on April 23.

Stefan was unsympathetic:

That does not mean the package is ready. What the upstream authors consider stable and the Debian community considers stable might be different things, too. Quality is Debian's top priority not up to date software. In addition to that it will only get into the next stable distro and maybe into the backports repository. In that case we get the upgrade automatically.

Change the vocabulary of a taxonomy term in Drupal 7 using the database

By clicking the wrong Add terms link, i managed to add a couple terms to the wrong vocabulary.

One of the powerful things about taxonomy is that all terms are really equals under the hood, no matter what vocabulary they belong to. Unfortunately, Drupal does not make this power available through the UI. We can, however,

Improving on a patch

cd drupal
wget http://drupal.org/files/issues/book-589440-38.patch
patch -p0 < book-589440-38.patch
drush dl devel

Tip: The patch command needs the angle bracket (alligator mouth) to eat the patch file!

admin/modules

Execute command-line statements from within the vi editor

It is very simple and occasionally useful to access the power of the shell from within your vim text editor. In normal mode (esc from insert mode), simply type, colon included

:r

Commands must be preceded by a bang symbol (exclamation mark). Some examples:

:r !date
Wed Apr 21 23:04:22 PDT 2010

Personally, i'll find this useful simply for putting in paths from the file system that i may not be certain of but that bash's tab autocomplete will be able to verify for me.

Syndicate content