I need to know if there’s a way to recreate the Flash program on this site: [URL=http://www.curbingcolorado.com/photos.htm]http://www.curbingcolorado.com/photos.htm[/URL] using PHP and HTML and whatnot. Doesn’t have to have all the effects, just needs to have the thumbnails, the description and of course the main photo.
Could someone point me in the right direction on how I could do this kind of project? ?
@NogDogOct 09.2005 — #You could to it by making a link for each thumbnail with a URL variable assignment: [code=html] <a href="thispage.php?img=photo1"><img src="thumbnail1.jpg" alt="Photo One"></a> [/code] Then where you want to display the large image: [code=php] <?php $img = (isset($_GET['img']) and file_exists("images/{$_GET['img']}.jpg")) ? $_GET['img']."jpg" : "default_image.jpg"; echo "<img src='images/$img' alt='photo'>"; ?> [/code] The disadvantage is that the page will have to reload each time, but if the graphics are reasonably sized and web-optimized and you use decent HTML markup with an external CSS style sheet, this should not be too big a deal. It does have the advantage of not depending on the user having any client side plug-in or JavaScript being enabled.
@juicemousezeroauthorOct 09.2005 — #I gotcha... and I'm glad I won't need to rely on a database, too. Very good news. Thanks a ton to you both. Let's see what I can do..
@juicemousezeroauthorOct 09.2005 — #Oh wait, what about the description? I forgot all about it. Could I use some similar file-based method for the description?
@NogDogOct 09.2005 — #You could create a small text file for each photo. Then, if you used the method I described above, you could name each text file the same as the image name but with a ".txt" suffix (or whatever other suffix works for you). Then where you want that text to appear, it would be similar, but using the PHP include() function: [code=php] <?php $text = (isset($_GET['img']) and file_exists("images/{$_GET['img']}.txt")) ? $_GET['img']."txt" : "default_text.txt"; include($text); ?> [/code]