PHPackages                             imhelle/yii-disqus-comments - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. imhelle/yii-disqus-comments

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

imhelle/yii-disqus-comments
===========================

Extension for adding synchronizable Disqus comments for Yii application

28PHP

Since Apr 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/imhelle/yii-disqus-comments)[ Packagist](https://packagist.org/packages/imhelle/yii-disqus-comments)[ RSS](/packages/imhelle-yii-disqus-comments/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii-disqus-comments
===================

[](#yii-disqus-comments)

Extension for adding Disqus comments () to Yii application. Provides to use Disqus comments widget and synchronization your comments from Disqus to your database (it can be useful for indexing comments by Google).

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

[](#installation)

To install via composer require the package in your composer.json:

```
"imhelle/yii-disqus-comments": "dev-master"

```

Also you can just clone project or extract the archive under protected/extensions directory in your Yii application.

Configuration
-------------

[](#configuration)

Extension need to be added in your application and console configs as a component:

```
'components' => array(
        ...
        'disqusComments' => array(
            'class' => 'application.vendor.imhelle.yii-disqus-comments.EDisqusComments', // or "ext.yii-disqus-comments.EDisqusComments" if you install it in extension folder.
            'apiKey' => 'YOUR_API_KEY',
            'shortName' => 'YOUR_SHORT_NAME'
        ),
        ...
```

The shortname is a specified name for your site that you should get after registering on

The API Key you'll receive by registering your application on , it's required for using Disqus Api.

For easy use a synchronization console commands you can add it to your commandMap in console config:

```
'commandMap' => array(
        'update_disqus_comments' => array(
            'class' => 'application.vendor.imhelle.yii-disqus-comments.commands.UpdateDisqusComments'
        ),
        'update_url_map' => array(
            'class' => 'application.vendor.imhelle.yii-disqus-comments.commands.UpdateUrlMap'
        ),
    ),
```

Apply the migration to create table for storing synchronized comments:

```
php yiic.php migrate --migrationPath=application.vendor.imhelle.yii-disqus-comments.migrations

```

Extension provides the cache usage for widget. You can set your Id of cache component you use.

```
'components' => array(
        'disqusComments' => array(
            'class' => 'application.vendor.imhelle.yii-disqus-comments.EDisqusComments',
            'apiKey' => 'YOUR_API_KEY',
            'shortName' => 'YOUR_SHORT_NAME',
            'cacheId' = 'cache' // you can set it here
        ),
```

Base Usage
----------

[](#base-usage)

Add this widget to the views to get the Disqus comments there:

```

```

This widget can receive an URL for current website page. It's necessary for getting synchronized comments from DB.

Extension has console command for synchronize comments from Disqus.

To synchronize all comments from Disqus (by URLs you have in comments table) run the console command

```
 php yiic.php update_disqus_comments all

```

Note: if you have many Disqus threads, execution of this command may take a long time.

To synchronize only the recent comments you can run this:

```
 php yiic.php update_disqus_comments recent

```

This command will get your last update time and request only the comment threads that was update by this time. It is recommended to add this command in your crontab to synchronize comments automatically.

To get the initial URL map from Disqus API you can run the command

```
 php yiic.php update_url_map fromApi

```

Also you can download the map in CSV format from Discus administration panel on  ("Start URL mapper" button) and update URLs from it:

```
 php yiic.php update_url_map fromCSV --filePath='PATH_TO_YOUR_FILE'

```

Extension also provides the automatic updating URLs in the database. If you set a $autoUpdateMap parameter as true, extension will synchronize the Disqus comments, when the widget is loaded.

```
'components' => array(
        'disqusComments' => array(
            'class' => 'application.vendor.imhelle.yii-disqus-comments.EDisqusComments',
            'apiKey' => 'YOUR_API_KEY',
            'shortName' => 'YOUR_SHORT_NAME',
            'autoUpdateMap' = true // this one
        ),
```

Please note that this parameter is true by default.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb8890c1fe4cc70beddea303794812b4a74350ed790cfb05d0df53b57dcfdffd?d=identicon)[sp-olga](/maintainers/sp-olga)

---

Top Contributors

[![imhelle](https://avatars.githubusercontent.com/u/11500481?v=4)](https://github.com/imhelle "imhelle (23 commits)")

### Embed Badge

![Health badge](/badges/imhelle-yii-disqus-comments/health.svg)

```
[![Health](https://phpackages.com/badges/imhelle-yii-disqus-comments/health.svg)](https://phpackages.com/packages/imhelle-yii-disqus-comments)
```

PHPackages © 2026

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