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 [2022/06/15 19:34] – fixed code tags 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 58: | Line 60: | ||
| - | </ | + | </ |
| Now we need to do some editing! | Now we need to do some editing! | ||
| 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 |
| + | |||
| + | Now, depending on how you have your site set up, and if you're like me, you'll want to display comments | ||
| + | |||
| + | To do that is very simple. Simply open up your theme's satic.tpl file and find where you want to put the comment section. Once you've done that, paste and edit the following code (matches the earlier code): | ||
| + | |||
| + | < | ||
| + | {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://disqus.com/ | ||
| + | /* | ||
| + | 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! | ||
| - | 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! | + | ==== Comment count in the admin panel ==== |
| - | ---- | + | (This addition was created by ScrapBlox): |
| - | Addition by (ScrapBlox): | ||
| Adding onto what was already said about this | Adding onto what was already said about this | ||
| Line 171: | Line 213: | ||
| {$commentcount|default: | {$commentcount|default: | ||
| < | < | ||
| + | |||
| + | ==== 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.1655314471.txt.gz · Last modified: by arvid
