Picture Uploads

6 posts by 4 authors in: Forums > CMS Builder
Last Post: June 13, 2013   (RSS)

Hi all,

I can't for the life of me get my pictures to display.  I've tried (what seems like) everything and still nothing.  There are no errors showing up in the code and still they do not display.  Below is the code I used for one picture on the about.php page: 

<?php foreach ($aboutRecord['images'] as $index => $upload): ?>
                    <img src="<?php echo $upload['urlPath'] ?>" width="390" height="243" alt="" />
                                        <?php endforeach ?>

I've also tried:

<?php if ($upload = @$aboutRecord['about_picture'][0]):?>
                    <img src="<?php echo $upload['urlPath'] ?>" width="390" height="243" alt="" />
                                        <?php endif?>

Neither of these work.  Can someone please shed some light on the subject? 

Thankyou,

ko19

By moh3 - June 13, 2013 - edited: June 13, 2013

hello try giving the full path to your upload folder in the html code:

<img src="http://example.com/<?php echo $upload['urlPath'] ?>" width="390" height="243" alt="" />

or if in sub folder

<img src="http://example.com/uploads/<?php echo $upload['urlPath'] ?>" width="390" height="243" alt="" />

make sure that the cms is actually uploading the images

By gregThomas - June 13, 2013

Hi,

If moh3's suggestion doesn't work, could you give us a bit more information on the error. Does the page stop loading part way through? Or is the page loading but the picture's aren't displaying.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

The page is fully loading (looks fine), however where a pic should be, there is a blank frame with x in top right.  you can view here:  http://enlightenthesoul.com/index.php   from here click on 'About'

By Damon - June 13, 2013

Hi,

The images are now displaying. Just needed to set the full directory paths and relative URLs in the admin.

Cheers,
Damon Edis - interactivetools.com

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