well, i really dont have a lot of knowledge in php.. so i think this is the relevant code in the template:
<div id="galleryListWrapper">
<?php if (!empty($galleryArray) && $galleryArray['stats']['total_images'] > 0): ?>
<ul id="galleryList" class="clearfix">
<?php foreach ($galleryArray['images'] as $image): ?>
<li><a href="/blumenstein/index.php"><img src="<?php echo $image['thumb_path']; ?>"/></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
and this should be the function:
/**
* Returns pre-formatted XHTML of a gallery
*
* @param string $directory Relative path to images directory
* @param string $relText Text to use as the rel value
* @return object Self
* @access public
*/
public function createGallery($directory, $relText = 'colorbox') {
// Get the gallery data array and set the template path
$galleryArray = $this->readImageDirectory($directory);
$templatePath = $this->_appDir . '/templates/defaultGallery.php';
// Set the relative text attribute
$galleryArray['relText'] = $relText;
// Echo the template contents
echo $this->readTemplate($templatePath, $galleryArray);
return $this;
}
/**
* Returns an array of files and stats of the specified directory
*
* @param string $directory Relative path to images directory
* @return array File listing and statistics for specified directory
* @access public
*/
public function readImageDirectory($directory) {
// Set relative image directory
$this->setRelativeImageDirectory($directory);
// Instantiate gallery array
$galleryArray = array();
// Get the cached array
$galleryArray = $this->_readIndex($this->_index);
// If cached array is false, read the directory
if (!$galleryArray) {
// Get array of directory
$dirArray = $this->_readDirectory($directory);
// Loop through array and add additional info
foreach ($dirArray as $key => $image) {
// Get files relative path
$relativePath = $this->_rImgDir . '/' . $key;
$galleryArray['images'][htmlentities(pathinfo($image['real_path'], PATHINFO_BASENAME))] = array(
'file_title' => str_replace('_', ' ', pathinfo($image['real_path'], PATHINFO_FILENAME)),
'file_path' => htmlentities($relativePath),
'thumb_path' => $this->_createThumbnail($image['real_path'])
);
}
// Add statistics to gallery array
$galleryArray['stats'] = $this->_readGalleryStats($this->_readDirectory($directory, false));
// Add gallery paginator to the gallery array
$galleryArray['paginator'] = $this->_getPaginatorArray($galleryArray['stats']['current_page'], $galleryArray['stats']['total_pages']);
// Save the sorted array
if ($this->_config['cache_expire'] > 0) {
$this->_createIndex($galleryArray, $this->_index);
}
}
// Return the array
return $galleryArray;
}
/**
* Returns a template string with custom data injected into it
*
* @param string $templatePath Path to template file
* @param array $data Array of data to be injected into the template
* @return string Processed template string
* @access private
*/
public function readTemplate($templatePath, $data) {
// Extract array to variables
extract($data);
// Start the output buffer
ob_start();
// Include the template
include $templatePath;
// Set buffer output to a variable
$output = ob_get_clean();
// Return the output
return $output;
}
i hope this will help you - thank you for your time !