From the archive! Drupal 9: Extending Drupal Base Classes Without Overriding Constructors

This article details a technique for injecting dependencies into constructors, forms, and plugins without needing to override the constructor.

We break down how to use dependency injection and what the technique does to improve this in Drupal.

Despite the article being written for Drupal 9, the technique is still relevant in Drupal 11.

https://www.hashbangcode.com/article/drupal-9-extending-drupal-base-classes-without-overriding-constructors
#drupal #drupalDevelopment #hashbangcode

Drupal 9: Extending Drupal Base Classes Without Overriding Constructors

I have been using the Drupal dependency injection system for a while now, even giving talks and writing articles on the subject. As the release of Drupal 10 is just around the corner I have been thinking more about how to override dependencies to plugin classes.

#! code

New! Drupal 11: Making Interactive Elements With HTMX

HTMX is a JavaScript library that allows you to make ajax calls and create CSS transitions without writing any JavaScript code.

In this article we will look at how HTMX is integrated into Drupal, and what services exist to help you use it within the Drupal system.

https://www.hashbangcode.com/article/drupal-11-making-interactive-elements-htmx
#drupal #htmx #drupalDevelopment #hashbangcode

Drupal 11: Making Interactive Elements With HTMX

HTMX is a JavaScript library that allows you to make ajax calls and create CSS transitions without writing any JavaScript code. It works by adding attributes to HTML elements, which it then uses to set up and perform ajax requests, swap elements, and a few other things.It was added to Drupal in version 11.3.0* and gives developers the ability to create interactive elements using render arrays and HTML attributes. The intent is to replace the entire ajax sub-system with one built around HTMX, and there is quite a lot of work ahead to accomplish this task.

#! code

New! DrupalCamp England 2026

Last weekend Phil attended DrupalCamp England 2026, at the University of Salford.

In this article, Phil writes about his experiences at the camp over the two day event.

https://www.hashbangcode.com/article/drupalcamp-england-2026
#drupal #drupalCampEngland #drupalCampEngland2026 #hashbangcode

DrupalCamp England 2026

The weekend of 28th February to the 1st March saw the second DrupalCamp England event with around 100 people attending the University of Salford, not far from Manchester, for the two day event.I had submitted a talk and the camp organisers had accepted it and also decided to make me a featured speaker, which was an incredible honour. As such I was part of the communications being sent out in the weeks before the event.

#! code

Next Tuesday is the first #! code meetup.

For our first session, @philipnorton42 will be talking about HTMX in Drupal.
This will be an online event, hosted via zoom.

RSVP here : https://luma.com/kyr1krhe
#hashbangcode

#! code Meetup March 2026 · Zoom · Luma

This is the first #! code monthly meetup. This is a general web dev meetup where we discuss all things related to the web development industry. For our first…

New! Running An LLM With Llama.cpp Using Docker On A Raspberry Pi

In this article we will look at how to get an LLM running on a Raspberry PI via a docker container, and what sort of things we might be able to do with it.

https://www.hashbangcode.com/article/running-llm-llamacpp-using-docker-raspberry-pi
#ai #raspberryPi #drupal #hashbangcode

Running An LLM With Llama.cpp Using Docker On A Raspberry Pi

I've been curious about integrating AI agents into my workflow recently, and so I started looking at how this could be done using my current equipment. Data sovereignty is important to me so sending all my data to train a remote AI agent doesn't appeal. I was expecting to need to buy a new gaming rig with a couple of high end graphics cards in it, but after some research I found that this wasn't the case.

#! code

From the archive! A Look At HTMX With PHP

In this article we will look at how to get HTMX working with a vanilla PHP backend. With a few examples of the two systems working together.

https://www.hashbangcode.com/article/look-htmx-php

This ties into a package just released that shows a lot of different examples of HTMX working with a PHP backend.

https://github.com/hashbangcode/htmx-php-examples

#htmx #php #hashbangcode

A Look At HTMX With PHP

HTMX is a JavaScript library that can be used to issue AJAX requests, create CSS transisions, and set up web sockets using HTMLThe power of HTMX is that it can be used without writing any custom JavaScript code. It works by looking for attributes in HTML tags using that information to set up events, user interaction, and send requests to a back end. The system is backend agnostic and so will essentially work with any system that can accept, interpret, and respond to the requests.

#! code

New! Leaving Meetup.com And Extracting Past Event Data Without API Access

In this article Phil shows how he was able to dig into the meetup.com site to see how the data was presented, and how he was able to MacGyver a solution in PHP to download the past data for a group as a CSV file.

https://www.hashbangcode.com/article/leaving-meetupcom-and-extracting-past-event-data-without-api-access
#api #php #hashbangcode

Leaving Meetup.com And Extracting Past Event Data Without API Access

It's no secret that meetup.com have raised their prices over the last couple of years. Whilst this doesn't impact some of the larger user groups who have lots of members, it is basically killing smaller groups with no income streams.I have no idea how tiny groups with less than 50 members can afford to pay £150+ every 6 months and pay for venues, refreshments, hosting space, and all the other things that a small group needs to pay for. That's not a fixed cost either, there's a good chance that meetup.com will increase their prices further.

#! code

New! Nothing Phone (3): A Review

In this article, Phil looks at the main features of the Nothing Phone (3) and what it's been like to use it for the last few months.

https://www.hashbangcode.com/article/nothing-phone-3-review
#tech #review #nothing #hashbangcode

Nothing Phone (3): A Review

Last year I was looking around for a new phone. I had been using a Samsung Galaxy S10+ for around 6 years and whilst that was a flagship phone at the time, I was looking for a bit of an upgrade.The S10+ was struggling to take pictures that still looked good on modern hardware and couldn't make use of the newer 5G signals. Plus, my son was off to university and was looking for a new phone that was reliable (and didn't have a cracked screen).

#! code

From the archive! Creating A Text Adventure Game In Godot

In this article Phil will goes through the steps required to create a (very simple) text adventure game that allows for navigation around a number of rooms and interacting with locks and keys.

The system uses a JSON data structure to create the rooms and items so can be adapted for different games.

Fun fact; this is one of our most popular articles.

https://www.hashbangcode.com/article/creating-text-adventure-game-godot
#godot #gameDev #hashbangcode

Creating A Text Adventure Game In Godot

Godot is a great game engine and I've been looking for projects to help me expand my knowledge of the platform. After fiddling with drawing shapes and getting used to the interface I decided to create a text adventure game. Text adventures used to be really popular in the early days of games, before graphical adventures were possible on the hardware available. I can remember playing a couple of adventure games in the late 80s and even playing some simple multi user dungeons (MUDs) in the 90s so text adventure games do have a hint of nostalgia for me.

#! code

New! Drupal 11: Finding A Better Way To Display Code Examples

In this article I will look at a few code sandboxes and how they might be integrated into Drupal.

I'll then look at one code sandbox in particular and allow this to be embedded into article content.

https://www.hashbangcode.com/article/drupal-11-finding-better-way-display-code-examples
#drupal #drupal11 #javascript #hashbangcode

Drupal 11: Finding A Better Way To Display Code Examples

I've been running this site for about 18 years now and the code I post has been in much the same format since it was started. The code is rendered onto the page using a element and (mostly) syntax highlighted using a JavaScript plugin.

#! code