CGTalk > More Forums > Click Here for: > WIP/Critiques: Flash Design and Animation
Login register
  share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 11-07-2003, 04:56 PM   #1
Lord of the underground
Nicool's Avatar
Nicolas DHaussy
London, Lille, Paris, France
Join Date: Aug 2002
Posts: 1,766
Talking selectMenuGallery

Hye CGtalker,
I recently coded a php script that you can use to generate a simple image viewer diplaying the pictures (jpg and gif) from the folder where this script is located. It makes all for you automaticaly. How? simply copy this code and paste it in a text file calling "index.php".
That's better than a plain server folder sort! Use it, it's a gift !
An example here.

<table border=0> <tr> <td> <select onChange="document.images['imageSelectMenu'].src=this.options[this.selectedIndex].value" > <option value="" selected> Selection </option> <? // selectMenuGallery by Nicolas d'Haussy // generate a navigation with select menu to display the picture from the folder where this script is located // Lists the images of this directory and build the select menu. $selectMenuItems; $session=opendir("."); while ($file=readdir($session)) { if (is_file($file)) { // Check if the file is an image $extension = strtolower(substr(strrchr($file, "." ), 1 )); if ($extension == "jpg" || $extension == "jpeg" || $extension == "gif") { // Build the select menu $selectMenuItems .= (" <option value=\"" . $file . "\">" . $file . "</option>\n"); } } } closedir($session); // Then display the dynamic menu items echo ($selectMenuItems); ?> </select> </td> </tr> <tr> <td> <IMG NAME="imageSelectMenu" src="" BORDER="0"> </td> </tr> </table>
Old 01-16-2006, 03:00 PM   #2
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
  share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 05:15 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.