Tags » Drupal

Adding custom media inline image styles

 * Limit the available inline image styles.
function MYMODULE_media_wysiwyg_allowed_view_modes_alter(&$view_modes, &$file) {
  $view_modes = array(
      'media_original' => array(
          'label' => 'Full Width',
          'custom settings' => TRUE,
      'media_large' => array(
          'label' => 'Half Width',
          'custom settings' => FALSE,
      'media_third_left' => array(
          'label' => 'One Third Left',
          'custom settings' => FALSE,
      'media_right_third' => array(
          'label' => 'One Third Right',
          'custom settings' => FALSE,
      'media_half_right' => array(
          'label' => 'Half Width Right',
          'custom settings' => FALSE,
      'media_left_half' => array(
          'label' => 'Half Width Left',
          'custom settings' => FALSE,
… 63 more words

Showing node count per term in views listing

Here are the step needed to show the count of nodes that are tagged with each term in a term list view!

  1. In your term list view, add a…
  2. 304 more words

Drupal programing

Haiku therapy after 2 days being programmed:

Gazed at clock, was glazed.
Drupal: without scruple phased-
in, trained me till dazed.


Setting Up Behat and Drupal Driver on your LAMP Box

Hey everyone, this week I tried setting up Behat on my local machine. After visiting a number of useful sites, I was successful and I decided to share how I installed Behat on my system as well. 779 more words


Drupal unable to bootstrap after running DB update for UUID

Run these line of sql in the DB.

delete from system where filename like '%uuid%'
truncate table cache;
truncate table cache_bootstrap;

Note: The path setting might be causing the problem. 17 more words


Unnecessary Blocks in the changed admin theme - Drupal 6

All of us know that the default drupal admin theme is boring.So i set about changing the admin theme from Site Configuration->Administration Theme(Admin Menu) with the Seven theme i downloaded(Drupal 6).Everything was fine,until i saw all the blocks from the default theme shown in the admin theme :( .I searched a lot and stumbled upon the Site Building->blocks->list->Seven in admin menu accidently.There it was,list of blocks shown in every theme.When all the blocks in my admin theme were disabled,everything was back to normal :).