forked from arthurk/django-disqus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tags to use new Disqus format. Added variable mapping for bac…
…kwards compat. Closes arthurk#75
- Loading branch information
1 parent
0db52c2
commit 6cc2517
Showing
5 changed files
with
55 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +0,0 @@ | ||
{% if disqus_url %} | ||
<script type="text/javascript"> | ||
var disqus_developer = 1; | ||
var disqus_url = '{{ disqus_url }}'; | ||
</script> | ||
{% endif %} | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1 @@ | ||
<script type="text/javascript"> | ||
{% block config_variables %} | ||
var disqus_shortname = '{{ shortname }}'; | ||
{{ config|safe }} | ||
{% endblock %} | ||
/* * * DON'T EDIT BELOW THIS LINE * * */ | ||
(function () { | ||
var s = document.createElement('script'); s.async = true; | ||
s.type = 'text/javascript'; | ||
s.src = '//' + disqus_shortname + '.disqus.com/count.js'; | ||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); | ||
}()); | ||
</script> | ||
<script id="dsq-count-scr" src="//{{ shortname }}.disqus.com/count.js" async></script> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
<div id="dsq-recent-comments" class="dsq-widget"> | ||
<script type="text/javascript"> | ||
{% block config_variables %} | ||
var disqus_shortname = '{{ shortname }}'; | ||
{{ config|safe }} | ||
{% endblock %} | ||
</script> | ||
<script src='//{{ shortname }}.disqus.com/recent_comments_widget.js?num_items={{ num_items }}&hide_avatars={{ hide_avatars }}&avatar_size={{ avatar_size }}&excerpt_length={{ excerpt_length }}'> | ||
</script> | ||
<script src='//{{ shortname }}.disqus.com/recent_comments_widget.js?num_items={{ num_items }}&hide_avatars={{ hide_avatars }}&avatar_size={{ avatar_size }}&excerpt_length={{ excerpt_length }}'></script> | ||
</div> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
<div id="disqus_thread"></div> | ||
<script type="text/javascript"> | ||
/* <![CDATA[ */ | ||
{% block config_variables %} | ||
var disqus_shortname = '{{ shortname }}'; | ||
<script> | ||
|
||
/** | ||
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. | ||
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ | ||
|
||
var disqus_config = function () { | ||
{{ config|safe}} | ||
{% endblock %} | ||
/* * * DON'T EDIT BELOW THIS LINE * * */ | ||
(function() { | ||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | ||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; | ||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | ||
})(); | ||
/* ]]> */ | ||
}; | ||
|
||
(function() { // DON'T EDIT BELOW THIS LINE | ||
var d = document, s = d.createElement('script'); | ||
s.src = '//{{ shortname }}.disqus.com/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
</script> | ||
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | ||
<a href="//disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a> | ||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> |
This file contains 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