This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 'on'); | |
// More documentation on this DISQUS API endpoint at http://disqus.com/api/docs/forums/listMostActiveUsers/ | |
$key="<your DISQUS API application key>"; // Requires a registered DISQUS API application. Create one (free) at http://disqus.com/api/applications/ | |
$forum="<DISQUS forum>"; | |
$limit="100"; // list 100 users. max is 100 | |
// construct the query with our API key and the query we want to make | |
$endpoint = 'http://disqus.com/api/3.0/forums/listMostActiveUsers.json?api_key='.urlencode($key).'&forum='.$forum.'&limit='.$limit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 'on'); | |
$key="<your DISQUS API application key>"; // Requires a registered DISQUS API application. Create one (free) at http://disqus.com/api/applications/ | |
$remote_domain="<remote domain slug>"; // slug of the remote domain established at http://disqus.com/api/sso/ (the bolded word) | |
$remote_identifier="<unique ID>"; // unique ID passed in the remote_auth_s3 payload | |
// For more on unique ID see http://docs.disqus.com/developers/sso/ > "Using HMAC-SHA1 to pass user data" > "The message body (Base64-encoded)" > "id" | |
// construct the query with our API key and the query we want to make | |
// FORMAT: user=remote:remote_domain-remote_identifier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 'on'); | |
$key="<api key>"; // Requires a registered DISQUS API application. Create one (free) at http://disqus.com/api/applications/ | |
$thread="<DISQUS thread ID>"; | |
$forum="<DISQUS forum shortname>"; | |
// construct the query with our apikey and the query we want to make | |
// Change api_key to api_secret when using your secret key | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set('America/Los_Angeles'); | |
$apikey = '<your key here>'; // get keys at http://disqus.com/api/ — can be public or secret for this endpoint | |
$forum = '<your DISQUS forum shortname>'; | |
$limit = '100'; // max is 100 for this endpoint. 25 is default | |
$order = 'asc'; // asc = oldest to newest. default is desc | |
$since = '1320123600'; // 1320123600 = nov 1, 2011 midnight EST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 'on'); | |
$thread="<thread ID goes here>"; // e.g., 455718495 — you'll need to also create a $forum and pass that if you know only the thread's URL or identifier rather than the ID | |
$api="<key goes here>"; // Generate one at http://disqus.com/api/applications/ -- Secret key is required for anonymous comment posting | |
$message="Hello world."; // this is the content of the comment, i.e., what you'd normally type in the postbox | |
$author_email="sample@disqus.com"; // optional, including this will still make the comment a guest comment, but it will now be claimable | |
$author_name="Bruce Wayne"; // optional, can be any display name you like | |
$fields_string=""; // DO NOT EDIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var script = document.createElement('script') | |
script.src = 'http://code.jquery.com/jquery.js' | |
document.head.appendChild(script) | |
$('.container').find('.child-class').find('input[type="checkbox"]').attr('checked', true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redirect to PHP if it exists. | |
# e.g. example.com/foo will display the contents of example.com/foo.php | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}.php -f | |
RewriteRule ^(.+)$ $1.php [L,QSA] |