Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-03-2008, 11:26 AM   PM User | #1
victorboyko
New to the CF scene

 
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
victorboyko is an unknown quantity at this point
automated creation of list of jpegs im html - how?

having a bunch of jpeg images, i need to create a html table listing all the jpegs in a folder, like

<td><img src="image1"></td>
<td><img src="image2"></td>
<td><img src="image3"></td>

is there a small software or script so i could do it?
finally i want to have something that looks like this:

http://www.victorboyko.com/runway/ss...aakhmadullina/

thank you!
victorboyko is offline   Reply With Quote
Old 12-03-2008, 12:26 PM   PM User | #2
kosstr12
Regular Coder

 
kosstr12's Avatar
 
Join Date: Apr 2007
Location: Woodstock, Georgia
Posts: 428
Thanks: 7
Thanked 5 Times in 5 Posts
kosstr12 is on a distinguished road
Fix the link to the example please.
kosstr12 is offline   Reply With Quote
Old 12-03-2008, 01:00 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,703
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
I guess it’s this URL: http://victorboyko.com/runway/ss09/alenaakhmadullina/

But one question is: Why does it need to be a table? This ain’t abular data and images align themselves horizontally anyway so no need for a table (with just one row and an endless amount of columns). You’ll just have to put the images and space them with on line of CSS. I don’t even think if you need an automatic script for that (and I don’t know any) but a regular HTML editor with search and replace function might do it as well.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 12-03-2008, 01:06 PM   PM User | #4
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
The automation needs to be server-side. Might help:
PHP Code:
<table>
<tr>
<?php
$dir 
'images/'// Base directory

// Open a known directory, and proceed to read its contents
if (is_dir($dir)) // If directory exist
{
    if (
$dh opendir($dir)) // If assignment successful
    
{
        while ((
$file readdir($dh)) !== false// While there's still a file
        
{
        if(
$file!='.'&&$file!='..'// I don't want to see the gibberish
            
echo "<td><img src='$dir$file' alt='$file'></td>"// Echo the image inside a <td> element
        
// End of the while loop
    
closedir($dh); // Close the directory connection
    
// End of the if statement
// End of the if statement
?>
</tr>
</table>
__________________
Learn how to javascript at 02geek

The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:20 AM.


Advertisement
Log in to turn off these ads.