Chris 2pha Brown

Chris Brown

Drupal, Javascript, Three.js, 3D

website blog

drupal 7 stuff

Often times when writing a module to migrate content leveraging the Migrate module you will find yourself disabling and re enabling your module as you add classes to it.When you do this you might find that you get errors about classes not being found or that your migrations are still being displayed.....

There are many modules out there to prevent spam registrations in Drupal, but many of them involve some sort of Captcha, which I hate, or a paid for service. Stopping fake site registrations should not make it harder for the legitimate people trying to register on your site, and having to pay to.....

Putting this here for my own future reference.It adds an input textfield under an owl carousel (2.0.0-beta.2.4) to jump to a certain item.Dots must be on to use the "to" method.It also includes some stuff for lazy loading as it did not seem to work when using the "to" method of the OwlCarousel.....

On a site I am currently working on I have a content type that includes an entity reference field. When creating a node, the entity reference autocomplete includes the entity id in the field after selecting the entity desired. This can be confusing for the user.When trying to find a solution to this.....

I am currently working on a site with the Bootstrap theme which has a fullscreen views map (Goomap) with exposed filters. As the map is full screen I want to have the exposed filters inside a bootstrap modal. Luckily it is quite easy to theme the views exposed filters form. To do this you have to.....

Yes, I have done it, created yet another Drupal mapping module. I call him Goomap. The first thing you are probably going to ask is "why?". Well, here's why: ComplexityMost of the time when trying to use one of the other Drupal mapping modules I would find the process far too complex. Especially.....

I have seen many questions on the web about how to change the path of the taxonomy term links, so it seems to be a common thing to want to do, I know I have wanted to do this on many projects. Recently on a project I wanted these links to point to a view with an exposed filter on taxonomy. As I had.....

When using the Bootstrap theme in Drupal 7, the image upload widget leaves a lot to be desired. I looks pretty crappy Below is how I overcame this.It should probably work with file fields too but instead of overriding THEME_image_widget, you would override THEME_file_widget, though I haven't tried.....

The below snippet will disable the delete button on the taxonomy term edit page if the term has any nodes assigned to it. It implements hook_form_FORM_ID_alter() function hook_form_taxonomy_form_term_alter(&$form, &$form_state) { $query = db_select('taxonomy_index', 't'); $query->condition('tid'.....

Today when developing a Drupal site with the Domain Access module I had an interesting problem. My site is set up with a custom theme and 2 domains.My custom theme is using Zurb Foundation and so I had to override the main menu theme functions to add the Zurb classes.This was easily done by.....

Having used the Omega 3 Drupal theme for a few years now I got quite use to writing javascript functions that would react to the 'reponsivelayout' event that was supplied by the theme. This event would fire after the responsive classes were applied to the body tag when the page loaded or when the.....

When checking the logs on the Drupal sites I run I often find myself copying the IP and searching it on google. Most of the time it is when I'm looking at a page not found or login attempt failure and I would like to know if these came from some sort of spam or a legitimate user. This process became.....

The Inline Entity Form module for Drupal is an awesome module. Most people probably have experienced using it with Drupal Commerce, but it can be used when ever an Entity Reference field is used. I have personally used it on many projects, most of which were not commerce related. Sometimes though.....

While trying to migrate data from a legacy CakePHP system to Drupal 7 recently I had a problem getting an Addressfield field to play nicely.What I had origianly was this (which did not work). $this->addFieldMapping('field_customer_address:thoroughfare', 'address');.....