Aaron Cole

Husband, Dad, Web Nerd

Category: Writing

  • How to remove colons from field labels in Drupal 7

    By default, Drupal appends a colon to the end of field labels.  If you would like to remove them and you are already using Display Suite to layout your content types, Display Suite Extras is a great option. My Google searches resulted in countless recommendations to create a custom copy of the field.tpl.php template.  Editing templates […]

  • Intro to Drupal 7: Theming Fields and Nodes with Templates

    Intro to Drupal 7: Theming Fields and Nodes with Templates

    In a sea of not-so-great Drupal videos, this stands out.  I will be referring back to it many times.

    I’m trying to limit all of my customizations to the modules or settings, but once in awhile you need to edit a template.

  • TinyMCE Disables Spellchecker

    Problem: TinyMCE rich-text editor disables the operating system spellchecker when using Firefox or Chrome. Solution: Set the TinyMCE configuration “gecko_spellcheck” to TRUE. tinyMCE.init({ … gecko_spellcheck : true }); In Drupal, you can override this setting by adding an alter function to a custom module. function MYMODULE_wysiwyg_editor_settings_alter(&$settings, $context) { if ($context[‘profile’]->editor == ‘tinymce’) { $settings[‘gecko_spellcheck’] = […]

  • Extra space below image

    Extra space below image

    Problem: Space appears just below an image.  This becomes obvious whenever you add a border. Solution: Set the image’s display to block.  The default display of an image is inline, which includes line-height. http://jsfiddle.net/FMqjf/4/

  • Drupal sessions table crashed

    Problem:  Unable to log into a Drupal site.  Logging in with valid credentials would fail without any visible error in the UI. Solution: Repair the sessions table. When I exported the database using Sequel Pro, I got the following error: “Table ‘./d6_eiper/sessions’ is marked as crashed and should be repaired’.  I was able to do […]