Monthly Archives: February 2016

Adding a “Filter by year” Facet for a Date Field in Apachesolr for Drupal 7

A Drupal 7 site I’m working on makes use of the Apache Solr Search module and FacetAPI. Some of the content has a date field named¬†field_s_date. I was tasked with providing a sidebar “Filter by year” facet block to filter

Tagged with: , , ,
Posted in Development

Rendering an Image in Apache SOLR Search results (Drupal 7)

Introduction There are a few ways to get extra information into the output of your Apache Solr Search results. The most efficient ways involve getting the information into the solr index and pulling it directly from the solr index. We

Tagged with: , ,
Posted in Development

Use Keyboard Maestro to Hide Instead of Close an Application

I use SnagIt to capture screenshots. The editor window that appears after you capture takes a few seconds to open if the application isn’t running. I realized that, while the capture tools remain open, the editor goes away when I

Tagged with: ,
Posted in Tech Tips

Launch Center Pro actions for Day One

Here are my Launch Center Pro actions for the Day One app on iOS. I’m not here to teach you how to use Launch Center Pro (a huge topic), so if you need to learn that I suggest a lot

Tagged with: , , , ,
Posted in Tech Tips

New Drush Commands to Identify and Compress Large Images

https://github.com/agileadam/large-images-drush I released a simple drush command file that provides two drush commands: large-images-list will list the largest images (by file size) found in a directory (and its subdirectories by default) large-images-compress will compress (shrink file size of) images and

Tagged with: ,
Posted in Development

Recursively Finding and Operating on the Largest n Number of Files of a Particular Type

If you want to reverse-engineer this, you can work from left to right, adding one command at a time to see what each step does to the output.

This example just lists the files we found, which is pointless

Tagged with: ,
Posted in Development

Extracting Image “src” Attributes from an HTML String using PHP

Here are a few ways to build an array of image sources extracted from an HTML string. I’m sure there are other ways, but these seem to be reliable.

Tagged with: ,
Posted in Development

Importing Paragraph Content with Feeds in Drupal 7

As I write this,¬†there isn’t an established way to import data into Paragraphs using Feeds. This solution only caters to my particular fields, but it should serve as an example of one way to import HTML content into a basic

Tagged with: , , ,
Posted in Development