Skip to content
DISQUS widget for Yii2
Branch: master
Clone or download
Latest commit 5bcfe9e Mar 19, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src update to new standards Mar 19, 2015
tests/functional update to new standards Mar 19, 2015
.gitattributes update to new standards Mar 19, 2015
.gitignore update to new standards Mar 19, 2015
.scrutinizer.yml update to new standards Mar 19, 2015
.travis.yml update to new standards Mar 19, 2015
CONTRIBUTING.md
LICENSE.md update to new standards Mar 19, 2015
README.md Merge remote-tracking branch 'origin/master' Mar 19, 2015
composer.json fix silly mistake Mar 19, 2015
composer.lock update to new standards Mar 19, 2015
phpunit.xml.dist

README.md

DISQUS Widget for Yii2

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

DISQUS widget helps you to render your DISQUS comments thread or DISQUS comments thread count on your Yii2 applications.

Installation

The preferred way to install this extension is through composer.

Either run

composer require 2amigos/yii2-disqus-widget:~1.0

or add

"2amigos/yii2-disqus-widget" : "~1.0"

to the require section of your application's composer.json file.

Usage

To display DISQUS comments

use dosamigos\disqus\Comments;

echo Comments::widget([
    // see http://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables
    'shortname' => '{yourforumshortname}',
    'identifier' => 'article_identifier'
]);

To display DISQUS comments count, first setup the link where you wish to display the comments (visit DISQUS integration)

<a href="http://example.com/#disqus_thread">article</a>

By default Disqus looks up the count using the comment count links href attribute. However, the count can also be looked up using a Disqus identifier:

<a href="http://example.com/#disqus_thread" data-disqus-identifier="article_identifier">article</a>

Then is just a matter to render the CommentsCount widget:

use dosamigos\disqus\CommentsCount;

CommentsCount::widget([
    'shortname' => '{yourforumshortname}',
    'identifier' => 'article_identifier'
]);

Further Information

Please, check the DISQUS developers documentation for further information about its integration and configuration options.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The BSD License (BSD). Please see License File for more information.

2amigOS!
Web development has never been so fun!
www.2amigos.us

You can’t perform that action at this time.