doc:tips:adddisqus
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:tips:adddisqus [2020/04/15 14:19] – arvid | doc:tips:adddisqus [2022/07/09 02:14] (current) – The first big code block code tag was messed up and made the guide hard to follow. (Fixed the layout of code tags) scrapblox | ||
---|---|---|---|
Line 4: | Line 4: | ||
Please refer to the forum if you have suggestions or questions regarding this guide. | Please refer to the forum if you have suggestions or questions regarding this guide. | ||
+ | |||
+ | ==== The Basics ==== | ||
The following assumes you already have a Disqus site created, and you've got your Disqus Universal Code ready. If not, please visit https:// | The following assumes you already have a Disqus site created, and you've got your Disqus Universal Code ready. If not, please visit https:// | ||
Line 93: | Line 95: | ||
< | < | ||
</ | </ | ||
+ | |||
+ | Remember to change " | ||
You can obviously place this where is best suited in your own code if your theme doesn' | You can obviously place this where is best suited in your own code if your theme doesn' | ||
Line 136: | Line 140: | ||
And finally, we're going to add the following discord count script right above the </ | And finally, we're going to add the following discord count script right above the </ | ||
- | < | + | < |
+ | |||
+ | Remember to change YOUR-DISQUS-SITE-NAME to your disqus comment site shortname. | ||
And there you have it, your Disqus comments system will be fully operational, | And there you have it, your Disqus comments system will be fully operational, | ||
- | If you want to see it working before | + | ==== Adding to static pages ==== |
+ | |||
+ | Now, depending on how you have your site set up, and if you're like me, you' | ||
+ | |||
+ | To do that is very simple. Simply open up your theme' | ||
+ | |||
+ | < | ||
+ | {literal}< | ||
+ | |||
+ | /** | ||
+ | * 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:// | ||
+ | /* | ||
+ | var disqus_config = function () { | ||
+ | this.page.url = YOUR-SITE-PAGE.URL/ | ||
+ | this.page.identifier = YOUR_UNIQUE_IDENTIFIER; | ||
+ | }; | ||
+ | */ | ||
+ | (function() { // DON'T EDIT BELOW THIS LINE | ||
+ | var d = document, s = d.createElement(' | ||
+ | s.src = ' | ||
+ | s.setAttribute(' | ||
+ | (d.head || d.body).appendChild(s); | ||
+ | })(); | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | Remember to change " | ||
+ | |||
+ | BUT, what if you've done this and now you don't want disqus comments on every static page? Easy! | ||
+ | |||
+ | You simply add the following code to the static pages you DON'T want disqus comments to appear on: | ||
+ | < | ||
+ | display: | ||
+ | }</ | ||
+ | |||
+ | And that is that! | ||
+ | |||
+ | ==== Comment count in the admin panel ==== | ||
+ | |||
+ | (This addition was created by ScrapBlox): | ||
+ | |||
+ | Adding onto what was already said about this | ||
+ | |||
+ | To get the comment count to show up in the //admin entry list// page. | ||
+ | |||
+ | Inside the // | ||
+ | Change [INSERT SHORT NAME] to your disqus comment section shortname (Can find on general tab in admin dashboard) | ||
+ | |||
+ | |||
+ | < | ||
+ | So after that you want to open //Blog > admin > panels > entry > admin.entry.list.tpl// | ||
+ | Find the following code | ||
+ | |||
+ | < | ||
+ | href=" | ||
+ | {* Compatibility with pre-0.702 *} | ||
+ | {$commentcount|default:$comments}< | ||
+ | < | ||
+ | And change that to | ||
+ | |||
+ | < | ||
+ | href=" | ||
+ | {* Compatibility with pre-0.702 *} | ||
+ | {$commentcount|default: | ||
+ | < | ||
- | If you just so happen to run into any problems, then I'll try to help, but it's a pretty simple guide and I'm sure it will be easy enough to implement! | + | ==== Closing Remarks ==== |
+ | If you just so happen to run into any problems, then we'll try to help, but it's a pretty simple guide and I'm sure it will be easy enough to implement! |
doc/tips/adddisqus.1586953193.txt.gz · Last modified: 2020/04/15 14:19 by arvid