• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Embed 3rd-Party Disqus Comment Script in RH Masterpage Footer: PAGE_URL + PAGE_IDENTIFIER Variables?

Enthusiast ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

Environment

  • RoboHelp 2019 (new, update 12)
  • Generating HTML5 Frameless output

 

Goal

  • Provide comments section at the bottom of each topic. Specifically, provide a Disqus (disqus.com) commenting section/functionality at the bottom of each of my RoboHelp topics, by inserting the Disqus service's code in the footer of my RoboHelp masterpages.

 

Problem

  • For each topic (webpage) the Disqus script in the footer of each topic requires 2 unique pieces of information: the PAGE_URL and a PAGE_IDENTIFIER. Actual script provided below, additional info/details from Disqus here: https://help.disqus.com/en/articles/1717084-javascript-configuration-variables
  • Hardcoding/manually entering this information for every topic would be both an implementation and a maintenance nightmare.

 

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

 

The Big Ask

  • Are there RoboHelp or (more likely) agnostic, standalone scripts (Java, PHP, etc.) that could generate and serve up this information? WordPress and other popular web development and hosting solutions apparently can do something similar via their custom-developed Disqus plugins. That might be easier for them since they're also the hosting service provider.

 

This may be a candidate for a feature/enhancement request, but I thought I'd see if anyone in the community had a solution first.

TOPICS
New UI , Scripting

Views

817

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

For context, here are 2 examples of how other platforms (Hubspot and WordPress) provide/generate the PAGE_URL and PAGE_IDENTIFIER information.

 

discus-variables.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

You could set this.page.url = location.origin + location.pathname, which should set it to the full path without query strings or hash (bookmarks). 

 

And the page identifier sounds a lot like a map number. So if you set up a map file, perhaps a friendly developer could write a script to plug the map number into your discus script. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 15, 2020 May 15, 2020

Copy link to clipboard

Copied

Amebr,

 

Thank you for the response - the map ID suggestion sounds promising. I think I have enough info I can take this to one of our developers for help with scripting. I'll post updates back here as I have them. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Did that work?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

LATEST

We never implemented the automated scripting side of this. However, I did get it working as a proof-of-concept. We're currently making changes to our hosting environment - completely different enviro. Once the dust settles from that effort, I'd like to revisit this, as we received positive feedback from our test audience.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp