Info 1 etc doesn't display on viewer

6 posts by 2 authors in: Forums > CMS Builder
Last Post: August 28, 2008   (RSS)

hello, i tryed to and extra info, during upload process.
Let's say a have an upload call "img1".
Into it, i'v defined info1 as "img1-description1
When generating code for my details page, i cannot see mar "img1-description1" showing beside of my image uploaded "img1".

Is that normal?
Should i have to do something special?

Re: [willbegood] Info 1 etc doesn't display on viewer

By Dave - August 28, 2008

Hi willbegood,

Try adding this tag to your viewer where you want info1 displayed:

<?php echo $upload['info1'] ?>

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Info 1 etc doesn't display on viewer

no it doesn't, i've already tryed this.

Re: [Dave] Info 1 etc doesn't display on viewer

here is the link http://www.richard-riahi.com/interventions-detail.php?Plasties-d-augmentation-3

and see the attached viewer file.
Attachments:

interventions-detail.php 10K

Re: [willbegood] Info 1 etc doesn't display on viewer

By Dave - August 28, 2008

Hi willbegood,

The viewer code shows a different block of code for thumbnails and full size images. Try including the info1 in the thumbnail code (in red):

<?php foreach ($interventionsRecord['img1'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img class="imgIntervention" src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php echo $upload['info1'] ?>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php echo $upload['info1'] ?>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>


And if you know you're always going to have only thumbnails you can simplify this code:

<?php foreach ($interventionsRecord['img1'] as $upload): ?>
<img class="imgIntervention" src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php echo $upload['info1'] ?>
<?php endforeach ?>


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