Drupal is a registered trademark of Dries Buytaert

signmaker_ui

No security coverage
View on drupal.org

This Drupal block provides an interface to generate custom signs using the Signmaker application. It allows administrators to configure the sign generation process through block settings.

Overview

The Signmaker UI block embeds an iframe into the Drupal page, displaying the Signmaker application. This application enables users to create printable signs by selecting images from a specified directory and defining their layout within a bounding box. The block's configuration allows administrators to set the image directory based on a taxonomy term and define the bounding box coordinates.

Prerequisites

  • The media module enabled.
  • A field_refuse_type field on the media entity, containing allowed values for refuse types.
  • Directories in files/signmaker/ that correspond to the allowed values of the field_refuse_type field, each containing images and a background image.

Installation

  1. Enable the signmaker_ui module: Install and enable the signmaker_ui module in your Drupal site.
  2. Ensure Signmaker Application is installed: Verify that the PHP Signmaker application is installed and functioning correctly as described in its documentation.
  3. Configure Media Types: Make sure that the media types that will be used have the field_refuse_type field with allowed values that correspond to directories in files/signmaker/.

Configuration

  1. Place the Block: Navigate to the "Block layout" page (/admin/structure/block) and place the "Signmaker Block" in a region of your choice.
  2. Configure the Block:
    • Type: Select the refuse type from the dropdown. This determines the directory from which images are loaded (files/signmaker/{type}). The values from the field_refuse_type field on the media entity are used to populate this dropdown.
    • Bounding Box of Images:
      • Top: Percentage from the top of the background image.
      • Right: Percentage from the right of the background image.
      • Bottom: Percentage from the bottom of the background image.
      • Left: Percentage from the left of the background image.

Usage

Once the block is configured and placed, it will display an iframe containing the Signmaker application. Users can interact with the application within the iframe to create and generate signs.

Dependencies

  • Drupal Core
  • Media module
  • The PHP Signmaker application (included)

Assets

  • signmaker_ui/signmaker_embed: A Drupal library that may contain additional CSS or JavaScript to enhance the iframe integration (not included in the provided code, so needs to be created if extra functionality is desired).

Notes

  • Ensure the files/signmaker/{type} directories exist and contain the necessary images and background.
  • Adjust the iframe's width and height attributes to fit your layout.
  • Error handling is minimal; consider adding more robust validation and error reporting.
  • The signmaker_ui/signmaker_embed library is not defined in the provided code. If you need client-side interactions or styling for the iframe, create this library.
  • The url parameter root is very important for the external application to function correctly.

Activity

Total releases
5
First release
Jan 2025
Latest release
8 months ago
Release cadence
37 days
Stability
80% stable

Release Timeline

Releases

Version Type Release date
1.0.3 Stable Jun 18, 2025
1.0.2 Stable Jun 18, 2025
1.0.x-dev Dev Jun 18, 2025
1.0.1 Stable Jan 21, 2025
1.0.0 Stable Jan 21, 2025