Occasional thoughts.

Add CSS to admin pages in Drupal 7

Sometimes it is necessary to only add css to the administrative areas of a site. In Drupal 7 this can be accomplished with a simple precocess_html. For portability it can easily be made into a module. The code below will look in "/sites/all/themes/your-theme/css/" for admin.css.

Filtering for Emoji

MySQL prior to 5.5.3 does not support all UTF-8 characters. This can cause problems when creating content in Drupal. The easiest solution would be to update MYSQL and use a utf8mb4 charset. There are various other ways to work around the problem but since my issue centered around anonymous users submitting messages through the a Webform, I chose to create a module that adds a validator to detect emoji characters. To be safe, I also created a plugin for CKEDITOR to filter emojis from body copy for authenticated users.

Subscribe to my articles