Chris_Elevare Posted March 13, 2008 Share Posted March 13, 2008 Hi, I'm looking to display a few very basic images on my website which are listed as thumbnails and then enlarge when clicked on. I've seen gallery scripts but they all seem to do far more than I need! I don't want people to comment on them or rate them etc. I just want people to open an image form a thumbnail. Thanks Chris Quote Link to comment https://forums.phpfreaks.com/topic/95941-php-to-create-a-gallery/ Share on other sites More sharing options...
sKunKbad Posted March 14, 2008 Share Posted March 14, 2008 If you want the thumbnails generated from the full size images by php, you might take a look at the book "object-oriented php". If you go to the publisher's website (nostarch.com), and find the files associated with the book, chapter 6 has code that you can use with some minor modifications. The down-side to doing this is that with many pictures, or pictures that are very large, processing time can be quite long. (much of this depending on how large you set the thumbnails in size). Quote Link to comment https://forums.phpfreaks.com/topic/95941-php-to-create-a-gallery/#findComment-492384 Share on other sites More sharing options...
947740 Posted April 11, 2008 Share Posted April 11, 2008 If you are not very into object-oriented php, which I am not (although it seems like I should be), I may be able to help. It really depends whether or not the list of images is dynamic. If the list is going to change, I would use PHP and MySQL (or some other database) to display the images. The code is not very hard if you know just a little bit. You could use <div></div> and javascript. You can use getElementById to replace the image with a larger one when clicked on. Or, you could just use a <a href="imagename" target="_blank"><img src="imagelink" /></a> I personally think the javascript would be the best way to go if it is not dynamic. Quote Link to comment https://forums.phpfreaks.com/topic/95941-php-to-create-a-gallery/#findComment-514912 Share on other sites More sharing options...
haku Posted April 11, 2008 Share Posted April 11, 2008 http://www.huddletogether.com/projects/lightbox2/ Quote Link to comment https://forums.phpfreaks.com/topic/95941-php-to-create-a-gallery/#findComment-515149 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.