The following is the code for a quick gallery. The first thing that you want to do is go into your webspace via FTP or a webpanel and make a folder for your images. You can call that folder whatever you want, that’s entirely up to you. Then, once you make the folder, upload all of your images (and thumbnails) to the gallery.
Where ever you want to put your gallery, you copy and past this code. Remember, though, that the page ending has to be .php or it will not work.
<?php
$from = 1;
$to = 15;for ($i = $from; $i <= $to; $i++)
{
?>
<a href=”http://yourdomain.com/images/<?=$i?>.jpg” target=”_blank”><img src=”http://yourdomain.com/images/<?=$i?>thumb.jpg” border=”0″ alt=”# <?=$i?>” title=”# <?=$i?>” /></a><?php
}
?>
Now to what you have to change to make the gallery work…
The first part tells how many images you have:
$from = 1;
$to = 100;
Say your files are named cap1-cap205, you will change the first ‘from’ number to 1 and the second ‘to’ number to 205. Say your files are named PowerDVD_00-PowerDVD_315, the first number would be 00 and the second number would be 315. Get it?
Then you have to go into the gallery code again and change the location of your files here:
<a href=”http://yourdomain.com/images/<?=$i?>.jpg” target=”_blank”><img src=”http://yourdomain.com/images/<?=$i?>thumb.jpg” border=”0″ alt=”# <?=$i?>” title=”# <?=$i?>” /> </a>
You just change the URL and path to match up with how you have named and numbered your files.
Page Views: 85 views





















