Problem displaying galleries
2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 20, 2010 (RSS)
By paulmac - August 20, 2010
Hi
I've set up a page that can list a number of galleries and then when you click on the gallery title it take you in to a page that displays all the thumbnails for that gallery. My problem is that it is only showing the thumbnails of the first gallery. All other gallery detail pages show no thumbnails.
The code for I've copied in to the list page is:
The code I have for the details page is:
I thought it was something to do with the limit =>'1' , but I took this out and no difference.
Thanks for any help
I've set up a page that can list a number of galleries and then when you click on the gallery title it take you in to a page that displays all the thumbnails for that gallery. My problem is that it is only showing the thumbnails of the first gallery. All other gallery detail pages show no thumbnails.
The code for I've copied in to the list page is:
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/path/domains/domain_name/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($galleryRecords, $galleryMetaData) = getRecords(array(
'tableName' => 'gallery',
));
?>
The code I have for the details page is:
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/path/domains/domain_name/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($galleryRecords, $galleryMetaData) = getRecords(array(
'tableName' => 'gallery',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$galleryRecord = @$galleryRecords[0]; // get first record
// show error message if no matching record is found
if (!$galleryRecord) {
header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
}
?>
I thought it was something to do with the limit =>'1' , but I took this out and no difference.
Thanks for any help
Re: [paulmac] Problem displaying galleries
By Chris - August 20, 2010
Hi paulmac,
All the code you've pasted looks good to me!
Can you please attach the full PHP source code for your detail page? Also, do you have a URL which I can check out to see the problem?
All the code you've pasted looks good to me!
Can you please attach the full PHP source code for your detail page? Also, do you have a URL which I can check out to see the problem?
All the best,
Chris
Chris