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
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace Example |
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
<div id="disqus_thread" onresize="setHeight()"></div> | |
<script type="text/javascript"> | |
// Blog variables | |
var blog; | |
var msg = new gadgets.MiniMessage(__MODULE_ID__); | |
var prefs = new gadgets.Prefs(); | |
// Disqus variables | |
var disqus_shortname = prefs.getString("shortname"); |
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
// Url of Comments page | |
private string CommentsUri = "http://yoursite.com/comments/your_static_comments_page.html?" | |
+ "shortname=" + "YOUR_SHORTNAME" | |
+ "&url=" + HttpUtility.UrlEncode("ORIGINAL_ARTICLE_URL") | |
+ "&title=" + HttpUtility.UrlEncode("ORIGINAL_ARTICLE_TITLE") | |
+ "&identifier=" + HttpUtility.UrlEncode("ORIGINAL_ARTICLE_IDENTIFIER"); | |
private void Browser_Loaded(object sender, RoutedEventArgs e) | |
{ | |
Browser.IsScriptEnabled = true; // Make sure javascript is enabled |
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
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script type="text/javascript"> | |
var disqus_shortname = 'YOUR_DISQUS_SHORTNAME'; // required: replace example with your forum shortname | |
var disqus_identifier = 'THE_DISQUS_IDENTIFIER'; | |
var disqus_url = 'THE_PAGE_URL'; | |
var disqus_public_key = 'YOUR_API_PUBLIC_KEY'; // Get one at http://disqus.com/api/applications/ | |
$(document).ready(function () { | |
var req = $.ajax({ |
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
/// <summary> | |
/// Method to post a new comment | |
/// </summary> | |
public static async Task<string> PostComment(string threadid, string message, string guestemail, string guestname) | |
{ | |
if (!NetworkInterface.GetIsNetworkAvailable()) | |
return "Error: Not connected to the internet"; | |
// Create HTTP client | |
var gziphandler = new CompressedHttpClientHandler(); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Documents; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Media.Animation; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json.Linq; | |
using System.Net.NetworkInformation; | |
using System.Net.Http; | |
using AdvancedREI.Net.Http.Compression; | |
using example_project.Resources; |
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
import base64 | |
import hashlib | |
import hmac | |
import simplejson | |
import time | |
DISQUS_SECRET_KEY = '123456' | |
DISQUS_PUBLIC_KEY = 'abcdef' | |
def get_disqus_sso(user): |
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 | |
define('DISQUS_SECRET_KEY', '123456'); | |
define('DISQUS_PUBLIC_KEY', 'abcdef'); | |
$data = array( | |
"id" => $user["id"], | |
"username" => $user["username"], | |
"email" => $user["email"] | |
); |
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
<cfcomponent displayname="Comment" hint="Disqus Interface"> | |
<cfset VARIABLES.stcMemberInfo = StructNew() /> | |
<cfset VARIABLES.intUnixTimestamp = DateDiff("s", CreateDate(1970,1,1), Now()) /> | |
<cfset VARIABLES.stgPublicKey = ""> | |
<cfset VARIABLES.stgPrivateKey = ""> | |
<cfset VARIABLES.stgForumShortName = ""> | |
<cfset getMemberInfo() > |