Buy Me a Coffee
Drupal Buy Me a Coffee module refactoring and Kernel tests

The Buy Me a Coffee module for Drupal integrates the Buy Me a Coffee service into a Drupal website, allowing site owners and content creators to add a Buy Me a Coffee button or widget for their visitors.

The module provides a Drupal-native configuration interface for setting the Buy Me a Coffee username and customizing the appearance and visibility of the button and widget.

Supporting this Module

If you find this module useful, you can test it and treat the author to a cup of coffee.

Features

The module provides the following features:

  • Buy Me a Coffee button: Add a Buy Me a Coffee button to your Drupal site.
  • Buy Me a Coffee widget: Display the Buy Me a Coffee widget on site pages.
  • Username configuration: Configure the Buy Me a Coffee username through the Drupal administration interface.
  • Widget visibility: Control whether the widget is displayed on site pages and exclude administrative pages.
  • Button customization: Configure the button appearance and text.
  • Color customization: Choose predefined colors or configure custom colors.
  • Color picker: Use the integrated color picker for custom color settings.
  • Font and spacing: Configure font and spacing options for the button.
  • Drupal configuration: Settings are managed using Drupal's configuration system.

Post-Installation

After installing and enabling the module:

  1. Open the Buy Me a Coffee configuration page.
  2. Enter your Buy Me a Coffee username.
  3. Configure the button and widget appearance and visibility.
  4. Place the Buy Me a Coffee block in the desired region of your Drupal site, if you want to display the button as a block.

The widget can be enabled or disabled through the module configuration. Administrative pages are excluded from the widget display.

Additional Requirements

  • Drupal: Drupal 10 or Drupal 11.
  • Dependencies: No additional Drupal modules are required.
  • Buy Me a Coffee account: A Buy Me a Coffee username is required to use the button or widget.

No API key or separate API integration is required for the module's basic functionality.

Community Documentation

See the project's README for detailed installation, configuration, and usage information.

Community members are welcome to contribute documentation, report issues, and suggest improvements through the project's issue queue.

Project information

Releases