PHPackages                             dukt/like - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dukt/like

ActiveCraft-plugin

dukt/like
=========

Like plugin for Craft CMS

1.0.1(8y ago)44208[3 issues](https://github.com/dukt/like/issues)[2 PRs](https://github.com/dukt/like/pulls)PHP

Since Jun 3Pushed 3y ago3 watchersCompare

[ Source](https://github.com/dukt/like)[ Packagist](https://packagist.org/packages/dukt/like)[ RSS](/packages/dukt-like/feed)WikiDiscussions v1 Synced 3d ago

READMEChangelog (5)Dependencies (1)Versions (3)Used By (0)

Like for Craft CMS
==================

[](#like-for-craft-cms)

A simple plugin to connect to Like's API.

---

Installation
------------

[](#installation)

1. Download the latest release of the plugin
2. Drop the `like` plugin folder to `craft/plugins`
3. Install Like from the control panel in `Settings > Plugins`

Templating
----------

[](#templating)

### Like button

[](#like-button)

```
{% if currentUser %}
    {% if craft.like.isLike(element.id) %}
         Unlike
    {% else %}
         Like
    {% endif %}
{% else %}
    Like
{% endif %}

```

### List likes for an element

[](#list-likes-for-an-element)

```
{% set likes = craft.like.getLikes(element.id) %}

{% if likes|length > 0 %}

    {% for like in likes %}

            {% if like.user.photoUrl %}

            {% else %}

            {% endif %}

    {% endfor %}

{% endif %}

```

### Your Likes

[](#your-likes)

Entries and asset that you like.

Entries:

```
{% set entries = craft.like.getUserLikes('Entry') %}

{% if entries %}

        {% for entry in entries %}
            {{entry.title}}
        {% endfor %}

{% else %}
    You haven't liked any entry yet.
{% endif %}

```

Assets:

```
{% set assets = craft.like.getUserLikes('Asset') %}

{% if assets %}

        {% for asset in assets %}

        {% endfor %}

{% else %}
    You haven't liked any asset yet.
{% endif %}

```

API
---

[](#api)

### LikeVariable

[](#likevariable)

- isLike($elementId)
- getLikes($elementId = null)
- getUserLikes($elementType = null, $userId = null)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~241 days

Total

3

Last Release

3150d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2911900?v=4)[Benjamin David](/maintainers/benjamindavid)[@benjamindavid](https://github.com/benjamindavid)

---

Top Contributors

[![benjamindavid](https://avatars.githubusercontent.com/u/2911900?v=4)](https://github.com/benjamindavid "benjamindavid (81 commits)")[![carlcs](https://avatars.githubusercontent.com/u/7516543?v=4)](https://github.com/carlcs "carlcs (2 commits)")

---

Tags

craft-plugincraft2craftcmslike

### Embed Badge

![Health badge](/badges/dukt-like/health.svg)

```
[![Health](https://phpackages.com/badges/dukt-like/health.svg)](https://phpackages.com/packages/dukt-like)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[johnbillion/user-switching

Instant switching between user accounts in WordPress and WooCommerce.

19768.3k2](/packages/johnbillion-user-switching)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
