--- brilliant_gallery/functions.inc 2009-01-15 11:50:46.000000000 -0500 +++ brilliant_gallery/functions.inc 2009-05-02 17:45:17.000000000 -0400 @@ -35,6 +35,15 @@ function testext($filename) { function load_dir_to_array($absolpath, $imagewidth, $fullresolutionmaxwidth, $brilliant_gallery_sort) { + #Load captions.txt into array + $file_handle = fopen($absolpath."/captions.txt", "r"); + while (!feof($file_handle) ) { + $line_of_text = fgets($file_handle); + $parts[] = $line_of_text; + } + + fclose($file_handle); + # Load Directory Into Array $poct = -1; $retval_dimensions = array(); @@ -49,6 +58,9 @@ function load_dir_to_array($absolpath, $ $poct += 1; #$retval[$poct] = $file; $retval_dimensions[$poct]['file'] = $file; + + #Add caption into array + $retval_dimensions[$poct]['caption'] = $parts[$poct]; # Is image horizontally or vertically oriented? $temp = getimagesize($absolpath .'/'. $file);