IMAGES won't display in CMS

4 posts by 2 authors in: Forums > CMS Builder
Last Post: October 22, 2010   (RSS)

I am having a weird problem... Images I upload do not display (thumbnails and big ones) in cms, however they are being visable on the actual php page when uploaded? could anyone tell me why is that the case? I did change the Upload Folder URL settings as the pictures wouldnt appear on the site (even thought they were displayed in the CMS), but that made it complete the opposite...

Please see what i have done below:

1. Images (thumbnails and big ones) work in cms after being uploaded but dont work on the website:
Program Directory : /homepages/45/d281998588/htdocs/casaroccapiccola/cmsAdmin (didnt change)
Website Root Directory : /kunden/homepages/45/d281998588/htdocs/casaroccapiccola (didnt change)
Upload Directory : /homepages/45/d281998588/htdocs/casaroccapiccola/cmsAdmin/uploads/ (didnt change)
Upload Folder URL: /homepages/45/d281998588/htdocs/casaroccapiccola/cmsAdmin/uploads/ (didnt change)


2. Images (thumbnails and big ones) DO NOT work in cms after being uploaded but WORK on the website:
Program Directory : /homepages/45/d281998588/htdocs/casaroccapiccola/cmsAdmin (didnt change)
Website Root Directory : /kunden/homepages/45/d281998588/htdocs/casaroccapiccola (didnt change)
Upload Directory : /homepages/45/d281998588/htdocs/casaroccapiccola/cmsAdmin/uploads/ (didnt change)
Upload Folder URL: /cmsAdmin/uploads/ (deleted everything before /cmsAdmin/)


Anyoe knows what's happening?

Thanks,
m

Re: [mrmzalewski] IMAGES won't display in CMS

By Jason - October 22, 2010

Hi,

Could you attach a .php file where you are displaying an uploaded image?

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/

Re: [mrmzalewski] IMAGES won't display in CMS

By Jason - October 22, 2010

Hi,

There is actually no code on this page that outputs an image. You're only outputting the record number, title, content, and link fields.

If the images are showing up in CMS Builder, that means you're using the correct path. What you need to do is to output the image to the screen.

In this example, I'm going to assume the name of your upload field is called "upload". If it's not, just change that name in the code example:

<?php if($image_upload2Record['upload']): ?>
<?php $image = $image_upload2Record['upload'][0]; ?>
<img src="<?php echo $image['urlPath'];?>" />
<?php endif ?>


This code will output the first image uploaded to that record.

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/