Picture Gallery Setup

6 posts by 3 authors in: Forums > CMS Builder
Last Post: September 22, 2010   (RSS)

Re: [kcmedia] Picture Gallery Setup

By gkornbluth - September 22, 2010

Hi Craig,

I'm not totally clear on how you want everything on your page to function, but it seems like you might be able to use the Dynamic Drive Thumbnail Viewer II http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm to accomplish what you're trying to do. There are rollover and link implementations for bringing up images that both might work.

I need to get to work on a deadline, so I can't post the information right now, but there are some recipes in my CMSB Cookbook http://www.thecmsbcookbook.comthat can help implementing the viewer using CMSB.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Picture Gallery Setup

By KCMedia - September 22, 2010

Hi Jerry

what i want to do is have links down the left hand side that list all the projects and when you click on that link it will show you the images on the right hand side with 1 large image and 4 smaller ones below it when you click the smaller ones it will load them to where the larger one is, also you will see the back and next links that will allow you to scroll though other images in that gallery.

thanks

Craig
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Picture Gallery Setup

By gkornbluth - September 22, 2010

Got it.

I assume that there's a separate record with all the images, etc .for each project.

I still think that the viewer might be the way to go.

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Picture Gallery Setup

By KCMedia - September 22, 2010

Hi Jerry

It is setup with a multi section records and inside each record will be the images for that project.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Picture Gallery Setup

By Chris - September 22, 2010

Hi kcmedia,

I think you want to dynamically update the gallery on the right when people click project links on the left, is this correct?

If so, the first thing to do is to get all your record data out into a JavaScript object so that your page can dynamically update the images on the right side. Our free support can't really help you with the Javascript involved in getting your page working (hint: use JQuery,) but I can show you how to get all your record data into JavaScript:

<script>
<?php
$records_js = array();
foreach ($galleryRecords as $record) {

$images = array();
foreach ($record['images'] as $image) {
$images[] = array(
'thumbUrlPath' => $image['thumbUrlPath'],
'urlPath' => $image['urlPath'],
'width' => $image['width'],
'height' => $image['height'],
);
}

$records_js[$record['num']] = array(
'title' => $record['title'],
'content' => $record['content'],
'images' => $images,
);
}
?>
var records = <?php echo json_encode($records_js) ?>;
</script>


The code above assumes that your upload field is called 'images'. You can try pasting this code into your page and viewing source on it to see what it provides.

Our consulting department could quickly write you up the necessary JavaScript to get your gallery working if that's something you're interested in.

If you don't mind a page refresh when people click the project links, this would be much simpler. If that's the case, please provide a working example of your gallery code and I can show you how to set this up.

I hope this helps! Please let me know if you have any questions.
All the best,
Chris