Advertisement:

Author Topic: How to get page identifier and page url while setting disqus comment system  (Read 117 times)

moinuddin

  • Full Member
  • ***
  • Posts: 102
How to get page identifier and page url while setting  disqus  comment system in our public profile page ?

I have installed disqus in my public profile page ..but don't have any idea about url identifier and page url...

does any one knows about it??


Thanks in advance .

moinuddin

  • Full Member
  • ***
  • Posts: 102
I think this would be the url of user public profile page

<?php echo osc_user_public_profile_url(); ?>

As this is the link where we can call the publisher of the page

Any ideas?

moinuddin

  • Full Member
  • ***
  • Posts: 102
These are the code which i got from disqus

<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
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://footwearwholesale-in-1.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">comments powered by Disqus.</a></noscript>
                           

Second part of code is


<script id="dsq-count-scr" src="//footwearwholesale-in-1.disqus.com/count.js" async></script>



It says that


(Recommended) Edit the RECOMMENDED CONFIGURATION VARIABLES section using your CMS or platform's dynamic values. See our documentation to learn why defining identifier and url is important for preventing duplicate threads.



Append #disqus_thread to the href attribute in your links. This will tell Disqus which links to look up and return the comment count. For example: <a href="http://foo.com/bar.html#disqus_thread">Link</a>.


I think disqus is very complicated ..fb comment is very easy to integrate...but unfortunately fb is not working on my website , hence want to implement disqus


Does anyone know about how to implement disqus comments on osclass..as i have searched google and YouTube but nothing is there regarding this topic.


Thanks in advance

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
Hello!

I guess you would use <?php echo osc_user_public_profile_url(); ?> for page URL and something like pubprofile-<?php echo osc_user_id(); ?> for page identifier.

Regards.

moinuddin

  • Full Member
  • ***
  • Posts: 102
Thanks webmods,

Ill try it and will let you know .