Giter Site home page Giter Site logo

Comments (12)

Legend23 avatar Legend23 commented on June 6, 2024 1

Hello, i'm using it in Grav CMS, and sadely the plugin work fine only with disqus, i would like to use Facebook plugin (i put my Facebook API on the settings).

from grav-plugin-jscomments.

Sommerregen avatar Sommerregen commented on June 6, 2024 1

Hi @Legend23 ,

first can you open a new issue, because your problem is not related with this thread? Secondly, can you provide information (what are your settings, Grav version etc.)? I know that all comment engines are working, because I tested them. Please let me know what you did.

Thanks.

from grav-plugin-jscomments.

Sommerregen avatar Sommerregen commented on June 6, 2024 1

Memo:

UPDATED:

  • Implemented Isso in v2.2.0, wheras Talkatv and TildeHash seem abandoned and not worth the integration

from grav-plugin-jscomments.

Sommerregen avatar Sommerregen commented on June 6, 2024

Hi @zeigerpuppy ,

as long as a specific service provides an API or a javascript file to embed them, it is not a problem to integrate. However documentation for Flarum is rare. I've found one here https://discuss.flarum.org/d/2317-how-to-use-flarum-ext-embed/ . For Talkative I've found an example here https://github.com/talkatv/talkatv/blob/master/examples/talkatv-test/index.html .

Do you know better ones? Can you test them and report your findings back here?

from grav-plugin-jscomments.

zeigerpuppy avatar zeigerpuppy commented on June 6, 2024

I'm trying with self-install of discourse currently.
I have it installed and working but when I configure and insert {{ jscomments() }} in a page, all I can see is a link to https://www.discourse.org/ and the text Blog Comments powered by Discourse.
I have set the URL of my discourse server, am I missing a setting to get it to direct to my server?

from grav-plugin-jscomments.

Sommerregen avatar Sommerregen commented on June 6, 2024

@zeigerpuppy From your description it seem that the URL you provided is wrong. Did you set providers.discourse.host? It must be the domain root of the discourse server.

You may also check the set URL here https://github.com/Sommerregen/grav-plugin-jscomments/blob/develop/templates/plugins/jscomments/discourse.html.twig#L15 . That's the Twig template file discourse.html.twig to be used for this comment provider.

from grav-plugin-jscomments.

zeigerpuppy avatar zeigerpuppy commented on June 6, 2024

Hi @Sommerregen,

Thanks for the details. I have set the URL of the discourse server in providers.discourse.host.
The discourse server is set as a private server, I wonder if this may be a problem?
I'd be happy to share the URLs by private message if that helps.

from grav-plugin-jscomments.

zeigerpuppy avatar zeigerpuppy commented on June 6, 2024

I had a look at the page source rendered by the plugin and it looks like something is getting mangled in the html links.

In the example below, the grav instance is on https://grav.myserver.net and the discourse forum is on https://forum.myserver.net

<div id="jscomments">
  <div id="discourse-comments"></div>

  
  <script type="text/javascript">
    var DiscourseEmbed = {
      discourseUrl: 'https\x3A\x2F\x2Fforum.myserver.net\x2F',
      discourseEmbedUrl: 'http\x3A\x2F\x2Fgrav.myserver.net\x2Fblog\x2Ftheme\x2Dsetup'
    };

    (function() {
      var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
      d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
    })();
  </script>
  <noscript>Please enable JavaScript to view the <a href="https://www.discourse.org/" rel="nofollow">comments powered by Discourse.</a></noscript>
  <a href="https://www.discourse.org/" rel="nofollow">Blog Comments powered by <span>Discourse</span>.</a>
</div>

from grav-plugin-jscomments.

zeigerpuppy avatar zeigerpuppy commented on June 6, 2024

I tried inserting the javascript directly in the post, but the comments show up as an empty block.
I think I may have found the error, however:

Refused to display 'https://forum.myserver.net/embed/comments?embed_url=https%2F%2Fgrav.myserver.net%2Fblog%2Ftheme-setup' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. 

Looks like the old X-Frame-Options issue!

from grav-plugin-jscomments.

zeigerpuppy avatar zeigerpuppy commented on June 6, 2024

OK, I managed to fix it (mostly)

I fixed some X-Frame options in the apache reverse proxy and the plugin is working well now.

Now the only issue is that discourse is serving some URLs as http but I think that can be resolved fairly easily.

see here for the https issue: https://meta.discourse.org/t/force-https-for-login-url/53554

edit: this is solved by enabling the "force https" option in the discourse settings. Search for "use https" in the settings.

from grav-plugin-jscomments.

Sommerregen avatar Sommerregen commented on June 6, 2024

@zeigerpuppy Soory, forgot to respond here. Glad you found it out. It seems a really tricky issue. Maybe this is worth a PR to be added in the README.md?

from grav-plugin-jscomments.

efeefe avatar efeefe commented on June 6, 2024

@zeigerpuppy I know this thread is some years old, but could you share more about your solution? I'm getting a similar problem nowadays.

from grav-plugin-jscomments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.