Info 1 etc doesn't display on viewer

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

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: [willbegood] Info 1 etc doesn't display on viewer

By Dave - August 28, 2008

What does it show? It needs to be in the foreach loop that displays the uploads.

Can you attach your viewer file to this post so we can see the code?

Thanks!
Dave Edis - Senior Developer
interactivetools.com

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