Awesome Open Source
Awesome Open Source

Disqus PHP API

PHP cURL Disqus API

Disqus Disqus

  • Gravatar
  • Emoji

Disqus

API Disqus

  • Guest Commenting Allow guests to comment
  • Pre-moderation None

  • PHP 5.6+ PHP cURL Disqus API
  • config.php

Disqus API AppAPI Key****API Secret config.php

App login.php

Disqus API

DEMO: http://blog.fooleap.org/disqus-php-api.html

Disqus Disqus id disqus_thread disqus_config

Disqus disqus_config

Disqus https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables

CSS

<link rel="stylesheet" href="path/to/iDisqus.min.css" />

<div id="comment"></div>

JS

<script src="path/to/iDisqus.min.js"></script>

var disq = new iDisqus('comment', {
    forum: 'ifool',
    api: 'http://api.fooleap.org/disqus',
    site: 'http://blog.fooleap.org',
    mode: 1,
    timeout: 3000,
    init: true
});

ID

  • new iDisqus(ID, OPTIONS);
  • DOM id
  • {String}
  • "comment"

OPTIONS

  • new iDisqus(ID, OPTIONS);
  • {Object}
api
  • API PHP http://api.fooleap.org/disqus
  • {String}

forum
  • Disqus forum shortname
  • {String}

site
  • http://blog.fooleap.org
  • {String}
  • location.origin
url
  • {String}
  • location.pathname + location.search
identifier
title
  • {String}
  • document.title
mode
  • 1 Disqus Disqus
  • 2
  • 3 Disqus Disqus
  • {Number}
  • 1
timeout
  • mode 1
  • {Number}
  • 3000
toggle
  • mode 3
  • Checkbox <input type="checkbox" id="comment-toggle" disabled /> "comment-toggle" Disqus
  • {String}
init
  • {Boolean}
  • false
autoCreate
  • Thread Thread true
  • {Boolean}
  • false
emojiPath
  • Emoji PNG
  • {String}
  • "https://assets-cdn.github.com/images/icons/emoji/unicode/"
emojiList
  • Emoji DEMO
  • {Object}
emojiPreview
  • Emoji
  • {Boolean}
  • false

init

destroy

count

  • data-disqus-url DEMO

popular