Slideshow Magic - project seven

12 posts by 5 authors in: Forums > CMS Builder
Last Post: September 18, 2008   (RSS)

By chassa2556 - July 30, 2008

Hi

I have a project coming up and I'm wanting to produce a dynamic gallery device which is embedded into the page. So there will be 'child' thumbnails that will then enlarge to the parent large image in the same page. Similar to this product here.

http://www.projectseven.com/viewer/index.asp?demo=igm

Is there a tried and tested way of doing this with the minimum of hassle or is there a way that this can be done from within the CMSB interface? If not do you think this product would work?

Re: [chassa2556] Slideshow Magic - project seven

By Michael Blake - July 30, 2008

I can only add that I have used PVII products for more than 10 years and they are of the very highest quality, if you can integrate their slideshow magic with CMSB then that would probably be a better option than sourcing a.n.other script. For example I would love to be able to get their 'Pop Menu Magic' to work with IT's CMS, that would be really powerful. I guess it can be done but first I need to learn CMSB [:)]

Best Wishes,
Mickey

Re: [Michael Blake] Slideshow Magic - project seven

By chassa2556 - July 30, 2008

I agree they are fantastic products - even better if they could be integrated into CMSB

Re: [chassa2556] Slideshow Magic - project seven

By Dave - July 30, 2008

Hi Guys,

There's no automatic way to do it with CMS Builder. But if you can figure out how to do it on a plain .html page with really any gallery at all it's usually pretty easy to get CMS Builder to automate the process.

Here's the steps:

1) Figure out how to do your design, or gallery, etc in plain html. Get it working just how you want with static content.

2) Identify the block of code that tells the gallery what images to use. That's the first step. If you can figure that out post that block here so we can see.

3) Look for the pattern in the block of code (a list of image links as an unordered <ul> list, etc). Once we know what the output should look like, and what the pattern is it's often pretty straightforward to output the code with CMS Builder.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [sagentic] Slideshow Magic - project seven

By chassa2556 - July 31, 2008

Many thanks for you time in inputting this walkthrough Sagentic - this is really helpful

Re: [sagentic] Slideshow Magic - project seven

By Frank the Tank - September 17, 2008

I think I followed your instructions,but my page would argue the point. I put the code in an got an error message. When I pasted in the code from CMS I get the thumbnails, but they do not expand on the click.

Am I correct that I need the code you have included in this post, and that from the CMS db I created?



F-t-T

Re: [Frank the Tank] Slideshow Magic - project seven

By Kenny - September 17, 2008

Frank,

Can you post the code here that you included in your page so I can see what you have?

Kenny

Re: [sagentic] Slideshow Magic - project seven

By Frank the Tank - September 17, 2008

Sure, here's what I've got now.

At the Top:

<?php

require_once "/home2/travisbr/public_html/cms_con/lib/viewer_functions.php";

list($photosRecords, $photosMetaData) = getRecords(array(
'tableName' => 'photos',
));

?>



In <head>: <script src="/js-global/FancyZoom.js" type="text/javascript"></script>
<script src="/js-global/FancyZoomHTML.js" type="text/javascript"></script>



In the <body> section:

<script src="/js-global/FancyZoom.js" type="text/javascript"></script>
<script src="/js-global/FancyZoomHTML.js" type="text/javascript"></script>

The rest: <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
<h1>Photo Gallery</h1>
<?php foreach ($photosRecords as $record): ?>
Record Number: <?php echo $record['num'] ?><br/>
Album Name: <?php echo $record['album'] ?><br/>
Date: <?php echo date("D, M jS, Y g:i:s a", strtotime($record['date'])) ?><br/>
<!-- For date formatting codes see: http://www.php.net/date -->
_link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a><br/>


<!-- STEP 2a: Display Uploads for field 'upload' (Paste this anywhere inside STEP2 to display uploads) -->
<!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
<?php foreach ($record['upload'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" />&nbsp;&nbsp;&nbsp;

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<?php endif ?>
<?php endforeach ?>
<!-- STEP2a: /Display Uploads -->


<hr/>
<?php endforeach; ?>

<?php if (!$photosRecords): ?>
No records were found!<br/><br/>
<?php endif ?>
<!-- /STEP2: Display Records -->

The code that caused a problem is this, that was posted in this thread:

<!-- STEP 2a: Display Uploads for field 'pictures' -->

<?php foreach ($photosRecord['pictures'] as $upload): ?>

<?php if ($upload['hasThumbnail']): ?>

<a href="<?php echo $upload['urlPath'] ?>" title="<?php echo $upload['info1'] ?>"/>

<img src="<?php echo $upload['urlPath'] ?>" width="100" border="0"/></a>

<?php elseif ($upload['isImage']): ?>

<a href="<?php echo $upload['urlPath'] ?>" title="<?php echo $upload['info1'] ?>"/>

<img src="<?php echo $upload['urlPath'] ?>" width="100" border="0"/></a>

<?php else: ?>

<!-- STEP2a: /Display Uploads -->


What I've got now on the page is that the thumbnails are being displayed, but they do not expand to the larger image.

Here's a link to the page: http://www.travisbruce.com/gallery.php



Thanks for your help.



FtF

Re: [Frank the Tank] Slideshow Magic - project seven

By Kenny - September 17, 2008 - edited: September 17, 2008

Frank,

Change the line (my section table and field name)

<?php foreach ($photosRecord['pictures'] as $upload): ?>

to (your section table and field name)

<?php foreach ($record['upload'] as $upload): ?>

in the original code posted above. So your Step 2a code would look like this:


<!-- STEP 2a: Display Uploads for field 'upload' -->

<?php foreach ($record['upload'] as $upload): ?>

<?php if ($upload['hasThumbnail']): ?>

<a href="<?php echo $upload['urlPath'] ?>" title="<?php echo $upload['info1'] ?>"/>
<img src="<?php echo $upload['urlPath'] ?>" width="100" border="0"/></a>

<?php elseif ($upload['isImage']): ?>

<a href="<?php echo $upload['urlPath'] ?>" title="<?php echo $upload['info1'] ?>"/>
<img src="<?php echo $upload['urlPath'] ?>" width="100" border="0"/></a>

<?php endif ?>
<?php endforeach ?>
<!-- STEP2a: /Display Uploads -->


*I had left out a line in the original post and have edited it now

Also, take this out of the Body Section (but leave it in the head section)

<script src="/js-global/FancyZoom.js" type="text/javascript"></script>
<script src="/js-global/FancyZoomHTML.js" type="text/javascript"></script>


Let me know if that works for you.

Kenny