Blog Archives

User-chosen Field Output Styles in 5 minutes using Display Suite

I’m working on a site that has a “Statistics” paragraph bundle. The output looks like this: The specification calls for the content author to be able to choose between a few different visual styles for the header (title), shown as Statistics:

Tagged with:
Posted in Development

Adding Fields to Inline Entity Form Table

Inline Entity Form is a useful module for reference entities and being able to edit them in place. Here’s what the edit form looks like out of the box for an unlimited value entity reference: Often it’s helpful to provide additional information to your

Tagged with: , ,
Posted in Development

Using the Messenger Service Instead of drupal_set_message in Drupal 8

As you may know, drupal_set_message()  is deprecated in Drupal 8.5.0. Here’s a quick example of using dependency injection to use the new Messenger service: mymodule.services.yml

src/MymoduleAuthentication.php

 

Tagged with: ,
Posted in Development

Automatically Put Files Into a YYYY/MM Directory Structure

 

Tagged with:
Posted in Development, Tech Tips

Using PHPStorm for Git Diff and Merge tools (Mac)

You love git-difftool, right? Of course! You also love PHP Storm, right? Of course! This easy procedure lets you use PHP Storm as your git-difftool. Open a project in PHP Storm Click Tools » Create Command-line Launcher… Edit your ~/.gitconfig

Tagged with: , ,
Posted in Development, Tech Tips

Find and Open (in vim) Multiple Files

This is a quick set of examples for finding and opening multiple files in Vim.

 

Tagged with: ,
Posted in Development, Tech Tips

Basic HTTP Authentication in Drupal Site Using settings.php

Here’s a quick and painless way of preventing public access to a Drupal site using settings.php (or settings.local.php):

 

Tagged with: , , ,
Posted in Development

Valet+ Quickstart for Drupal Development

Here’s a README.md file that I’ve developed over time. It explains how I setup and use Valet+ for quick and powerful Drupal development. Sorry for the formatting. I’ll get markdown support on my blog sometime…

 

Tagged with: , , ,
Posted in Development

Setting up OCI8 (PHP Oracle module) on Webfaction

Webfaction, my favorite web host, allows you to compile PHP modules in your home directory for use on your websites. Here’s the process for configuring OCI8 to talk to Oracle databases:

 

Tagged with: ,
Posted in Development

Mac High CPU Usage – WindowServer

DISCLAIMER: I’m writing about my personal experience here. I am by no means doing some exhaustive investigation. The changes I explain below seem to make a difference, at least according to what Activity Monitor is showing for CPU usage. My

Tagged with: ,
Posted in Tech Tips