Please post your own snippets up here for others and follow these simple guidelines.

  1. Click on ADD CHILD PAGE from the section that your snippet belongs with (e.g. PHP block snippets, PHP page snippets, etc.)
  2. Give your snippet a short and obvious title so it is easy for others to see what your snippet does.
  3. Please include a simple introduction at the top of your PHP Snippet which explains:
  • What the snippet does
  • Which versions of Drupal has it been tested with
  • Any extra information for newbies that you think is relevant