PHPackages                             dukt/follow - 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/follow

ActiveCraft-plugin

dukt/follow
===========

Follow plugin for Craft CMS

1.0.1(8y ago)14142[2 issues](https://github.com/dukt/follow/issues)PHP

Since Jun 3Pushed 8y ago4 watchersCompare

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

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

Follow for Craft CMS
====================

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

A simple plugin to connect to Follow's API.

---

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

[](#installation)

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

Templating
----------

[](#templating)

### Following

[](#following)

Users that you are following.

```
{% if not currentUser %}
    You need to login in order to see the users you follow.
{% else %}
    {% set users = craft.follow.getFollowing() %}

    {% if users|length > 0 %}

        You are following {{users|length}} users.

            {% for user in users %}

                    {% include 'follow/_user' with { user: user } %}

            {% endfor %}

    {% else %}
        {{ "You are not following anyone."|t }}
    {% endif %}

{% endif %}

```

### Followers

[](#followers)

Users that are following you.

```
{% if not currentUser %}
    {{ 'You need to login in order to see you followers.'|t({ url: url('follow/login') })|raw }}
{% else %}
    {% set users = craft.follow.getFollowers(currentUser.id) %}

    {% if users %}

        {{ "You have {count} followers."|t({ count: users|length }) }}

            {% for user in users %}

                    {% include 'follow/_user' with { user: user } %}

            {% endfor %}

    {% else %}
        {{ "No one is following you." }}
    {% endif %}
{% endif %}

```

### Activity

[](#activity)

Recent entries from users you are following.

```
{% if not currentUser %}
    {{ 'You need to login in order to see the activity of users you follow.'|t({ url: url('follow/login') })|raw }}
{% else %}
    {% set followingUsers = craft.follow.getFollowing( user.id ) %}

    {% set followingUserIds = [] %}
    {% for followingUser in followingUsers %}
        {% set followingUserIds = followingUserIds|merge([ followingUser.id ]) %}
    {% endfor %}

    {% if followingUserIds|length > 0 %}

        {% set entries = craft.entries.authorId(followingUserIds).find() %}

        {% if entries|length %}
            {% for entry in entries %}

                        {% if entry.author.photoUrl %}
                            {% set photoUrl = entry.author.photoUrl(80) %}
                        {% else %}
                            {% set photoUrl = resourceUrl('images/user.gif') %}
                        {% endif %}

                        {{ entry.author.fullName }}

                        {{ entry.title }}

                            {{ entry.postDate.nice }}

                        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia, unde molestias odit mollitia sint. Similique, nesciunt, sunt, magnam enim asperiores totam consequuntur ratione nemo quam ut vitae accusantium blanditiis esse.

                        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia, unde molestias odit mollitia sint. Similique, nesciunt, sunt, magnam enim asperiores totam consequuntur ratione nemo quam ut vitae accusantium blanditiis esse.

            {% endfor %}
        {% else %}
            {{ "Start following some users to see their recent entries."|t }}
        {% endif %}
    {% else %}
        {{ "Start following some users to see their recent entries."|t }}
    {% endif %}

{% endif %}

```

### user.html

[](#userhtml)

```
{% set followers = craft.follow.getFollowers(user.id) %}

                        {% if user.photoUrl %}
                            {% set photoUrl = user.photoUrl %}
                        {% else %}
                            {% set photoUrl = resourceUrl('images/user.gif') %}
                        {% endif %}

                        {{ user.fullName }}

                        {% set followersCount = followers|length %}

                        {% if followersCount > 1 %}
                            {{ "{count} followers"|t({ count: followersCount }) }}
                        {% else %}
                            {{ "{count} follower"|t({ count: followersCount }) }}
                        {% endif %}

                        {% if currentUser and currentUser.id != user.id %}
                            {% if craft.follow.isFollow(user.id) %}
                                {{ "Unfollow"|t }}
                            {% else %}
                                {{ "Follow"|t }}
                            {% endif %}
                        {% else %}
                            {{ "Follow"|t }}
                        {% endif %}

```

API
---

[](#api)

### FollowVariable

[](#followvariable)

- isFollow($elementId)
- getFollowers($userId = null)
- getFollowing($userId = null)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 (64 commits)")

---

Tags

craft-plugincraft2craftcmsfollow

### Embed Badge

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

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

###  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)
