ImgFlip: Adding a meme easily


(cpradio) #1

Taking a lot of what I learned with the ReplyGif plugin, I’ve developed one for ImgFlip too.

The GitHub Repo is located at

I’ve also built in features for future proofing. API Username and Password (in case ImgFlip starts to monitor the usage) and the URL, even though ImgFlip supports HTTPS already.

Please report any issues via GitHub or here.

Enjoy!

Update:
2015-10-02 14:00 PM EDT
Fixed the fact that multiple memes could be selected. I still need to look into handling any errors returned from the API properly.


ReplyGif: Adding reaction GIF easily
(cpradio) #2

Okay recent changes in Discourse have removed string-buffer and the use of rawTemplate, so to support non-updated versions, there is a tag v0.5.0 that will let you keep operating.

git clone --branch v0.5.0 https://github.com/cpradio/discourse-plugin-imgflip.git

For those that have upgraded, v1.0.0 is compatible with latest.


(cpradio) #3

With the Ember 2.4 upgrade now merged in, there is a release branch to use for older versions of Discourse

git clone --branch v1.0.0 https://github.com/cpradio/discourse-plugin-imgflip.git


(Daniela) #4

Today Imgflip doesn’t work

For more details please see here ImgFlip Plugin Example - Plugins - Discourse Sandbox by cpradio


(Sam Saffron) #5

My guess is that you got yourself blocked cause you are a fast typer. I did manage to post a post with an image there @cpradio you may want to default tl1 on your sandbox.


(cpradio) #6

Not sure. I see the following error:

XMLHttpRequest cannot load https://api.imgflip.com/get_memes?username=removed&password=removed&_=removed. 
Request header field Discourse-Visible is not allowed by Access-Control-Allow-Headers in preflight response.

That seems awfully specific to Discourse. Was there any changes around 'discourse/lib/ajax' that I should be aware of?


(Sam Saffron) #7

Ahh will that is new, I guess we broke you, you should not use the “discourse” ajax helpers here, they are designed for talking to Discourse. Instead just use jQuery direct.


(cpradio) #8

Fixed in


(cpradio) #10

No repro. On my sandbox, which is running latest, it works just fine. You will need to give me better reproduction steps.