ReplyGif: Adding reaction GIF easily

I’m currently using this: https://github.com/davidmh/discourse-giphy

1 Like

The plugin has been updated to support SVG icons with Font Awesome 5

2 Likes

I’ve added this plugin following the guidelines on the github page, but it doesn’t work! I’ve also added it under hooks, but the problem persists. How can I properly install it, or uninstall if it doesn’t work eventually? Thanks in advance!

To uninstall, you simply remove it from your app.yml.

Are you running on HTTPS? Did you add the template to support a reverse proxy?

3 Likes

Fixed! Thank you very much!

3 Likes

Thanks for this great plugin.

I just have a little issue, the icon to insert a Gif doesn’t appear in the window, do you have any idea where it could come from ?

Core’s icons changed to be based on fontawesome 5 sets, which is probably why the icon’s missing. The plugin would need to be updated here to support it.

3 Likes

I don’t think that is it… it already supports FA 5.
https://github.com/cpradio/discourse-plugin-replygif/blob/master/plugin.rb

3 Likes

On latest, on my sandbox, the icon works fine…

I need to know the Discourse version and if there are any console related errors on your site.

4 Likes

So… is this still working for anyone?

I didn’t take a look at this plugin for a few years but today I did… and the world is https now - after using the reverse proxy solution the JSON that is returned still has URL’s with http:// in them, so they are not showing because of mixed content?

4 Likes

Update: we’ve fixed the above issue by doing the following in our nginx config.
(Disclaimer: I don’t know if the docker image includes the ngx_http_sub_module)

  location /replygif/ {
        proxy_pass http://replygif.net/;
        proxy_set_header Accept-Encoding "";
        sub_filter http://replygif.net/ /replygif/;
        sub_filter_once off;
        sub_filter_types application/json;
  }

The API URL in your settings should be https://yourforumname/replygif/api/ if you use this.

@PaulinaMX this is working on your forum now

7 Likes

@RGJ Thank you very much :heart: the categories are working perfectly, only it seems that the tags are not working.

That seems to be an issue in the plugin itself. @cpradio do you have any idea?

https://github.com/cpradio/discourse-plugin-replygif/blob/a9a1b5c4f28f055f9210babfcd6d06ab87d9fad7/assets/javascripts/discourse/components/replygif-tag-selector.js.es6#L13

1 Like

@cpradio We need you :heart:

Would this fix the blocked:mixed-content, as current browsers block http content from website that is https?

You need to follow the proxy instructions.
https://github.com/cpradio/discourse-plugin-replygif

There is a section on the README regarding HTTPS.

TL;DR proxy configuration there, but doesn’t solve problem, as non-proxy links still fetched.

Details:

I inspected the server, and it is configured as per your instructions. I went into the container itself to inspect the discourse.conf and found that the proxy pass was appropriately setup.

Using Chromium developer tools (Network), I do see queries going through the proxy, e.g. https://mycompany.com/replygif/gifs?api-key=39YAprx5Yi&reply=Angry. It returns a JSON, with URLs like http://replygif.net/i/1032.gif.

Afterward, network connection from my client brower, will request thumbnails, such as http://replygif.net/thumbnail/176.gif. This then obviously will fail, because CSP will block mixed content (http + https).

I do not know how the ember.js application works, but deducing from the network traffic, it looks like there are queries to get a JSON back with Image URLs which are later fetched for the thumbnails, but those image links themselves won’t work, and proxypass won’t fix this.

To solve this, it looks like the ember app itself would have to be configured to rewrite these URL references to match the same referenced URL through the proxy, e.g. https://mycompany.com/replygif/thumbnail/176.gif.

Thoughts? Suggestions?

1 Like

Doesn’t seem there is much I can do about that. As it looks like replygif still does not support HTTPS.

2 Likes

I’m a noob at this stuff, is there a step-by-step guide to set up a reverse proxy for this plugin?

Secure site, hosted with digitalocean, if that helps.

Yes, the readme walks you through the steps. Even has the wget command to put the template in the right location, then its a matter of updating your app.yml to use the template.

2 Likes