PHPackages                             elephantsgroup/eg-comment - 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. elephantsgroup/eg-comment

ActiveYii2-extension

elephantsgroup/eg-comment
=========================

Yii2 comments module

1.0.2(7y ago)039[7 issues](https://github.com/ElephantsGroup/eg-comment/issues)4MITPHP

Since May 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ElephantsGroup/eg-comment)[ Packagist](https://packagist.org/packages/elephantsgroup/eg-comment)[ RSS](/packages/elephantsgroup-eg-comment/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (4)

To use Elephants Group comment module first you must install module, then you can use comment widget anywhere in your website.

Installation Steps:
===================

[](#installation-steps)

1. run

> php composer.phar require elephantsgroup/eg-comment "\*"

or add `"elephantsgroup/eg-comment": "*"` to the require section of your composer.json file.

2. migrate database

> yii migrate --migratiocommentnPath=vendor/elephantsgroup/eg-comment/migrations

3. add comment module to common configuration (common/config.php file)

```
    ...
    'comment' => [
        'class' => 'elephantsGroup\comment\Module',
    ],
    ...
]```

4) open access to module in common configuration

```'as access' => [
    'class' => 'mdm\admin\components\AccessControl',
    'allowActions' => [
        ...
        'comment/ajax/*',
        ...
    ]
]```

5) filter admin controller in frontend configuration (frontend/config.php file)

```'modules' => [
    ...
    'comment' => [
        'as frontend' => 'elephantsGroup\comment\filters\FrontendFilter',
    ],
    ...
]```

5) filter ajax controller in backend configuration (backend/config.php file)

```'modules' => [
    ...
    'comment' => [
        'as backend' => 'elephantsGroup\comment\filters\BackendFilter',
    ],
    ...
]```

Using comment widget
===

Anywhere in your code you can use comment widget as follows:
``````

You need to use Comments widget header in your page:
```use elephantsGroup\comment\components\Comments;```

Comment widget parameters
---

- item (integer): to separate comments between different items.
``````
``````

default value for item is 0
- service (integer): to separate comments between various item types.
``````

for example you can use different values for different modules in your app, and then use comment widget separately in modules.
default value for service is 0

- enabled_name (boolean): show name in comment form or not, default true
``````

- enabled_subject (boolean): show subject in comment form or not, default true
``````

- enabled_description (boolean): show description in comment form or not, default true
``````

- view_file (string): the view file path for rendering

``````

you can use these variables in your customized view:
* service
* item
* enabled_name
* enabled_subject
* enabled_description

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% 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 ~119 days

Total

3

Last Release

2679d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d41e8f68e70f82997981e9652a2eecfa2ce3ca858f7336af1e4715a875e9aa7?d=identicon)[ElephantsGroup](/maintainers/ElephantsGroup)

---

Top Contributors

[![arezoumajd](https://avatars.githubusercontent.com/u/19835588?v=4)](https://github.com/arezoumajd "arezoumajd (7 commits)")[![JalalJaberi](https://avatars.githubusercontent.com/u/2640561?v=4)](https://github.com/JalalJaberi "JalalJaberi (2 commits)")

---

Tags

yii2extensionyiicommentselephantsGroup

### Embed Badge

![Health badge](/badges/elephantsgroup-eg-comment/health.svg)

```
[![Health](https://phpackages.com/badges/elephantsgroup-eg-comment/health.svg)](https://phpackages.com/packages/elephantsgroup-eg-comment)
```

PHPackages © 2026

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