chirp
Chirp is a microblogging module for sites running Drupal 11.3+.
Chirp provides a "twitter-like" microblogging functionality on top of Drupal's
built-in systems. Posts are Comment entities attached to User entities.
The module ships the application-specific wiring — blocks, services,
notifications, default config — and delegates generic functionality to
three related contrib modules.
Features
- Posts — Comment entities (
chirptype) on User profile pages - Character limits — 500 chars is the default, but this limit is configurable. The chirp creation form shows the character count for user awareness. (via the
role_aware_maxlengthmodule) - @mentions — parsed from post body, trigger in-app + notifications
- #hashtags — extracted into taxonomy terms on save (via the
hashtagsubmodule) - Chronological feed — own posts + followed users, cursor-paginated
- Follow / unfollow — Flag module user flags
- Like / dislike — Flag module, mutually exclusive (via the
flag_mutually_exclusivemodule) - Replies — native Comment threading
- Inline images — via the
chirp_photo_gallerysubmodule - @mentions — via the
ckeditor_mentionsplugin module - Notifications — notifications icon with an unread badge counter, plus optional email notification for @mentions (site configurable on/off, per-user opt-in)
- Bookmarks — popup add/remove, private Bookmarks page, user-menu link
- Rechirps — simple share + share-with-comment, shares counter
- Moderation System — report a chirp, moderator review queue, probation periods, permanent chirp bans
- User-to-user blocking — safety-mode + permanent
- Trending Topics — site-wide hashtag ranking + placeable block
- Personal photo gallery —
chirp_photo_gallerysubmodule +user_media_librarymodule - Frontend — htmx (Drupal core 11.3), Web Components, Stimulus.js
Post-Installation
The quickest and easiest way to get a working Chirp installation is to:
- Add the module to your drupal project using
composer require/li> - Enable the
chirp_configsubmodule, which installs all of the necessary components needed to get a working Chirp site. After Chirp is configured, this module can be safely uninstalled without losing any configuration, including the Flag components needed for a fully functional site.
The chirp_config submodule also contains a Drush command that will remove the Chirp configuration items created by chirp_config. Simply re-enable the module and run drush chirp-config:remove to cleanly remove all of the configuration items. After this, both chirp_config and chirp can be safely and cleanly uninstalled.
The project README contains more detailed installation instructions for those who wish to install components manually.
Installation note
Chirp Config assumes that your selected theme has a “Content” region, and places blocks that provide the user timelines on their user page, along with the “Trending Topics” block that shows trending items based on the use of hashtags.
If your site does not have a “Content” region, the placement of the Timeline and Trending Topics block will be skipped, and you’ll need to place them manually in the appropriate regions for your site theme’s structure, and additionally do any configuration needed to display the timeline and trending topics on a user’s profile page.
If you’d prefer to locate these to a different region, or onto a different page on your site, this can be accomplished using Drupal’s block layout functionality.
Chirp Demo
If you’d like to see a full working demo of the Chirp module, simply enable the Chirp Demo module which will:
- Enable Chirp and Chirp Config
- Create demo users, chirps, mentions, bookmarks and other content needed to demostrate the site’s functionality.
To remove the demo users, chirps, and other demo content, simply uninstall the Chirp Demo project and those items will be removed (any content or users you create will remain untouched).
Additional Requirements
- Drupal 11.3+
- Path Auto
- Token
- Flag
- CKEditor Mentions
- Message, Message Notify
- Hashtag (shipped in this project)
- Role Aware Maxlength
- Flag Mutually Exclusive
- Mail System
cweagans/composer-patches v 1.7composer plugin
Patches required
Chirp has a hard dependency on ckeditor_mentions (currently 4.0@alpha), which has two known bugs that break any site enabling
Chirp — both are declared in this module's composer.json file
MentionsPluginManager is injected into the Mentions CKEditor 5 plugin and called before it is fully initialized. Issue is in RTBC status.
Applied from the issue's own merge request.
ckeditor_mentions #3608783
The module's own memory cache bin service is declared public: false, which core's Cache::getMemoryBins() can never fetch (Symfony's DI container cannot retrieve a private service by ID) — breaks any Functional test, and any request path that sweeps all memory cache bins, the moment ckeditor_mentions is enabled. Filed by this project; patch attached to the issue.
Applied from the issue's own attachment. Issue is in “Needs Review” status.
Recommended modules/libraries
Private Message: Adds private messaging capabilities to a site. Chirp does not implement the ability to send direct messages to users, specifically because Private Message does that already.
Supporting this Module
This module is supported by Lisa Harrison (lisa.rae), an individual contributor and long-time member of the Drupal community.