richardterris Posted October 30, 2007 Share Posted October 30, 2007 Hi all, Not sure if my Subject field is really the correct term but here's what id like to do: - I have a fairly image intensive site that im putting together, and i have created a hover image gallery to hold sections of images. When the user selects an image they are taken to a "drilled down" page, ie a large image, and a description of the image to the left; these are held in seperate containers. There will be potentially up to 340 images to handle when the site is complete, and so rather than having 340 html pages to display the images, i would like to "recycle" this page, in other words just load each image into that container when an image is selected. Ive been told by a friend that php is the way to go, and i must admit to having absolutely no php experience at all. Can this be done? If my explanation isnt clear, please say and i'll try to further explain what i mean. Thanks a lot Quote Link to comment Share on other sites More sharing options...
aschk Posted October 30, 2007 Share Posted October 30, 2007 In answer to your single question : yes I hope you're not talking about iframes. You might also want to consider some nifty javascript instead. Google jquery, you might not even need another page Basically you need to have a unique identifier for each image in question and have the text related to it (probably want a database for this storage). So when you click on your particular image it calls a page like : myimage.php?id=1235 , which is then interpreted by PHP, does the lookup on the database, loads up the information and present it with the html. Simple... Quote Link to comment Share on other sites More sharing options...
richardterris Posted October 30, 2007 Author Share Posted October 30, 2007 Thanks for replying so quickly, but.... As i said im a complete virgin to php and pretty much javascript too is there a name for what im trying to do? might help my searching a bit Quote Link to comment Share on other sites More sharing options...
Dragen Posted October 30, 2007 Share Posted October 30, 2007 You can do it without javascript to make it a bit simpler. What would be best is if you created the gallery itself in php, to display the thumbnail images. To do this, if all your images are stored in the same directory is very simple. Then you need another page, which can dynamically display any given image and collect the corresponding information for it. Do you know how to start in php? with the <?php ?> tags.. and how to echo things? Quote Link to comment Share on other sites More sharing options...
richardterris Posted October 30, 2007 Author Share Posted October 30, 2007 No i dont know how to do anything yet, but i want to learn... i dont really know anything about sql either so it could be a steep learning curve... whatever is the easiest way of doing this for a novice like myself is the best way i think Quote Link to comment Share on other sites More sharing options...
Dragen Posted October 30, 2007 Share Posted October 30, 2007 To be honest you don't need mysql for this, but it could be handy. I've got a script which will output thumbnails of all the images, and create links to open them in a seperate page if you want to have a look at it. Although it doesn't include a description for the images it would be quite simple to implement and I don't mind giving you a hand. Quote Link to comment Share on other sites More sharing options...
richardterris Posted October 30, 2007 Author Share Posted October 30, 2007 HI mate thanks for getting back to me again.. Does this mean a seperate page for each image? Thats what i was trying to avoid because at the moment i have 320 images, which would mean 320 pages. what i need is one page with my container, which ive created, and the ability to use and reuse this page for each image when selected Quote Link to comment Share on other sites More sharing options...
Dragen Posted October 30, 2007 Share Posted October 30, 2007 It would mean one file for the gallery containing thumbnails, and one file to display all of the images. NOT a separate file for each image. all you need to do is upload all of your images into a directory, which then gets read and creates thumbnails of the images, links them to the image page, which detects what image needs to be displayed and shows it to the user EDIT: actually, I could knock it down to run off just one file for everything, instead of two if needs be Quote Link to comment Share on other sites More sharing options...
richardterris Posted October 30, 2007 Author Share Posted October 30, 2007 I dont mind but i am quite keen on learning some php/sql stuff so might not be too bad an idea www.matthewjamesmenswear.com is what im trying to do click on coats, and then select the first image of the first gallery id like the picture to load on the left container and the description to load into the right one Quote Link to comment Share on other sites More sharing options...
Dragen Posted October 30, 2007 Share Posted October 30, 2007 Are you manually adding the thumbnail images into the gallery? Quote Link to comment Share on other sites More sharing options...
Dragen Posted October 30, 2007 Share Posted October 30, 2007 Hi, I'm just re-writing my gallery code so it's simple to implement on any page, not just the coats one and also so it works for your layout, but I'm going out in a minute, so I'll finish it when I get home and send it to you to look at. Quote Link to comment Share on other sites More sharing options...
richardterris Posted November 2, 2007 Author Share Posted November 2, 2007 Aschk, Thanks for your reply. Dragen seems to think he might have solved my problem; so if i can manage to get myself up to 10 posts, i might actually be able to contact him with my email address Quote Link to comment 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.