Changes

Jump to navigation Jump to search
m
no edit summary
Line 1: Line 1: −
{{Widget
+
<noinclude>__NOTOC__
|description=Allows you to add DISQUS Comments.
+
This widget allows you to embed '''[https://www.disqus.com/ DISQUS Comments]''' on your wiki page.
|author=Sergey Chernyshev
  −
|provider=DISQUS
  −
|providerurl=https://disqus.com/
  −
|status=active
  −
|security=checked
  −
|addedon=2010-03-05
  −
}}
  −
This widget allows you to add [https://www.disqus.com/ DISQUS Comments] to your wiki page.
     −
To insert this widget, use the following code:
+
Created by [https://www.mediawikiwidgets.org/User:Sergey_Chernyshev Sergey Chernyshev]
   −
<nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>
+
== Using this widget ==
|id=</nowiki>[https://disqus.com/admin/register/ yourid]<nowiki>
+
For information on how to use this widget, see [https://www.mediawikiwidgets.org/DISQUS widget description page on MediaWikiWidgets.org].
|uniqid={{PAGENAME}}
  −
|url={{fullurl:{{PAGENAME}}}}
  −
}}</nowiki>
     −
You might want to create a template with this code called DISQUS and let people just use it like <code><nowiki>{{DISQUS}}</nowiki></code>.
+
== Copy to your site ==
 +
To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''.
 +
</noinclude><includeonly><div id="disqus_thread"></div>
 +
<script type="text/javascript">
 +
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
 +
    var disqus_shortname = '<!--{$id|escape:'urlpathinfo'}-->'; // required: replace example with your forum shortname
 +
    <!--{if (isset($uniqid))}-->var disqus_identifier = '<!--{$uniqid|escape:'quotes'}-->';<!--{/if}-->
 +
    <!--{if (isset($url))}-->var disqus_url = '<!--{$url|escape:'quotes'}-->';<!--{/if}-->
   −
== Parameters ==
+
    /* * * DON'T EDIT BELOW THIS LINE * * */
* '''id''' - short site id you used when [https://disqus.com/admin/register/ registered a site in DISQUS]
+
    (function() {
* '''uniqid''' - optional unique ID for the page - you can set it to <code><nowiki>{{PAGENAME}}</nowiki></code> for wikis (to make it work on edit pages, and other URLs for the same page.
+
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
* '''url''' - optional URL for permalinking
+
        dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
 
+
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
'''Note:''' Currently DISQUS has issues with styles where MW CSS overrides theirs and bullets show up all over the place, the only solution at the moment is to [https://docs.disqus.com/help/44/ switch to use their Narcissus theme].
+
    })();
{{Comments}}
+
</script>
 +
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
 +
<a href="https://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a></includeonly>
8,255

edits

Navigation menu