Please upgrade here. These earlier versions are no longer being updated and have security issues.

Announcing the ImgurUpload plugin

This discussion is related to the ImgurUpload addon.

Hello,

This plugin allows users to drag'n'drop images into their post textboxes in discussions. Images are uploaded behind the scenes via the Imgur v3 REST API, and then markup is inserted into their post at the caret location.

I think this plugin is well overdue! My users complain, a lot, about how difficult it is to put images on the forums vs something like Facebook. If you have a tech-savvy userbase, you might not have this problem.

I haven't tested this outside my own site (Vanilla 2.1.11, theme based on the Bootstrap theme), so I'm expecting there to be bugs. Please report! I will work to resolve any teething issues as quickly as I can.

Bleistivtus3rR_JjackmaessenhgtonightjamesmercuryAdrianokhawaja
«1

Comments

  • No issues on 2.1.12p2

    jamesinc
  • I've encountered a minor issue. When creating a discussion, three "Add images" buttons appear and only the last one works. The first two are unresponsive.

  • jamesincjamesinc Sydney ✭✭

    Thanks for reporting. I added some code in 1.0.2 that might fix that. Are you using the latest version already?

    us3r
  • Will try when I get the chance.

  • Looking good now 2.1.12p2.

  • jamesincjamesinc Sydney ✭✭

    Good to hear! Thanks for letting me know

  • Hi, James!
    Just to report that it doesn't work on Vanilla 2.2.
    I recive this error when trying to access plugin settings after activate it.
    vanillaforum/index.php?p=/settings/imgurupload
    Page not found.

    Plugin version: 1.0.1 from GitHub and 1.0.3 from here.
    Vanilla version: 2.2 with some stock plugins activated.

    It's a really nice idea. I hope you can update it. Thank you.

    Cheers!

  • jamesincjamesinc Sydney ✭✭

    I'm currently in the process of merging 2.2 into my forums, so hopefully I'll have a 2.2 compatibility fix out soon.

    G0RR4
  • jamesincjamesinc Sydney ✭✭

    @G0RR4 I brought the Git repo up-to-date - looks like I forgot to do a push on Friday night.

    I also set up a clean install of 2.2 on a VM, but I am unable to replicate the issue you have reported - as far as I can see, the plugin is working correctly on a default 2.2 installation. Do you think you could debug it any further? If it's saying it can't find /settings/imgurupload, the only thing I can think is that the plugin is not being loaded at all (i.e. is disabled) but maybe there's some further info to be found in debug output.

  • Thank you for your answer and the time you took to setup a test enviroment.
    I disabled all stock plugins, installed the updated GitHub version, activated and the same not found error shows up when I click on settings.
    Is there anything I can do for help?

  • I can see the editor's hint "You can now drag and drop..." but can't drop anything.

  • jamesincjamesinc Sydney ✭✭

    Hmm, any chance you can PM me a login for your forum so I can take a look?

  • Of course but I think that it won't be necessary. There is something funny with my installation. I don't know what but it's in my side. I set up a fresh install in a LAMP VM an it worked. Then, I did the same in my ISP in other directory, worked again.
    I'll PM you if I break it.
    Thanks again.

  • G0RR4G0RR4 New
    edited November 2015

    I know what is going on. I can only view the plugins settings with the admin user created during Vanilla installation. I can't view it with another admin.
    Hope this helps.

    jamesinc
  • jamesincjamesinc Sydney ✭✭

    Is this the case with other plugins, or just mine?

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @jamesinc said:
    Is this the case with other plugins, or just mine?

    The permission is Garden Settings Manage which is an admin permission by default is normally what the permissions for other plugins settings are. If you want to give a moderator access to the settings, you need to also make them admin.

  • @jamesinc said:
    Is this the case with other plugins, or just mine?

    Hi! Just yours. I got it working, though. It's really fast!

    1. When I drop an image in advanced editor/wysiwyg format, it uploads to imgur AND my server. Is there a way to disable the server upload?
      I added this to config.php to workaround that:
      $Configuration['Garden']['Upload']['MaxFileSize'] = '0M';
      I have an error from Vanilla but the image goes to Imgur.

    2. Do you know if its possible to upload images to an imgur account and not anonynously?

    That is all.

  • jamesincjamesinc Sydney ✭✭

    @G0RR4 you can use the Imgur API in non-anonymous mode, however it works differently. I'm not going to support it in the plugin, because it's not really the purpose of the plugin, but basically you would want to modify the plugin so that instead of sending

    Authorization: Client-ID YOUR_CLIENT_ID
    

    it sends

    Authorization: Bearer YOUR_ACCESS_TOKEN
    

    If you authenticate with the API that way, using your access token (i.e. private key), anything you upload I believe will then appear in your images list when you log in to Imgur. There are other API methods you can use to create albums and so on, but again that's a bit beyond the scope I envisaged for this plugin.

    In terms of interference from the AdvancedEditor plugin, according to the source code here and here you can disable its inbuilt file-upload functionality by setting in your config:

    $Configuration['Garden']['AllowFileUploads'] = false;
    

    or

    $Configuration['Plugins']['Attachments']['Upload']['Allow'] = false;
    
  • Does this plugin only add images as attachments to the post? Is there any way to just show the image in the body of the post?

  • jamesincjamesinc Sydney ✭✭

    @Simeon_Griggs said:
    Does this plugin only add images as attachments to the post? Is there any way to just show the image in the body of the post?

    No, it does the opposite - it only adds images into the body of the post, and not as attachments.

Sign In or Register to comment.