View Full Version : Auto Sized javascript picture popup
Limey-YMR
07-13-2004, 03:52 AM
Hi, I was wondering if it was possible to modify vbulletin to use a javascript popup routine to make images popup in a new browser window that is auto sized to the image with no borders or menu, toolbar etc.
except for the current default which is just sitting in a new browser window with lots of white space.
I made an image gallery on my wife's website if this describes what I mean better http://www.weddingmakeup.us/images/wedding_makeup.htm
except I couldn't figure out how to make the script auto the window so I had to specify the dimensions, (and put up with a 20 pixel border!)
Any pointers would be greatly appreciated, I did try searching for over an hour but couldn't find this specific item.
I think I also saw something done in PHP once where it fell back to a regular browser window if the client browser didn't support java, but the site I saw was fly by night and is gone.
cheers,
Mark (Charlotte US / Birmingham UK)
Natch
07-13-2004, 12:53 PM
Yup - you bet it is.
The plan is to scan the folder of images with readdir, which beings each filename into an array, then you can gain info about each image using getimagesize - store this in the array as well.
Then you can build your gallery with this info, creating individual javascript calls to a single function with your variables included: you can in this case also have tested the screen dimensions to ensure that your popup script does not generate a window too large for the screen...
A good exaple of how this would look is on digitalblasphemy.com - if you want more help with this please contact me via PM to discuss it.
Limey-YMR
07-13-2004, 03:14 PM
Yup - you bet it is.
The plan is to scan the folder of images with readdir, which beings each filename into an array, then you can gain info about each image using getimagesize - store this in the array as well.
Then you can build your gallery with this info, creating individual javascript calls to a single function with your variables included: you can in this case also have tested the screen dimensions to ensure that your popup script does not generate a window too large for the screen...
A good exaple of how this would look is on digitalblasphemy.com - if you want more help with this please contact me via PM to discuss it.
umm I'm not at the level you might think, I just copied my popup script, are the readdir and getimagesize java variables or commands? could you possibly provide and example of the code and how it integrates with vbulletin?
cheers for responding.
Natch
07-13-2004, 03:47 PM
Both the commands I mention above are PHP functions - I'm sorry but I am not the guy to help you out with this as it's something I do for a living (keeping food on the table kinda thing) - and I am hesitant to spend more time than I already do on non-paying jobs ...
I'm not trying to be a pain about this - I'd love to be able to just give you a swathe of code for you to copy and paste, but it's not a simple thing that you wanna do...
Like I said, please PM me if you want to know more - I may be able to spare you some time - but it will not be for a while ;)
nexialys
07-13-2004, 04:08 PM
@Natch ...hum.. sorry, but it's the free side section of mods requests here, so if you want to be paid for a job, go for the Service Request forums
actually, this request is quite easy to deal with... problem is not to deal with the images but deal with the browsers... i may bring a solution in the afternoon here.
i just found these two galleries that have what you request.. resize the images from the sources...
http://www.darkhighway.net/PopUpGallery/
http://www.andymack.com/freescripts/
someone here can have the time to make the hack you request, simply based on these two... for free!
Natch
07-13-2004, 04:33 PM
'scuse me but I think I know where I am ...
I'm not gonna not answer the guy's question, just because I have no time to resolve the entire problem for him - and I t'ink you'll find the Service Requests forum is not for people looking for work to do, but for people to request work to be done ... no?
*smacks forehead*
Limey-YMR
07-14-2004, 02:35 AM
alright now, I didn't want to start a pissing match, I'm just happy I got one question answered, it's do-able.
If someone comes up with an efficient way to share this with the community that doesn't take away from their professional time that's cool too, and Natch, I understand completely, I do Pen-testing for a living for a large multi-national and I don't find myself helping people in security matters in my free time (for free) so more power to you for just being here.
At least this suggestion is on the table so to speak, so if a coder sees this thread and thinks it's a cool idea that doesn't involve a major hack to the back end (mySQL etc) AND wants to invest some toil and time for little more than love and kudos, then we might have ourselves a cool hack one day.
If not, no big deal, I certainly am not the type to whine about not getting something for nothing - god knows I see enough Windows newbs to Linux "demanding" releases from the open source community (see Klaus Knopper) to learn respect people's time.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.