Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
|
|
Image Gallery with PHP |
Page: 1 | Reply |
Mar 9th 2005 | #166530 Report |
Member since: Jul 5th 2003 Posts: 80 |
First off I don't know too much about PHP so I hope I'm not asking for a lot here, but basically I need to know how to make an image gallery with the help of PHP. More specifically... Currently I run the website for my dad's company (www.sia-cam.com). It is quite hideous as of now and I plan a major overhaul at some point, but first I need to create a new image gallery. As it is now, my image gallery consists of a page with links, each link going to a different page with an image on it. As you can imagine, creating and managing one page per image, when I am soon to post dozens of new images, is very very tedious and time consuming. My goal is this: I want to have a page with two frames. One frame will be narrow and run horizontally along the bottom. This will be scrollable side to side and contain thumbnails. The above frame will load the actual image when a thumbnail is clicked. This way it is easy to add or remove images, having only to edit a small amount of code, rather than creating and deleting entire pages along with accompanying links. It seems to me this should be possible with one page. I am in the process of learning PHP but schoolwork interferes, so I need to cut to the chase and learn this one thing so I can get going on the site work. Is PHP the best way to accomplish this, or am I looking for something else altogether? Step-by-step not expected if it's complicated, but a gentle nudge in the right direction would also be appreciated. Thanks. |
Reply with Quote Reply |
Mar 21st 2005 | #166827 Report |
Member since: Feb 16th 2005 Posts: 4 |
PHP would be OK for this, i suppose. You'd have your normal HTML framesets, let's say named "bottom" and "top". The code for your "bottom" frame would go to some php which would be something like this: (let's see if the board will let me straight-post some code...) [PHP]$imgArr = new array( array("thumbURL1.jpg", "fullURL1.jpg"), array("thumbURL2.jpg", "fullURL2.jpg"), array("thumbURL3.jpg", "fullURL3.jpg") ); foreach($imgArr as $curImg) { echo " "; } ?>[/PHP] That way, you'd just add a new array("thumbURLX.jpg", "fullURLX.jpg") line for each image you wanted to add (Make sure you keep track of commas separating each one). I haven't tested that or anything, but you get the drift. |
Reply with Quote Reply |
May 11th 2011 | #205113 Report |
Member since: May 11th 2011 Posts: 1 |
Need some free PHP image gallery scripts? You can search and free download the right PHP image gallery script on the site PHPkode.com Hopefully can help you! Kind Regards! |
Reply with Quote Reply |
Page: 1 | Back to top |
Please login or register above to post in this forum |
© Web Media Network Limited. All rights reserved. No part of this website may be reproduced without written permission. Photoshop is a registered trademark of Adobe Inc.. TeamPhotoshop.com is not associated in any way with Adobe, nor is an offical Photoshop website. |