Random Image Issue

17 posts by 4 authors in: Forums > CMS Builder
Last Post: January 31, 2011   (RSS)

By KCMedia - January 29, 2011

Hi Jason you have got it right but still not working.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Random Image Issue

By Jason - January 31, 2011

Hi Craig,

Could you attach the latest php files you're working with so I can see your current code?

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By KCMedia - January 31, 2011

Hi Jason

here are the 2 files.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

leftbar_001.php 2K

index_032.php 4K

Re: [kcmedia] Random Image Issue

By Jason - January 31, 2011

Hi Craig,

I took a look at your code and didn't see the code I posted in it. Try replacing this:

<?php foreach ($showsRecord['sidebar'] as $upload): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" align="center" />
<?php endforeach ?>


with this:

<?php if($record['sidebar']): ?>
<?php shuffle($record['sidebar']);?>

<?php $image = $record['sidebar'][0];?>

<img src="<?php echo $image['urlPath'] ?>" width="<?php echo $image['width'] ?>" height="<?php echo $image['height'] ?>" align="center" />

<?php endif ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By KCMedia - January 31, 2011

Hi Jason

I did that now there is an error on the page

Notice: Undefined variable: record in /hsphere/local/home/f1077a/packemin.com.au/includes/leftbar.php on line 21
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

By KCMedia - January 31, 2011

Hi Jason

perfect thank you very much.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz