Drupal

Supporting A Mobile-First Strategy

joe.price's picture

According to Google data, smartphones have reached mature adoption rates (above 50%) in 19 countries in 2013. This is up from 6 countries in 2012. From 2012 to 2013, smartphone penetration increased by an astounding 17.75 percentage points on average.

Responsive Web Design (RWD) is here to stay. Right now around 11 or 12% of the top 100,000 sites are responsive, and no doubt that number is slated to rise over the next few years. Global Mobile vs. Desktop Internet User Projection

Tags: 

(An) Optimal Drupal 7 Module Configuration for Site Performance

joe.price's picture

The Drupal community is notorious for producing excellent modules to meet specific needs without much more than a cursory acknowledgement of the interrelationship of other / complementary modules. This is no more apparent that with performance modules.

Different sites definitely call for different configurations and combinations or performance modules but there is a standard set that should be applied to virtually every production Drupal 7 site.

Tags: 

Responsive Google AdSense Ads

joe.price's picture

In Drupal, the AdSense module provides a way to easily implement Google AdSense Managed Ads on your site. The problem is, the ad size is fixed in the module generated blocks. For a responsive site, this can be a real problem -- a 728x90 Leaderboard ad isn't going to display properly on a 320px smartphone. After testing a few other alternatives, a really flexible solution is a custom block.

In essence, the code checks at page load to see:

Tags: 

Display Suite, Custom code field & PHP

joe.price's picture

Recently, I needed to customize the standard 'Read more' link that Display Suite provides, based on the taxonomy term of the nodes. There are a few ways to do this but a Custom code field turned out to be a simple and effective solution.

In the following code, I output the term name as a class for the Read more link. If you need any entity info, use Display Suite Code (this allows the use of $entity - php code does not).

Tags: 

Subscribe to RSS - Drupal