Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

Interest in integrating Imgur API into core editor plugin?

This discussion is related to the ImgurUpload addon.
jamesincjamesinc Sydney ✭✭

I created the ImgurUpload plugin just before the new editor landed, which has the kind of easy drag-n-drop in it that my users were always complaining about ("Facebook is way easier!"). But hosting images on your own site is expensive, and why do it when the Imgur API is so good?

I was thinking about submitting a pull request to extend the editor with configurable Imgur API integration, but I'm not sure what the preferred approach for achieving this would be, from the perspective of a Vanilla core dev.

To keep the need for supporting a third-party service out of the core, I could update plugins/editor/js/editor.js to expose some callbacks, or hooks, that can be utilised by my plugin or any other plugin to hijack default functionality.

My own use cases would require hooks at two points:

  1. When checking permissions, as I want to allow Imgur API upload for all users, but only have file upload for some users
  2. When uploading the file, as images should go via Imgur, and non-images via the default file uploader functionality.

This may necessitate refactoring the fileUploadsInit function quite a bit.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    I would suggest making an addon that extends Advanced Editor. The devs are pretty amenable to adding events if it makes the plugin more extensible.

    I love the idea of imgur upload, but lots of people assume their images are going to be uploaded to the site they are on. Might have to make it visible that the files are being stored with a third party.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.