I am modifying an image script to hopefully work with my webpage but I am running into problems with the eregi command that finds the thumbnail files and skips them, the origional script was desined to work with thumbnail files ending with thumb (image_thumb.jpg) but my thumbnail files are set up beginning with tn (tn_image.jpg) how can i change this section of code to make this work:
function Picture_List ($gallery_path)
{
$dir = @opendir($gallery_path);
if ($dir)
{
while ($file = readdir($dir))
{
/ only jpeg, jpg, gif and bmp /
if (eregi(".(jpeg|jpg|gif|bmp)$", $file))
{
/ without the thumbnail files /
if (!eregi("_thumb.(jpeg|jpg|gif|bmp)$", $file))
{
$Picture_List[]= $file;
}
}
}
}
else