Common HTMLawed settings

Here are some common settings for HTMLawed that can be used as a more lenient 'filtered html' format for trusted editors that need a simple WYSIWYG. This configuration allows images, which can be a security risk. If you don't understand the risk, then leave Drupal's defaults the way they are and perhaps try to work with the Full HTML format or use CSS classes and stylesheets.

Drupal hide upload button on form

In Drupal 7, when you have a file field, there is an upload button next to the input field. After selecting a file, if the upload button isn't pressed, the file gets uploaded upon submission of the form. Some say the upload button isn't necessary. So, here's some code that will hide the button for a specific field. Thanks to Chris Darke for the snippet.

Drupal 6 poll theming

Theming polls is not that hard when you know what to do:

First, you can use templates to theme everything except the radios:

  • poll-vote.tpl.php
  • poll-vote-block.tpl.php (must also copy over poll-vote.tpl.php)
  • poll-results.tpl.php