Display block in a section but exclude it on certain node pages

 Let's assume your website has "sections" such as money/*, blogs/* etc. You want to have a block visible in that "section" only but exclude certain node pages. Here's the snippet that gets you there:

Bulk delete inactive users

Sometimes when launching a site you need to import users from another site. User Import module makes that job quite simple. A year goes by and request comes in to delete all imported users who have never logged in. You have the following options:

  • User Prune
    • pros - deletion based on criteria
    • cons - no batch API
  • Custom module with hook_cron implementation
    • pros - very customizable, allows calling user_delete
    • cons - depends on cron running frequency and capacity

If neither of these options fit and there is no button clicking money around to submit a form hundreds of times to delete users manually one might be tempted to bypass Drupal and PHP completely by executing a query in the db.

Note - I do not recommend this option.

xampp and allowed/disabled features for site directories

A few tips I picked up today while rebuiliding my PC after it blue screened of me: 1. the latest version of XAMPP (1.7.2) ships with PHP5.3. Drupal 6 does now work on PHP5.3.

Theme your search button

CSS overrides are nice but sometimes you need to alter your submit button to show up the same way in all browsers (yes, you IE!). /** * Alter search form to use image as background. */ function mytheme_search_theme_form($form) { $form['submit']['#type'] = 'image_button';

Save your sanity or 15 minutes of your day

Automated setupDon't get me wrong - I love Domain Access. I cannot however stand wasting time setting up a new (sub)domain. There are certain steps one can sometimes ignore - domain registration, server side configuration etc - if you happen to have people around to do it for you.

Pages