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"....
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.
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)
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.
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.
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
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.
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.