Chris 2pha Brown. Drupal developer Brisbane Australia

Chris Brown

Drupal, Javascript, Three.js, 3D

website blog
image for Disable chrome is draining your battery faster notification

Windows 10 has been driving me nuts with this "chrome is draining your battery faster" notification lately. You have shown me once, no need to spam me with this message. There is no way I am going to go back to a windows browser, you lost me many years ago when you made my life hell as a web developer because your browsers were so buggy and did not conform to the standards. Anyway... How to.....

image for Moving blog from Drupal to static html

I recently moved my blog from Drupal to static html pages and the results are amazing. I am primarily a Drupal developer, and have been for about 10 years, so many years ago when I decided to add a blog to my personal site it was natural to choose Drupal. Drupal was easy to get a blog up and running quite easy and worked well, little consideration was given to actual site speed.Fast forward about.....

image for Gulp imagemin with the pngquant plugin

I found it hard to find an example of how to use gulp-imagemin with a plugin, specifically in my case, the imagemin-pngquant plugin.The difference seen between using compressing a .png with the default compressor that is included in gulp-imagemin and pngquant was substantial.I was converting a 100px x 100px 21.3KB .png. The png compressor that comes with gulp-imagemin (optipng) produced a file.....

image for Three.js easy round / circular particles

Today I came across a question on stackoverflow asking how to make round particles in Three.js (Three.js - give particles round form). I have seen questions like this a few times and the answers always seem to be to load an image and use it as a texture. People seem to forget that you can use a canvas as a texture map and you can draw pretty much what ever you want on a canvas. I have demonstrated.....

image for Tango messenger app - Why you shouldn't use it

The Tango messenger app is probably the worst app for privacy I have ever come across. If you have any concern for your privacy at all, you should not use it. Below I will list just a few of the things that concern me as far as privacy and the Tango app. Tango saves all your contacts to their serverWhen you install the app on your phone, it seems to try to sync with all the contacts in your.....

image for Drupal Migrate, Don't forget to de register your classes

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 in the interface even though your module is disabled (when using a class from another module such.....

image for Fixing drush * needs a higher bootstrap level to run

Today while setting up a Drupal dev environment on a new PC I encountered the drush error "Command needs a higher bootstrap level to run". The first thing I did as many probably would is do a quick search on google. This though yields many different results and fixes. The problem though is I didn't know why it was happening so I didn't know which fix would work.Turns out though it was quite easy.....

image for Stopping Drupal spam registrations without an annoying captcha

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 prevent spam does not sit well with me.While Drupal does have a setting to "Require email validation".....

image for Javascript snippet for "jump to" functionality in Owl Carousel

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. var container = $('.view-collection-item-viewer-new .view-content', context); var carousel = container.....

image for Removing the entity ID from Drupal entity reference fields

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 problem I came across many issues and different proposed solutions including a sandbox module.....

image for Drupal Vehicle taxonomies pre configured and ready for import

Many times in the past I have wanted a taxonomy structure for things like car makes and models or Australian States and Suburbs and find myself recreating them every time. So today I decided its probably better to have them stored somewhere. Luckily the Taxonomy Manager module easily allows you to export and import taxonomy data easily. I know there are other options for importing and exporting.....

image for Three.js car paint shader - recreating the Radeon 9700 demo

Recently while experimenting with three.js shader materials I stumbled across RenderMonkey. It is old software that is no longer supported and the description on the website says: "RenderMonkey is a rich shader development environment for both programmers and artists that facilitates the collaborative creation of real-time shader effects." As I was going through the different shader examples that.....

image for Three.js standard materials vertex and fragment shaders reference

When playing around and experimenting with Three.js ShaderMaterial I often want to take a look at how the standard Three.js materials are done. Looking through the code or constantly outputting the shaders in the javascript console is a pain in the arse. I though I would post them here for future reference and in case anyone else was interested. NOTE: These were output from Three.js version 70.....

image for Drupal views exposed form in a bootstrap modal

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 override the views exposed filters form theme file. Copy the views theme file.....