Title and Caption not showing up with viewers

5 posts by 2 authors in: Forums > CMS Builder
Last Post: June 18, 2009   (RSS)

By Codee - June 17, 2009

I searched the forums and didn't see where anyone else has this problem so maybe it's something I'm doing or not doing. I just realized on every site I've used CMSB on, that the title and caption, if put in with the uploaded photos, is not displaying on any of my sites built with cMsb - from version 1.19 - 1.28 (recent). I typically use the generated code, except I add the code for when someone clicks on a thumbnail it opens the larger photo in a new window. I've reviewed the generated code, and I don't see where it even states title and caption will show...it's not obvious to me.

Please help.

Re: [equinox69] Title and Caption not showing up with viewers

By ross - June 17, 2009

Hi there.

Thanks for posting!

By default, the caption and title aren't used so you should just need to add in the code that makes them display.

It will look something like this:

$upload['info1']

or

$upload['info2']

Basically, each of those fields are called info and then they have a number. You can have up to 4 if you wanted to store more info with each image.

Have a look and let me know what you think ).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Title and Caption not showing up with viewers

By Codee - June 17, 2009

Ross, made a quick attempt and failed...so, here's the code for one of the sites. How do I insert that code into it?
------------



<!-- STEP 2a: Display Uploads for field 'photos' (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 ($inventoryRecord['photos'] as $upload): ?>

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

<a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo

$upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /></a><br/><br/>


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

<a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['urlPath'] ?>" width="<?php echo

$upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /></a><br/>



<?php else: ?>

<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>



<?php endif ?>

<?php endforeach ?>



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

Re: [equinox69] Title and Caption not showing up with viewers

By ross - June 18, 2009

Hi there.

Thanks for the update!

Glad to here you got that sorted out :). I'll make a note about having those fields appear when they are in use. I am not sure how that will work but it's on the list now :).

Let me know if you need a hand with anything else. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/