Disqus Widgets
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
This module provides comment widgets, and xautoload integration for the official Disqus PHP library.
Requirements
Related
- Disqus
-
The Disqus module provides JavaScript widget functionality and general Disqus commenting.
The notable differences between the two modules are that this module is built for the 3.0 Disqus API and provides a working class wrapper for that version, and the Disqus module relies on deprecated JavaScript widgets while providing a non-functioning class wrapper.
Installation
Download the Disqus PHP library from https://github.com/disqus/disqus-php and install into sites/all/libraries/disqus-php.
git clone git://github.com/disqus/disqus-php.git sites/all/libraries/disqus-php
Add the following code to the start of the disqusapi.php file after the initial opening php tag:
namespace Disqus;
use Exception;
This step is necessary for xautoload because of the way Disqus PHP is currently structured.
Configure the module at admin/config/services/disqus
Usage
Use disqus_widgets_disqus() to get a Disqus API object, or use the available blocks as designed.
$disqus = disqus_widgets_disqus();
$disqus->posts->list(array('limit' => 10));
See http://disqus.com/api/docs/ for API information.
