How to clean the Power Supply Unit of desktop PC

What you need

  • Screwdrivers (at least a Phillips-head)
  • Dust mask
  • Earmuffs (recommended)
  • Air compressor
  • Angle nozzle air blow gun
  • A garage, lab or open space easy to ventilate

What to do

  1. Shutdown and unplug the PC from the electricity supply and remove the computer case
  2. Unplug the power cable from PSU and clean the cable sheat with a dust cloth
  3. Remove the Power Supply Unit using a Phillips-head screwdriver and holding the PSU firmly to avoid to damage motherboard and other components
  4. Wear a dust mask and eventually earmuffs
  5. Power on the air compressor to clean the PSU fan, cables and connector
  6. If there are additional aeration holes clean them with short blows until you’ll see the internal components shine
  7. Clean the external chassis of the PSU with a dust cloth and then insert the PSU back into the computer case keeping it firmly when you tighten the screws

Add CSS class to drupal form fieldset

Tested on:

  • Drupal 5.x
  • Zen custom subtheme

Customizing Drupal form appearance may sound difficult. But to add a CSS class is (surprisingly!) simple using theme_fieldset themeable function.

  • Copy theme_fieldset code from Drupal manual page
  • Paste to your template.php:
    • If you’re using a Zen theme, change theme_fieldset to zen_fieldset. You can try to use this method with your theme prefix.
    • If you’re using a theme based on phptemplate engine, you can change theme_fieldset to zen_fieldset to have the same effect of above (try one of this, not both).
  • Change the resultant code as you wish.

I’ve attached an example to generate CSS class from fieldset title: Add CSS class to drupal form fieldset.

# custom fieldset CSS class from element #title
$css_class = “my-custom-class-“;
$css_class .= str_replace(” “,”-“,strtolower($element[‘#title’]));
# using transliteration module to transliterate/strip non-ASCII character where available
if(module_exists(‘transliteration’)){
# including Transliteration functions
require_once(drupal_get_path(‘module’, ‘transliteration’) .’/transliteration.inc’);
$css_class = transliteration_clean_filename($css_class);
}

Adding this code to your template:

  • Take all Drupal generated fieldset title
    • e.g. “Impostazioni del menù”
  • Transform it in a CSS class using Transliteration module
    • e.g. “my-custom-class-impostazioni-del-menu”
  • Queue it with other CSS classes (where available)
    • e.g “collapsible my-custom-class-impostazioni-del-menu”

I apply a previous substitution of whitespace using “-” (transliteration module use underscore “_”) and you can do the same, but later remember to use transliteration_clean_filename to safely sanitize class name for any other case you’ve not contemplated (accents, special characters).