Welcome!

Tags: Drupal, Drupal 6, PHP

The following example shows one way of changing the title on add/edit pages for a specified content type. We'll accomplish this using hook_form_alter() in a custom module.

Tags: bash, find, sed, terminal

In this example I'm showing one way to quickly convert all a href and img src paths from absolute to relative. It's quite a time saver, but I suggest commiting your latest changes before trying anything here! If you aren't using a version control system, make a backup somewhere... please!

Note: Both of these commands are one-liners.

Tags: database, debugging, Drupal, Drupal 6, mysql

UPDATE: You can do this stuff with Drush (setting the variable with vset)

Tags: Drupal, Drupal 6

Please TEST these queries before running them on a live site! I do not want to be held responsible if something goes wrong ;)
Here is how a colleague explained his situation (the solution follows):

The trap is that if you create a content type and don’t remember to set comments off, all the nodes you create have to be updated manually to turn it off, even after you change the default in the content type settings. In our case, I imported a ton of records, and only later realized comments were on.

Solution after the break.

Tags: Vim

Recently I was looking for a simple way to embed colorized code snippets into Evernote or VoodooPad. Both of these applications allow HTML-colorized text. I've seen a few websites that will generate the appropriate code, but I wanted something I could run locally. As it turns out, Vim makes it a piece of cake. The screenshots tell the whole story. The command is :TOhtml

Tags: Drupal, PHP

This code can be used in a custom module, a template.php file, or most easily in a block. This looks good in the header bar on a demo site, without a title set to ...

Tags: projects

I've written a new Greasemonkey Script to make the page titles in Active Collab much more descriptive.

You can install the script here: http://userscripts.org/scripts/show/62924

Pages