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.

Attachment Extension 1.4

1246714

Comments

  • jakob_r: perfect, this warnings don't appear anymore and the corrupt thumbnail is not created :))

    P.S. determining the filesize before uploading would be nice, heh.... :(
  • uziuzi
    edited May 2006
    ok, I've found another thing ;))

    if the original filesize is smaller then the thumbnail size, it should not be enlarged in the thumbnail....

    original file: http://www.hessen.ru/lussumo/uploads/5917.ezb_logo.gif

    thumbnail: http://www.hessen.ru/lussumo/uploads/thumbs/5917.ezb_logo.gif


    maybe it's even better not to create a thumbnail for this type of images, but instead of this show the original image??
  • Ok, I've uploaded the extension again with some minor changes:

    - I've added Jakob's solution and check if the image got uploaded before trying to create a thumbnail
    - When the original file is smaller than the thumbnail dimension, no resizing will take place. The file will be copied
    - Some small changes to the stylesheet (when you mouseover, the thumb will look like pressing a button)

    I'm still thinking how we should display images and other files in one post! Maybe split it in two blocks "Images" and '"Attachments"....
  • What about displaying them line by line and the images are shown on mouseover at the imagelinks in a div?
  • uzi, true that will happen. Not creating a thumbnail will cause it to fall out of line in the css because the file is smaller. You'd need to rejig the css to centre all the images properly. Noel Jackson has a nice example of how it could look in his photostack software but it uses redundant span tags to achieve it. Maybe it is easier to create a thumbnail with the image centred but not scaled. Will have to look into that.

    On another note, thickbox integration was easier than I thought and I have it nearly working except for files with capital-letter extensions (a known problem with thickbox), so have asked jazzman's advice. Clicking on a thumb puts up an on-page pop-up of the image scaled to fit into the browser window. Clicking on the image or on close returns you to the thread. I made it only fade the background slightly:



    Now the whole image attach-thumbnail-show thing is nice and self-contained without leaving vanilla.
  • to jakob_r: yeah, centered and not scaled is a good solution ;)

    to jakob_r / jazzman: what is wrong with the config file? it appears in the last update again... where the configurations should be stored, in the extension folder or in conf/settings.php???
  • Looks stunning!
    On the Thickbox example page there's a nice login box example.
    Would be nice to use that in Vanilla throughout - at least for people which allows guests to browse the forum.
  • That's quite similar to http://www.huddletogether.com/projects/lightbox2/ but I prefer Lightbox2. I wonder how difficult that integration would be.
  • This is coming along very nicely by the looks of it. If you could work in some sort of filebrowser integration it'd be awesome... :P
    (i.e. give it a dir and have it post the thumbs of the images in there)
  • yeah, it could post to a filebrowsered directory that can use the thumbs too.

    and also putting the uploads into a year/month/date subfolder might be a cool addition too.
  • edited May 2006
    uzi: I've tried out 'centred with expanded canvas' for small images but am not so convinced yet as the surrounding background is always black. Hmm.

    Roguefoxx, yes LightboxJS2 works according to the same principle as thickbox. I tried it out and it works too - also as galleries if several images - but it adds a lot of kb to the page for all the JS necessary. Personally, I find it a little more intrusive in terms of user-experience with its slick sizing animations but being able to step from one picture to the next is nice. Anyway, I've added both thickbox and lightbox 2 as options for the moment, so that people can use either or none (both makes no sense). There's still a few issues to clear up but I've passed my code onto Jazzman.

    wientjez has already made a filebrowser thumbs add-on, but I've not tried it out.

    As far as the attachments plug-in goes, I just see it as a simple way of adding items to posts - at the moment the files relate just to posts. The filebrowser integration could be a more integral solution - tie in filebrowser using people and make the account profile page more glorified and you have a mini myspace-like arrangement with integral forum and personal gallery setup. That goes a couple of steps further than the attachment add-on and might be what mark has in mind with the vanilla farming idea.
  • nice work jakob_r and Jazzman :)
  • edited May 2006
    Ok, I've uploaded a new version (1.2) with jakob's changes and I added a settings form for easy configuration!

  • That's looking mighty good, Jazzman!
  • edited May 2006
    i think there is a problem with the rewrite rules and the Configuration link. it points to /settings/Attachments/ - i get a 404 the link shout be /settings/?PostBackAction=Attachments
  • Hey STE7130, tnx for the bug report. I've corrected it and uploaded the fix.
  • ithcyithcy New
    edited May 2006
    another tiny bug:

    Notice: Undefined index: ATTACHMENT_DISPLAY_IMAGE_PROCESSING in /htdocs/forum/extensions/Attachments/default.php on line 477

    //edit: it also does not save its settings, or display any default settings on the settings page.
  • uziuzi
    edited May 2006
    I see no images for buttons at thickbox. and fading doesn't go away after click on close (or is it NEXT? I don't know), after that I had to click again on the area in the forum to disable the fading.

    lightbox doesn't work, instead of this the "none" option works and opens the image without the popup.
  • uziuzi
    edited May 2006
    thickbox doensn't make the images fit to the window like lightbox :(
  • Uploaded version 1.2b, with some fixes. Btw.. I can only test on Mozilla Firefox and Internet Explorer...
This discussion has been closed.