I'm not totally sure I understand what you think I need to do here. How do I go about achieving the effect I am looking for without 'parsing html' in the code?
here is the rest of the script:
Code:
<?php
// PHP Gallery Navigation Script: Configuration set in index.php
echo "
<div id=''>";
//starting variable
$y = 0;
// open file and set into array of thumbnails
// append _tn to end of file name to access thumbnails
// thumbnails must be have:
// identical file names to full size images
// no periods
// same file type as full size images
$fp = fopen($piclist, 'r');
while ($buffer= fgets($fp,4096)) {
$image[$y] = explode("|", $buffer);
$photo[$y] = str_replace(".", "_tn.", $image[$y][0]);
$y++;
}
// calculate total number of images
$result = count($photo);
// numeric value of final image where initial image = 0
$suma = ($result-1);
// calculate image values based on currently viewed image
if (isset($_GET['a'])) {
if (is_numeric($_GET['a'])) {
$newa=$_GET['a'];
} else {
$newa=1;
}
$prev = ($newa-1);
$next = ($newa+1);
switch ($newa) {
case 0:
$prev = $suma;
$next = 1;
break;
case $suma:
$prev = ($suma);
$next = 0;
break;
}
// display navigation links for image gallery
// if "a" is set in the $_GET array:
echo "
";
} else {
// if "a" is NOT set:
echo "
";
}
echo "";
// display current full sized image if get value is set
if (isset($_GET['a'])) {
if (is_numeric($_GET['a'])) {
$a = $_GET['a'];
} else {
$a = 1;
}
$display = $image[$a][0];
$description = $image[$a][1];
$alt = $image[$a][2];
echo "
<div id='full_image'>";
if ($caption_text_over == TRUE) { echo "<p>$description</p>"; }
echo "<p><img src='$path/$display' alt='";if($alt_text==TRUE){echo $alt;}echo"' /><br><img src='reflect_v2.php?img=$path/$display&jpeg=70&fade_start=40&fade_end=1'></p>";
if ($caption_text_under == TRUE) { echo "<p>$description</p>"; }
echo "</div>";
} else {
// display first image if no get value is set
$display = $image[0][0];
$description = $image[0][1];
$alt = $image[0][2];
echo "
<div id='full_image'>";
if ($caption_text_over == TRUE) { echo "<p>$description</p>"; }
echo "<p><img src='$path/$display' alt='";if($alt_text==TRUE){echo$alt;}echo"' /></p>";
if ($caption_text_under == TRUE) { echo "<p>$description</p>"; }
echo "</div>";
}
// display thumbnails in unordered list format
echo "
<div id='imgright'><div id='sthumb-box2'><h";
echo $header+1;
echo "";
echo $header+1;
echo "><ul>";
for ($i = 0; $i <= $result; $i++){
if(is_file($path.'/'.$photo[$i])) {
$alt = $image[$i][2];
echo "
<li><div id='stretchbox'><a href='?a=$i'><div id='squareit'><img src='$path/$photo[$i]' alt='$alt' border= 0 /></div></a></div></li></span>
";
}
}
echo "
</ul></div></div>";
Bookmarks