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
This discussion has been closed.
Comments
P.S. determining the filesize before uploading would be nice, heh....
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??
- 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"....
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 / 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???
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.
(i.e. give it a dir and have it post the thumbs of the images in there)
and also putting the uploads into a year/month/date subfolder might be a cool addition too.
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.
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.
lightbox doesn't work, instead of this the "none" option works and opens the image without the popup.