Displaying uploaded images in my web page

10 posts by 4 authors in: Forums > CMS Builder
Last Post: July 2, 2008   (RSS)

By kkegans - June 26, 2008 - edited: June 30, 2008

Greetings good folks at interactive tools,

I'm not a programmer a but I do hack little HTML and I'm trying to learn some PHP. Please bear with me if my questions are kind of basic.

I'm having a lot of fun playing with CMS builder, but I've run into one brick wall. The code being generated for my detail page is returning links to the images, which I can display the screen without problem. My page design dictates that need to store the paths to the images rather than display them immediately.

Can you help me with a simple solution that will put the image paths into some type of a variable that I can use in my webpages to display the images as needed. I'm guessing it has something to do with a form session variable, but I haven't been able to figure it out yet. [:(] Any assistance that you can give me is much appreciated.

Kurt

CMSB Rocks!



Thanks,



Kurt

Re: [kkegans] Displaying uploaded images in my weeb page

By Jake - June 26, 2008

Hi Kurt,

Thanks for posting!

Could you give us a few more details about how these images are being used on your page? You mentioned that none of the images are being displayed straight away - were you looking to display these dynamically with javascript, or using some other method?

I look forward to your reply. [:)]
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.

Re: [kkegans] Displaying uploaded images in my weeb page

By kkegans - June 26, 2008

Jake,

I have a couple different scenarios.

I want to populate a table with the first image and data from records being returned by the LIST PAGE VIEWER.

REC #1 REC #1 REC #2 REC #2 REC #3 REC #3
Image Data Image Data Image Data

REC #4 REC #4 REC #5 REC #5 REC #6 REC #6
Image Data Image Data Image Data



I also want to set images from the records returned by the DETAIL PAGE VIEWER in a table and load the large image names into Lightbox 2.0

REC #1 REC #1 REC #1
Image #1 Image #2 Image #3

REC #1 REC #1 REC #1
Image #4 Image #5 Image #6

I hope this helps!



Kurt
CMSB Rocks!



Thanks,



Kurt

Re: [kkegans] Displaying uploaded images in my weeb page

By Jake - June 27, 2008

Hi Kurt,

The main question in my mind is how you're getting tripped up here, since you mentioned that you were able to generate the image links successfully. So I'm just curious as to what specific stage you're at now that's blocked you from progressing. Do you have any example pages that you could link us to? If you have these pages created already, would it be possible to attach them to a forum post so that I can take a look?

Thanks Kurt. [:)]
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.

Re: [Jake] Displaying uploaded images in my weeb page

By kkegans - June 30, 2008

Jake,

I am not having a problem displaying the images using the forEach loop process. My issue centers around being able to display selected image, rather than all of them from the loop.



For example, if I want to display the 2nd and 4th image being returned in one location and the 1st and 3rd in another location there is not an easy way to do this.



I would like to have the ability to have the upload record detais set to a unique varible as they are returned by the forEach loop. Instead of dealing with the return:

img src="<?php scho $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] alt="" /><br>

is there some way to get:

image_1_src="<?php scho $upload['urlPath'] ?>"
image_1_width="<?php scho $upload['width'] ?>"
image_1_height="<?php echo $upload['height'] ?>"
image_1_alt="" />

image_2_src="<?php scho $upload['urlPath'] ?>"
image_2_width="<?php scho $upload['width'] ?>"
image_2_height="<?php echo $upload['height'] ?>"
image_2_alt="" />

image_3_src="<?php scho $upload['urlPath'] ?>"
image_3_width="<?php scho $upload['width'] ?>"
image_3_height="<?php echo $upload['height'] ?>"
image_3_alt="" />

...

This would allow the ability to use any of the uploads anywhere within the page.
CMSB Rocks!



Thanks,



Kurt

Re: [kkegans] Displaying uploaded images in my weeb page

By Donna - June 30, 2008

Hi there -- I think we're working through this via email, which should help take some of the confusion out of things. :)

One thing you could do if you've got a specific image that should show up in a specific spot on the page is to create a new upload field just for that image. Since it's going to be hardcoded for that image anyway, there's no harm in creating a new field.

But for the series that you emailed us, we should be able to get this setup no problem shortly. :)
Donna

--
support@interactivetools.com

Re: [aev] Displaying uploaded images in my weeb page

By Donna - June 30, 2008

Hi aev,

The solution ended up being basically the same as this post:

http://www.interactivetools.com/iforum/P62848#62848

It just had to be tweaked a little to fit in with the existing design that was on the page. :)
Donna

--
support@interactivetools.com

Re: [Donna] Displaying uploaded images in my weeb page

By kkegans - July 2, 2008

Donna,

I know we took this to email and a Rapid Response ticket, and you solved the first part of my challenge very nicely, and I do appreciate that. But, the second issue has not been resolved.



I sent you an email early yesterday morning but have not heard anything back yet.....



I tried to modify the code you gave me to put the images in the table so it would also work with the Lightbox 2.0 display. I followed the instructions in the newsletter article you wrote about you parents webpage at Whistler (boy would I like to spend a few days there...), but it isn't working.



Would you be kind enough to take a look at it and let me know where I screwed up?



Thanks,



Kurt
CMSB Rocks!



Thanks,



Kurt

Re: [kkegans] Displaying uploaded images in my weeb page

By Jake - July 2, 2008

Hi Kurt,

It looks like Donna got back to you about this - let us know if there's anything else we can help with. [:)]
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.