Modern Campus Catalog Emblem Modern Campus CMS Emblem Modern Campus Curriculum Emblem Modern Campus Involve Emblem Modern Campus Lifelong Learning Extended Education Emblem Modern Campus Message Emblem Modern Campus Navigate Emblem Modern Campus Schedule Emblem Modern Campus Virtual Tours & Maps Emblem Modern Campus Lifelong Learning Workforce and Community Emblem Site Menu Open Site Menu Close

Comments Asset

Comments assets are not their own asset type but a source code asset with specially configured code that connects to the third-party platform Disqus. Use the comments asset to add a Disqus-powered comments section to any page that the asset is inserted on.

Set up a comments asset and use it on multiple pages and each page will have its own unique comments. If you have multiple Disqus accounts, to segment moderation to different administrators, set up an asset for each Disqus account.

Set UpLink to this section

The Modern Campus CMS implementation 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.

  1. Go to the Disqus website and create an account.
  2. 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 Modern Campus CMS.
    • 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.
  3. Return to Modern Campus CMS and locate the comments asset in Content > Assets.
  4. Wherever the code says EXAMPLE, replace it with your site shortname.
  5. Optionally, uncomment and configure one or both of the two configuration variables, this.page.url and 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.
  6. 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
<div id="disqus_thread"></div> <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 () { this.page.url = page_url; // Replace PAGE_URL with your page's canonical URL variable //this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable }; */ // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW var shortname = 'EXAMPLE'; //IMPORTANT: Replace EXAMPLE with your forum shortname! (function() { 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="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

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.url variable 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 <head> tag of common.xsl (or similar, like default.xsl). It looks like this:

<script type="text/javascript"> var page_url="<xsl:value-of select="concat(string-join(remove(tokenize(substring($ou:httproot, 1), '/'), count(tokenize(substring($ou:httproot, 1), '/'))), '/'),$ou:path)"/>"; </script>

UseLink to this section

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.

EditLink to this section

Edit an existing comments asset, as follows:

  1. Navigate to Content Assets.
  2. Click on the name of the asset you want to edit.
  3. Check out the asset. 
  4. Click Edit in the page actions toolbar.
  5. Edit the asset content.
  6. Click Save.
  7. Publish the asset for your changes to appear on the live website.

By continuing to use this site, you agree to the storing of first- and third-party cookies on your device to enhance site navigation; analyze site, product, and service usage; and assist in our marketing and promotional efforts. Cookie Policy