Highlighted

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

Engaged ,
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

671

Likes

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

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

Engaged ,
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

672

Likes

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
May 14, 2020 0
Engaged ,
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

Likes

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
Reply
Loading...
May 14, 2020 0
Adobe Community Professional ,
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. 

Likes

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
Reply
Loading...
May 14, 2020 0
RoboFan LATEST
Engaged ,
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. 

Likes

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
Reply
Loading...
May 15, 2020 0