Technical blog and writings by Micah Webner.

Setting up stylelint for Drupal on Linux

7/24/2020 in Drupal by micah
screenshot demonstrating the output of stylelint

stylelint is a great tool for reviewing CSS files to find errors and enforce conventions in your styles. This post provides a quick guide to and using stylelint in your Linux home directory. In order to make sure you have the latest versions of everything, I recommend installing both Node.js and stylelint as an unprivileged user into your home directory.

read more

Adding full Views support to custom entities

8/12/2014 in Drupal by micah

[Drupal 7 post] There are a lot of examples on creating custom Drupal entities and adding support so they can be used in Views. I covered the basics in my own DrupalCamp Michigan 2013 presentation on custom entities and web services. But as is often the case, there are no examples that show all of the pieces when you have complexities like referenced entities or multiple tables. I just spent two afternoons tearing my hair out, so it's time to stop, drop, and blog before I forget how I did it and can't figure out out again next time.

read more

How I manage Drupal with Git

6/26/2014 in Drupal by micah
Image depicting merged git branches

[Drupal 7 post] Ever since I started using Git version control to manage projects, I've struggled to find the best way to use it for managing complete Drupal projects. From day one, it has worked out well enough for me for managing custom modules and themes, HTML or Classic ASP projects, and even Linux server /etc directories, but I never quite new what to do with Drupal deployments. I use drush to manage Drupal code, and of course I don't use proscribed methods for doing that, either. I finally landed upon a solution, and while this may not be the best (or recommended) method, it does work for me.

read more

Blogrimage 2014 Day 1: Let the Games Begin

3/2/2014 in Pathfinder RPG by micah
Character Alignments - Downton Abbey

I wasn't going to join the blogrimage this year, but after hearing Pradeepan talk about Soylent this morning, I decided to join the fun. Besides, I started something new yesterday, so all I need to do is write an extra blog post today to catch up.

So, for the next 29 days, I'm going to explore what it takes to be a Pathfinder RPG Game Master. If that sounds like I've reverted to childhood and gone back to playing D&D, you're right.

read more

Collapse Text format descriptions on node edit form

12/23/2013 in Drupal by micah
Collapsed text format fieldset

Ever since migrating to Drupal 7, I've been unable to find a way to collapse the text format tips below a text area. On content types with many text fields, this can be really annoying. It was fairly simple to do this in Drupal 6, but the best I could do in Drupal 7 was hide the tips completely, which isn't really great for users that need them. Until now.

read more

O Drupal, where art thou?

11/22/2013 in Drupal by micah

Ever since we switched to using Aegir to manage Drupal deployment, it's gotten a lot more difficult to keep track of which platform each site is running on. This little implementation of hook_requirements() displays the site's host name and Drupal directory in the status report.

read more

Building a Curriculum Management and Publication System using ERP Data and Web Services

10/11/2013 in Drupal by micah

Henry Ford College's Drupal-based curriculum management system utilizes data extracted from the ERP system (aka HANK) as custom entities to promote data standards, simplify user workflows and reduce data entry redundancies. Drupal content on the curriculum management website is then shared with HFC's public-facing websites using the Services module.

I could give a detailed overview of this web project in about 10 minutes. I could easily talk about it for four hours, maybe even double that.

I have 40 minutes.

So we are going to go really fast and highlight all of the things I had to get working together to make this project happen. Along the way, I'll include code examples and links to the blog posts that I read to figure this stuff out.

read more

Drupal 7 Display array contents with pager

3/12/2013 in Drupal by micah

This example shows how to generate a render array from an array of data that includes a pager. This example will theme the content as an item_list, but the content section could be parsed and rendered as a table or by any other means, depending on the content of the $rows array.

read more

Blogrimage 2013 Kick-off

3/4/2013 in Drupal by micah

There's nothing like waiting until the last minute to get started on something, but when I woke up this morning, I finally picked a challenge for my 30-day blogrimage.

The annual blogrimage was started by Pradeepan Jeeva and his friends in 2010. In its first three years, over 60 people participated by simply selecting a 30-day personal challenge and blogging about it each day. This year, over 100 people will participate.

read more

Adding fake Drupal 7 node fields with custom theme functions

1/12/2013 in Drupal by micah

This example takes the node creation date and renders it as a fake field. It also creates a theme_mysite_pseudo_field() function that could be used as a template for any renderable array.

read more