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/14 20:45] – Added the comment count inside the admin entry list scrapblox | 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 19: | Line 21: | ||
| Now you're going to want to make a new file in the same directory called " | Now you're going to want to make a new file in the same directory called " | ||
| - | [code] <div itemscope itemtype=" | + | <code> <div itemscope itemtype=" |
| {* using the following way to print the date, if more *} | {* using the following way to print the date, if more *} | ||
| {* than one entry have been written the same day, | {* than one entry have been written the same day, | ||
| 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.1655232335.txt.gz · Last modified: by scrapblox
