Unlike other assets, comments assets are not their own asset type. Instead, they are a source code asset with specially configured code inserted that connects to the third-party platform Disqus. Using the comments asset adds a Disqus-powered comments section to any page that the asset is inserted on.
As part of the LDP module, comments assets require LDP to be purchased and activated before they can be used in your site.
Generally, once comments is set up, there is no need to create additional assets. The same asset can be used on multiple pages and each page will have its own unique comments. However, it is possible to have multiple Disqus accounts, to segment down moderation to different administrators, in which case there would need to be an asset for each Disqus account.
Set UpLink to this section
Once LDP has been purchased, our implementations team provides you with code for the comments asset and add the necessary code to your web pages for it to work. As an administrator, you are required to create an account with Disqus and connect that account to the premade asset.
- Go to the Disqus website and create an account.
- When instructed, follow the steps to install Disqus on a site.
- Write down the shortname for your site, as you will use this to link Disqus to OU Campus.
- When asked to choose a platform, use "Universal Code." Ignore the code they give you, since you will be using our preconfigured code for the asset. This asset should have already been created during your implementation, but if not (or if you accidentally delete the original), the code can be found below these steps.
- Return to OU Campus and locate the comments asset in Content > Assets.
- Wherever the code says
EXAMPLE, replace it with your site shortname.
- Optionally, uncomment and configure one or both of the two configuration variables,
this.page.identifier. Read more about these two variables on this page from Disqus. These variables are meant to enhance the reporting capabilities of Disqus, and their values will change on a per-page basis.
- Save and publish the asset. It is now ready to be placed on pages.
Use the Disqus dashboard to moderate comments and other administrator tasks. For ease of access, consider linking to Disqus in the add-ons menu.
- Comments Asset Code
In addition to the source code asset, a small script is placed in the
<head>of each page on the site, which allows the same comments asset to be used on multiple pages. The script indicates on which page the comment came from, and works in conjunction with the
this.page.urlvariable located in the asset. Make sure this variable is uncommented in order to use this functionality.
This code is typically placed during the implementation process. Should it need to be re-added, place it in the
common.xsl(or similar, like
default.xsl). It looks like this:
Comments assets are inserted onto pages like normal assets. However, the comments forum displays at the bottom of the page, regardless of where in the page content the asset is placed. We recommend placing the asset at the end of the page, so as not to get in the way of writing content. Save and publish the page for comments to appear.