Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

OGCB Likes

No security coverage Maintenance fixes only 5 sites

Part of the Ogcb ecosystem · 5 projects

This module enhances content engagement by displaying a list of users who have liked a piece of content. It shows a concise summary of usernames, and clicking it reveals a full list in a dialog overlay. The display and sorting of these usernames are configurable.

About

Like counters tell you how many people liked something. On a community site the more interesting question is usually who.

OGCB Likes provides a block that renders the users who liked the node you are looking at as a compact, readable line — "Liked by Anna, Max and 3 others". Every name links to the user profile, and the "3 others" link opens a dialog with the complete list, rendered in whichever user view mode you configure. When someone likes or unlikes the content, the line updates immediately without a page reload.

The likes themselves are stored by the Flag module. The module ships a like_node flag as optional configuration; which content types it applies to and who may use it stay under your control on the regular Flag screens. OGCB Likes only handles the display side.

Features

  • Names instead of numbers — a summary line of linked
    usernames rather than an anonymous counter.
  • Full list in a dialog — the overflow link opens a native
    HTML dialog element with every liker, rendered in a configurable user view mode, so profile pictures and fields come along.
  • Live updates — liking and unliking updates the summary and the dialog client-side, with no page reload.
  • Configurable per block instance — how many names appear before they collapse into "and X others", sorting by date liked or by username, ascending or descending, and the user view mode.
  • Permission aware — the block is only rendered for roles that hold the flag like_node permission.
  • Themeable — a single Twig template with named blocks and a documented ogcb-likes-* class namespace.

Requirements

  • Drupal 11
  • PHP 8.3 or newer
  • Flag 5.x

Getting started

Install with composer require drupal/ogcb_likes and enable the module. The like_node flag is created for you; open Structure → Flags to pick the content types it applies to, and grant the Flag Like (Node) permission to the roles that should be able to like content. Then place the Likes block — it sits in the Social category — on your node display via Block Layout or Layout Builder, and set the summary limit, sorting and user view mode in the block settings.

About the name

The module grew out of the Open Government Community Builder (OGCB) site template, which is where the ogcb_ prefix comes from. It has no dependency on OGCB and works on any Drupal site that uses Flag.

Supporting organizations

Development sponsored by erdfisch.

Drupal 11 · not 10

Ask your assistant about OGCB Likes

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • Flag
  • node Drupal core
  • user Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Apr 2026
Latest release
1 month ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.2 Stable 11 Aug 28, 2026
1.0.1 Stable 11 Jun 22, 2026
1.0.0 Stable 10–11 Jun 11, 2026
1.0.0-alpha2 Pre-release 10–11 Apr 23, 2026
1.0.0-alpha1 Pre-release 10–11 Apr 16, 2026