![]() |
CSS Image Resize with Preview
Don't forget to click install if you use this!
Nix's CSS Image Resize with Hover Preview Not Ready for a live site. Next release will address all the issues. Credits: Based of this Hoverbox by Nathan Smith http://sonspring.com/journal/hoverbox-image-gallery This mod will resize images posted on your forum and create a thumbnail with an hover preview all with CSS. Tested on Firefox, Safari and IE 6. So why is this not in the template section? I got some ideas that i'll be adding on to this. This is just to get it out there. How to install? 1. Import the product 2. Coppy the CSS to your additional CSS section 3. Go into the BBCode manager and find the new bbcode it made. Edit it and just save it. (not sure why its doing that but i'll try and fix this) 4. Post an image! CSS to add: Code:
.hdiv { Versions: 1.0 - First release Planned Features - Guest or usergroups the admin picks will get a predetermined message in the hover popup. (option) - Enable it for attachments (option for on or off) - Have GD2 create a thumbnail and chache it (option for on or off) There will also just be the basic version of thats all you want. Know Bugs I'm sure they will come! SS coming! |
Before
http://www.dev-nix.com/cssresize/css1.gif After: http://www.dev-nix.com/cssresize/Picture%205.png Hover: http://www.dev-nix.com/cssresize/Picture%206.png I know the SS are hard to tell what it does. I'll try and put up a demo in a bit. |
nice mod ....*installed*
|
does this works also into 3.6.2?
|
Yea should work on all version. Its just bbcode and CSS right now.
|
Any chance of a demo site? I see the pictures, but a real life demo would really help.
|
|
I have mine working on a test site, but why does it show them on seperate lines, anyway to do them inline?
|
Quote:
Quote:
Also. I noticed it affects sigs also if they are just IMG tags. I'll fix this also. |
Also, the pictures overlap eachother in thumbnail mode when you mouseover them. This may be because I made my thumbs larger. Is there a CSS variable to make the thumbnail like 50% of the screen res, but let the height be free(not confined?)
|
What browser are you using? If IE i can put some IE fixes in there. If you click on the picture it will show it full size. O yea, make sure you click install so you can be notified of any fixes.
I really wanted to keep this simple but the more I look into the more ideas I have for it. So it might turn into a couple of template edits to really get it going. |
Nice! :D
[high]* projectego clicks install[/high] |
I always check for replies to posts that i've posted in. I haven't installed it yet, it's still on a test server.
|
ah got ya.
|
is there anyway to stop this resizing/creating thumbnails for images smaller than the thumbnail size?
i.e. some users on my site use the img tag to post custom smilies, or img tags in signatures too, all of these have now been resized to the same size as the thumbnail for larger images.... Mike www.megalolz.com *edit* just noticed you already mentioned you were going to fix this. |
Quote:
Good job btw.. installed! |
You can modify the BBcode to fit your needs. I'm kind of torn on which way to go from here that will suit the most people.
1. I can have it resize with Java. 2. I can have it resize how it is now. But it actually does two images. So while it looks pretty it doubles the images. 3. I can have it resize and create thumbs and save them to the server for cache. 4. I can just have php resize it in the browser. I pretty much have a working version of the last 3. Does anyone have any thoughts on this? Maybe combine them all into one package and let the users deiced? I have a couple of bugs fixed and I'll have the images to be able to line up next to each other. I'm trying to keep this from template/file edits. |
nix guess you should really give credit to the author who made this mod here is a demo on there site http://host.sonspring.com/hoverbox/
|
I thought I had it in the xml file. Its not there or do you mean in this thread? I was planing on doing that. Just put this up real quick.
|
hushed
|
eh?
|
Quote:
so his css is not the same? its not the same html code? no one is bashing him nor do I know the author of the original. Its just nice to show where it came from as there is other ways you can do it posted on his site that may help others also. |
I think this mod might be a good solution for a problem we're having but I want to make sure.
I do not want to necessarially prevent users from posting large images (as in 3+ megs). We are a technical web site and detailed pictures are necessary many times. If a thread has say 100 pictures and they are all 3-5MB in size, this causes a BIG problem. Right now I'm using ncode image resizer, but it doesn't fix the fact that 100s of megs of pictures have to be loaded each and every time someone accesses that page. I understand that the issue is that you cannot resize images that are remotely hosted...but maybe this would take care of this? Will this help this issue? I'm guessing it would take the place of the ncode resizer? Thanks for any info you can provide. |
Quote:
I would really like to get all three versions working and let it be a admin option of which he wants to use. |
Hello Nix,
Quote:
Regards |
Quote:
|
Right now it takes all urls in [img ] tags and thumbnails it. I'm currently making it so its an option of the size (either width/height, or file size) to start thumb-nailing. Does that clear it up?
|
one thing i did get rid off in the CSS code, was the height:XX; tag, all you need is to set the width, and the height changes automatically to fit this.
If you have the height tag, as well as the width tag, it changes the shape of the image, and does not constrain the proportions. |
nice...would be more nice..if u can add "disable right click" feature on it...
|
Hello Nix,
Any idea when the new upgrade will come out? I would really love to have a version where it only resizes if above specified Width. Cheers, |
I'm working on it now. Some time in the next couple of days I would guess.
|
Well, nice idea but this script has just totally messed my site up, i installed it and i didnt like it, so i uninstalled the mod and removed the css code i added, and now no images will work at all... every image on my forums says...
https://vborg.vbsupport.ru/ [x] <---- and a box with a red X Ive undone everything i did and its messed up. |
go back into ur bbcode manager and see if the bbcode for it is still there. If it is delete it. If its not, go into another bbcode and just edit it and hit save without making changes. Sorry for the trouble. The next version will be better.
|
thanks, fixed
|
Np. I'll have a version out tomorrow or Sat that will fix most of the problems. I think you'll like it.
|
Does this mod only work on [img] tag'd images? I hope it also works for attachments as well.
|
right now it only works in IMG tags. I'll be adding attachments after the next release.
|
yikes. installed then had to uninstall.
gunna wait for the new version... REALLY need the only affects images bigger that certain setting. (makes things crazy if people have bbcode img signatures !) ;)) |
Yea. Thats why I moved it to beta. Right now its not ready for a live site.
|
Hello,
I installed this and am testing it on IE6. When I input an image, sometimes it does the hover and sometimes it does not. I have to refresh the page for the hover to work, unfortunately, when it does work it does not go back to normal size, it stays large until I refresh the page again. Any suggestions as to why this is happening? |
All times are GMT. The time now is 06:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|