Drupal

Free as in Cats

I once heard the phrase that most open source projects (the context was specifically Drupal) was not free as in beer but was free as in cats.

Cat in the office chair
Cats are cute, if sometimes disruptive of work
Continue Reading Free as in Cats

Drupal: Ckeditor Abbreviation

One of the tags that many are not aware of is the tag. This is a useful tag to help provide explanations of abbreviations within the body of the text. If you’re reading along and see an abbreviation for WP and you know what it is, you can keep reading. If you’re reading along and see an abbreviation and don’t know what it is, you can hover over it and it will show you an explanation. It’s a win-win, providing an explanation for those that need it without needing to add more text in the main body which may come across as over-explaining for those that don’t need it.

Continue Reading Drupal: Ckeditor Abbreviation

Drupal: Sync Configuration

Having a workflow that keeps your code in sync across development, staging, and production servers – like in the series of GitLab DevOps posts I’ve been sharing recently – is important. But that doesn’t synchronize the database, which contains two major subcategories: configuration and content. It also doesn’t synchronize user-uploaded files, but that’s a subject for a different post.

Fortunately, Drupal 8 introduced a new system for syncing configuration across copies of the site.

Continue Reading Drupal: Sync Configuration

Drupal: Fluid UI

In doing research on tools that could be incorporated into a Drupal site, a co-worker recommended Fluid UI. This is not the same Fluid Framework used by Microsoft as the backbone of the new Microsoft Loop tool, or the Fluent UI Microsoft design language. There’s lots of use of Fluid and Fluent out there.

This one is an open source group out of Toronto focused on web accessibility, and they offer their tools in a few different formats. One is as a convenient Drupal module. I installed it on a dev site and took a look at what it offered.

Continue Reading Drupal: Fluid UI

GitLab DevOps: PHP Lint

Here’s another piece in a GitLab DevOps setting: when code is committed to , I want to run a linter on the custom code folders of Drupal (modules and themes) to make sure there aren’t any glaring syntax bugs that snuck through. My personal favourite error is when a “:wq” gets inserted into a file trying to exit vim, after doing all the testing.

Continue Reading GitLab DevOps: PHP Lint

Drupal: Assign Permissions Based on Username File

Here’s a recent scenario I encountered: a Drupal role needs to be assigned to certain users. The site is using a single sign on (SSO) system with a lot of users who could log in. But only some of those should be granted a certain permission. The list of those who can access the special permission role is automatically generated and put in place on the server on a daily basis, in a simple format with one line for each account name.

I have pulled out a generic version of this code and made it available on my GitHub.

Continue Reading Drupal: Assign Permissions Based on Username File

Drupal GitPod Container 1: .Dockerfile

GitPod is a great tool for cloud-based containers when developing. If you’re developing and want a safe and efficient cloud container to try things out, it’s a pretty good way to go. You even get 50 hours per month for free, which is pretty great if you only need occasional side project and not full-time work. It also works with Visual Studio Code – although that has not been working for me lately – so you can use it in the browser or in your desktop editor. When you browse to a or repository with the extension installed, there’s a simple button that will launch the container with that repository’s code, making it quick and easy to see how it works as well as make changes.

In this mini-series I describe how I created a generic Drupal-friendly container working with . It is available in my GitHub. Note that since is some code I may continue using over time, the code there may change beyond what is covered in this article.

Continue Reading Drupal GitPod Container 1: .Dockerfile