Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Attachment Extension 1.4

edited August 2006 in Vanilla 1.0 Help
This extension allows users to add attachments to their posts. You can change the max filesize and filetypes in the settings.php. You'll have to create an upload folder and give it write permission. Default path is your root vanilla folder /uploads.

Attachments 1.4

Now with thumbnail and inline image display support
Thanks to ithcy and jakob!

«13456714

Comments

  • Options
    Great work!! Will be used for sure once I switch to 0.9.3 :)
  • Options
    Nice nice nice! Would thumbnails of an attached image show up in the main discussions list? See http://lussumo.com/community/comments.php?DiscussionID=1204 and http://lussumo.com/community/comments.php?DiscussionID=1152 for discussions about image uploading which might be of interest, as I think you are very close to answering a lot of people's requests with this plugin :-)
  • Options
    edited December 2005
    Yes, auto-thumbnailing is my first priority :) But does anyone have a nice example for embedding the images? I want it to look neat :) Should I make the thumb clickable? Does it have to open in a new window? or a javascript popup? Or just download the original? Do you want to place the thumb yourself? Meaning: when uploaded, you have to add [thumb1] in your post? Or should it just display beneath the comment? Lots of possiblities..... :)
  • Options
    3stripe3stripe ✭✭
    edited December 2005
    A good model for linked thumbnails is Gmail I think...

    An option to view, and an option to download:

    image
  • Options
    The problem with that 3stripe is the post might look too cluttered if the user only leaves a simple comment.
  • Options
    True, true, what if you just had a very small 'View' and 'Download' link beneath each thumbnail...
  • Options
    Or you could just make each thumbnail link directly to the file, and let people do what they want with it. It would also save a lot of space.
  • Options
    lechlech Chicagoland
    Also, those of us without gdlib wouldn't be able to use it :D
  • Options
    Well I'd think it could check if gdlib was available, and default to the basic file list if it wasn't.
  • Options
    lechlech Chicagoland
    yeah, that's what I was thinking, else just have an option of what the admin wants and set it.
  • Options
    What about loading the file in the browser instead of downloading it? Over here it wants to download/open the file instead of just viewing it in the browser. FF & IE.
  • Options
    hopefully this isn't a silly question... how do I delete an attachment from a post?
  • Options
    Have you asked Mark to include these delegates in the 0.9.3 release? It would be fantastic if this extension would work without any modifications. The way I see it, the extension system should be flexible enough to handle this kind of stuff.
  • Options
    hey Jazzman - this works great with Firefox, but it doesn't work with Internet Explorer. and I tried it on multiiple machines. Any ideas?
  • Options
    The extension uses Ajax techniques, which is based on JavaScript. IE could be too secure (is it even possible?). Try change the IE settings to allow JavaScript.

    You can delete an attachment by editing your comment. It will list the attachements with a delete-link :)
  • Options
    How are things going with image preview? Are you going to use imagemagick or similar to resize the previews? If so, remember to make it make it optional (could just be a bool in the PHP file or something) ;) Your code has been of great help for me in developing the Poll extension btw. Thank you =) I have one tiny suggestion though.. There should be more margin-top for the Attachment title in the form. I found 12px to be good.
  • Options
    Jazzman - I tried that, but there is no delete link when editing a comment with an attachment. doh! any thoughts?
  • Options
    Well... since Vanilla 0.9.3 is under heavy changing, I'm currently working on the same attachment extension for the current Vanilla. I'll post a new discussion when it's done :)
  • Options
    any reason this won't work anymore? I see the extra delegate calls are actually part of vanilla now but my files still don't upload, yet if I put a file in the uploads dir with the correct name it shows up in the thread
  • Options
    That exact thing happened to me, and I'm trying to remember how I fixed it. In my case, though, it was totally my fault; something i'd been messing with borked it.
This discussion has been closed.