Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
CMS Multiple Images

 

First page Previous page 1 2 Next page Last page  View All


edandrea
User

Jun 19, 2008, 9:19 AM

Post #1 of 44 (1994 views)
Shortcut
CMS Multiple Images Can't Post

I am designing a site for a realestate agent. Have my listings page and in the process of creating a details page. To enable a larger image to show I created a separate upload section separate from the thumbnail upload. Now I don't know if this is an efficient way of doing this but I also want "Multiple Images" with previous and next showing one image at one time and not to display all at once is this possible? www.smoaklandco.com or is there a way to use a flash photo system where the photos are pulled into the flash that I could use for multiple images per listing?

There may have been only another thread that a user "matrix" was asking but I am not sure of outcome.


(This post was edited by edandrea on Jun 19, 2008, 9:21 AM)


Dave
Staff / Moderator


Jun 19, 2008, 9:47 AM

Post #2 of 44 (1986 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

Hi edandrea,

The standard upload field lets you have 2 sizes - large images and thumbnails. So unless you need more sizes than that you may be able to get by with just one upload field.

I'm going to put together a demo for matrix later today, so I'll post that code if you want to see that in the other thread.

Also, if you want to use a flash photo system to scroll through photos you can do that as well. The key is to set it up in regular html first. Most flash photo scrollers use an XML file to list the photos. What you can do is have CMS Builder generate that XML file. I've seen this one used before: http://www.jeroenwijering.com/?item=jw_image_rotator

So there's a few options there. Hope that helps. Let me know if you need anything else.

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 20, 2008, 11:45 AM

Post #3 of 44 (1964 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

Hi Dave and thank you...

I have created my "Flash Photo album" at http://www.smoaklandco.com/ds_detail2.php as you suggested and it is working fine. Now I am a little confused as to how CMS is going to output to XML. From reading the other posts it looks like I need to change my file extension where my photos are to .xml.php? And then I paste the code into the .xml.php file? Anyway I have added some photos into a file and linked them from the .xml.

How do I now get the uploaded images to load into flash photo?

Many thanks in advance for your support.



Emil


Dave
Staff / Moderator


Jun 20, 2008, 12:51 PM

Post #4 of 44 (1956 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

The flash app usually don't care what the extension is, just that they send a XML content header.

Is there an url to an xml file that has a list of images used by the flash album?

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 20, 2008, 1:23 PM

Post #5 of 44 (1953 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

http://www.smoaklandco.com/data.xml

But when I try to view it via a browser I get the following error:

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


Only one top level element is allowed in an XML document. Error processing resource 'http://www.smoaklandco.com/data.xml'. ...<image>-^


-------------------------------------

In the data.xml file has a list of the following:

<image>
<pic>ds_detail_images/sc_21.jpg</pic>
<thumb>ds_detail_images/scthumb_21.jpg</thumb>
<title>David Smoak</title>
<desc>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur sit amet urna vel est laoreet interdum. Sed eget arcu. Phasellus ac est vel neque sagittis rutrum. Sed laoreet dolor ac pede. Sed arcu. Aenean tincidunt. Sed convallis, elit eget blandit consequat, ante arcu molestie nulla, vel feugiat nisi enim sit amet tortor. Nulla facilisi. Nullam placerat purus. Cras tincidunt. Vivamus diam est, accumsan vitae, fermentum vel, lacinia non, odio. Pellentesque ipsum leo, molestie nec, gravida vel, convallis nec, nisi. Phasellus vitae massa. Sed nulla nisl, porttitor id, egestas nec, sodales quis, ligula. Duis dapibus, elit nec ultrices malesuada, augue sapien sollicitudin ligula, quis mattis augue velit vel mauris. Aliquam erat volutpat. Cras in mi et orci vulputate venenatis. Suspendisse adipiscing ante.</desc>
</image>



Hope this helps you to help me.....


(This post was edited by edandrea on Jun 20, 2008, 1:27 PM)


Dave
Staff / Moderator


Jun 20, 2008, 2:17 PM

Post #6 of 44 (1935 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

Looks good, just view source on that xml page to see the source. What you want to do is create a CMS Builder page (data.xml.php) that outputs the same thing but with images and content from CMS Builder.

Create a new single record section "Images" with a field for "uploads".

Upload some sample images. Then create a detail page viewer (single page viewer). Have it display the xml tags for each uploads. The code will look something like this:

<?php foreach ($imagesRecords['uploads'] as $upload): ?>
<image>
<pic><?php echo $upload['urlPath']; ?></pic>
<thumb><?php echo $upload['thumbUrlPath']; ?></thumb>
<title><?php echo $upload['info1']; ?></title>
<desc><?php echo $upload['info2']; ?></desc>
</image>
<?php endforeach; ?>

Play around with that and see if you can get it so when you view source on data.xml.php it looks like the same format as data.xml.

Finally, add this tag to the top of the page so it will tell flash it's a XML page, even if it doesn't end in .xml:

<?php header('Content-type: application/xml; charset=utf-8'); ?>

Give that a try and let me know if you get stuck along the way or need any more help or details.

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 23, 2008, 10:01 AM

Post #7 of 44 (1883 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

Hi Dave and thanks again.

Have bee getting errors when I view the data.xml.php page: "Parse error: parse error, unexpected T_ENDIF in /home/content/s/m/o/smoaklandco/html/data.xml.php on line 23"

No photos are showing. Sorry about the amount of detail in this email.

The code on my page, and I have tried it several ways is:

<?php
/* STEP 1: LOAD RECORDS - Copy this PHP code block to the TOP of your page BEFORE anything else. */
require_once "/home/content/s/m/o/smoaklandco/html/cmsAdmin/lib/viewer_functions.php";

list($customRecords, $customDetails) = getRecords(array(
'tableName' => 'custom',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$customRecord = $customRecords[0]; // get first record

?>

<?php header('Content-type: application/xml; charset=utf-8'); ?>

<?php foreach ($customRecord['lg_photo'] as $upload): ?>
<image>
<pic><?php echo $upload['urlPath'] ?></pic>
<thumb><?php echo $upload['thumbUrlPath'] ?></thumb>
<title>David Smoak</title>
<desc>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur sit amet urna vel est laoreet interdum. Sed eget arcu. Phasellus ac est vel neque sagittis rutrum. Sed laoreet dolor ac pede. Sed arcu. Aenean tincidunt. Sed convallis, elit eget blandit consequat, ante arcu molestie nulla, vel feugiat nisi enim sit amet tortor. Nulla facilisi. Nullam placerat purus. Cras tincidunt. Vivamus diam est, accumsan vitae, fermentum vel, lacinia non, odio. Pellentesque ipsum leo, molestie nec, gravida vel, convallis nec, nisi. Phasellus vitae massa. Sed nulla nisl, porttitor id, egestas nec, sodales quis, ligula. Duis dapibus, elit nec ultrices malesuada, augue sapien sollicitudin ligula, quis mattis augue velit vel mauris. Aliquam erat volutpat. Cras in mi et orci vulputate venenatis. Suspendisse adipiscing ante.</desc>
</image>
<?php endif ?>
<?php endforeach ?>



I also tried it without the top segment and had it look very similar to yours and got the following errors:

<?php header('Content-type: application/xml; charset=utf-8'); ?>

<?php foreach ($customRecord['lg_photo'] as $upload): ?>
<image>
<pic><?php echo $upload['urlPath'] ?></pic>
<thumb><?php echo $upload['thumbUrlPath'] ?></thumb>
<title>David Smoak</title>
<desc>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur sit amet urna vel est laoreet interdum. Sed eget arcu. Phasellus ac est vel neque sagittis rutrum. Sed laoreet dolor ac pede. Sed arcu. Aenean tincidunt. Sed convallis, elit eget blandit consequat, ante arcu molestie nulla, vel feugiat nisi enim sit amet tortor. Nulla facilisi. Nullam placerat purus. Cras tincidunt. Vivamus diam est, accumsan vitae, fermentum vel, lacinia non, odio. Pellentesque ipsum leo, molestie nec, gravida vel, convallis nec, nisi. Phasellus vitae massa. Sed nulla nisl, porttitor id, egestas nec, sodales quis, ligula. Duis dapibus, elit nec ultrices malesuada, augue sapien sollicitudin ligula, quis mattis augue velit vel mauris. Aliquam erat volutpat. Cras in mi et orci vulputate venenatis. Suspendisse adipiscing ante.</desc>
</image>

<?php endforeach ?>



And got the folowing errors:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/m/o/smoaklandco/html/data.xml.php:3) in /home/content/s/m/o/smoaklandco/html/data.xml.php on line 3

Warning: Invalid argument supplied for foreach() in /home/content/s/m/o/smoaklandco/html/data.xml.php on line 5



Then I added back in the "<?php endif ?>" before the "<?php endforeach ?>"

and I get on the data.xml.php page= "Parse error: parse error, unexpected T_ENDIF in /home/content/s/m/o/smoaklandco/html/data.xml.php on line 12



No Photos





Dave
Staff / Moderator


Jun 23, 2008, 10:07 AM

Post #8 of 44 (1881 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

Ok, if you like I can FTP in and have a look, just email me ftp info and the url that XML file to dave@interactivetools.com (email, don't post login details to forum). I can take a look and/or fix it and post the details back here.

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 23, 2008, 12:10 PM

Post #9 of 44 (1865 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

I wanted to also let you know that in my flash movie I changed xmlData.load("data.xml"); to xmlData.load("data.xml.php");, since I renamed the file extension.


Dave
Staff / Moderator


Jun 23, 2008, 12:46 PM

Post #10 of 44 (1863 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

Ok, I got it working. You can see it here:

Here's what I did:
- I removed the <?php endif ?> (on line 25)
- I change the fieldname from 'lg_photo' to 'image' (there was no photos uploaded for lg_photo)
- I found that when there was no images, there was no output, and my browser just loaded forever waiting for content, so I added this message if there is no images:

<?php if (!@$customRecord['image']): ?>
No Images Found
<?php endif; ?>

You can see it working here:
http://www.smoaklandco.com/data.xml.php

Feel free to change those 'image' fieldnames back to 'lg_photo' when you get some uploads in there.

Hope that helps! :)

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 23, 2008, 2:29 PM

Post #11 of 44 (1847 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

I may have failed to mention that I had a second image upload area with a field label titled "detail_photo" with a field name of lg_photo and I had only uploaded photos to one of my listings.



Any way it is kind of working but it is only loading photos from one area for every listing and they are half the size. No matter what photos are loaded what comes up is allways the same and not for the individual listings.



I checked my images in photoshop and reduced the resolution to 72 instead of 100 and increased back to the desired size and checked my settings (section editers> detail_photo) and they are the same as the photoshop image.



Ps, when I removed the images the alert message "no records found" didnt come up. I have made this all live www.smoaklandco.com.


Dave
Staff / Moderator


Jun 23, 2008, 3:49 PM

Post #12 of 44 (1843 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

You might to adjust the size that images get resized or thumbnailed as in the field editor.

If you need more help with it just make a list of the remaining issues and we'll help you tackle them one by one. Be sure to post an url if you have one so I can see what you're talking about.

Hope that helps.

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 23, 2008, 4:30 PM

Post #13 of 44 (1839 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

Hi Again,

First big problem is:

http://www.smoaklandco.com/ds_detail.php?1, http://www.smoaklandco.com/ds_detail.php?2, http://www.smoaklandco.com/ds_detail.php?3, when you go to featured listings that all goes well. But when you select one or any of the featured listings the same images come up for them all. I believe they all come from record #1.



The second problem is: Image sizeing. http://www.smoaklandco.com/ds_detail.php?1 . I created images in photoshop ans sized them at 363 X 242 res@72. I created a image upload called detail_photo (field label) and lg_photo (field name). I placed the thumbnail sizing that I needed for the flash movie at 100X67 and the "Resize images larger than:" to the desired size of 363 X 242.



Well since the pictures are kind of working I can see that the sizeing has been cut down to about half. Wright now these are the only issues I have. Sorry to be a bother. We kind of got it working.



Just in case the url to the xml = www.smoaklandco.com/data.xml.php.





Best Emil


Dave
Staff / Moderator


Jun 23, 2008, 11:08 PM

Post #14 of 44 (1797 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

Emil,

Issue #1) Ok, what is the name of the flash file is loading the images? You need to add the record number to the end of the url to the xml file that the flash file uses. View Source on these and see how they bring up different images:
http://www.smoaklandco.com/data.xml.php?2
http://www.smoaklandco.com/data.xml.php?3

Issue #2) Changing the max width and height only affects images you upload _after_ that point. So if you've uploaded images previously try uploading them again. Then view the image upload URLs directly to make sure they're getting saved as the right size. These urls look smaller than you want, you'll need to check the settings and try re-uploading:
http://www.smoaklandco.com/cmsAdmin/uploads/sc_25_001.jpg
http://www.smoaklandco.com/cmsAdmin/uploads/thumb/sc_25_001.jpg

Also, check these urls in firefox, only the last one works. Not sure why (flash or javascript issue?) but they all work in IE.
http://www.smoaklandco.com/ds_detail.php?1
http://www.smoaklandco.com/ds_detail.php?2
http://www.smoaklandco.com/ds_detail.php?3

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 24, 2008, 10:18 AM

Post #15 of 44 (1697 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

Wow,

This has turned int to a "project" LOL.



1. ds_gallery.swf ( http://smoaklandco.com/ds_gallery.swf ).

I added the record # to the end of the .xml/php files and yes I can see the image data except for " http://www.smoaklandco.com/data.xml.php?3 " I get a javascript alert error saying "The XML source file is unavailable for viewing".



2. I will work on changing my sizes. I have allready deleted and re uploaded. I will try again.



3. Strange??? I am working in IE7 the pictures come up but I still have the same problem "same Pictures for all records". All the records pull the pictures fromm record # 1. I did manage to get them all to work in FireFox but you had to refresh 3-4 times. But stillsame two pics, should be differant for each record, yes...



Best

Emil


edandrea
User

Jun 24, 2008, 10:47 AM

Post #16 of 44 (1692 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

Well I figured out my problem with images. I had the height and width reversed. Duh....



Any way stil have the problem with individual listings. The same photos from record 1 comes up for all records.... I hope there is an answer out there, certainly hope you can help.



Emil


Dave
Staff / Moderator


Jun 24, 2008, 11:13 AM

Post #17 of 44 (1689 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

Is the XML url hard coded in your flash viewer? I didn't see it in the source of the page?

Check first that you get different XML when you add a number on the end of the XML url. Then, once that's working you need to figure out how to pass that to your flash viewer.

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 24, 2008, 11:26 AM

Post #18 of 44 (1687 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

This is the action script in the flash movie in the first part which calls the xml url. Yes I did check and the differant .xml.php1, 2 and 3 with the amount of images show up and they are all differant, "Good". Just not comming through the flash. Hope the following is what you are asking for your first question?

-------------------------------------------------------------

//XML data
var LoadedFileSize:Number = 0; //Size of loaded data
var TotalFileSize:Number = 0; //Total file size
var PercentageFileSize:Number = 0; //Percentage = (Loaded/Total) * 100

//Movie
var LoadedMovieSize:Number = 0; //Size of loaded data
var TotalMovieSize:Number = 0; //Total file size
var PercentageMovieSize:Number = 0; //Percentage = (Loaded/Total) * 100
var Percentage:Number = 0;

//Set the preloader text
txtLoadText.htmlText = "loading data... " + Percentage + "%"; //Set the preloader text
//Set the preloader bar size
mcBar._width = 2*Percentage;

//Load the XML data
xmlData = new XML(); //Create new XML object to load the data into
xmlData.ignoreWhite = true;
xmlData.load("data.xml.php"); //Load the data.xml file. Change path here as needed!
xmlData.onLoad = loadXML; //After data is loaded call the loadXML() function

//Function called on XML data load completion
function loadXML(loaded:Boolean) {
if (loaded) {
//Load succesfull
xmlNode = this;
} else {
//Error by loading
txtLoadText.htmlText = "XML file failed to load!";
stop();
}
}

-------------------------------------------------------------------------

would it be easier to have the .fla file?


Dave
Staff / Moderator


Jun 24, 2008, 11:46 AM

Post #19 of 44 (1682 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

Hi Emil,

Ahh, so this is a custom viewer. I thought so. What you need to do is get the record number on the end of the data.xml.php.

So if your page is this:
http://www.smoaklandco.com/ds_detail.php?3

You want your xml url to be this when loaded from flash:
data.xml.php?3

You'll have to figure out how to pass the record number with flashvars or by some other means.

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 24, 2008, 12:14 PM

Post #20 of 44 (1679 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

oh, ohhhh that bums me out and I appreciate all of your help.

So does this mean I have to scrap all the work?



If so how can I doit with a simpler image set where I just go previous and next for images?


Dave
Staff / Moderator


Jun 24, 2008, 12:22 PM

Post #21 of 44 (1677 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

I don't think so. Most flash image viewers let you specify the url. Did you write this one yourself? You just need to figure out how to get the record number in there.

Here's some google links on it:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16417
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14253&sliceId=1

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 24, 2008, 12:30 PM

Post #22 of 44 (1674 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

No I didnt write it, I just put'em together and try to make them fit. No point in putting a squar into the circle eh? I will check out the links you sent me, if I dont find anything there I may have to reconsider.



Didnt your listings manager do something like this?


Dave
Staff / Moderator


Jun 24, 2008, 1:03 PM

Post #23 of 44 (1665 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

We've seen this one used before http://www.jeroenwijering.com/?item=jw_image_rotator as well as slideShowPro by a number of forum users. You need a "flash image rotator" that lets you specify the xml file and isn't hard coded to use just one. Most do that, it's really too bad this one you were using didn't.

Sorry about that!

Dave Edis - Senior Developer
interactivetools.com


edandrea
User

Jun 25, 2008, 12:26 PM

Post #24 of 44 (1545 views)
Shortcut
Re: [Dave] CMS Multiple Images [In reply to] Can't Post

Anyway, I have been looking at SlideShowPro. Was not sure if I needed the standard or Director version and will you be able to assist me in getting it to work?


Dave
Staff / Moderator


Jun 25, 2008, 3:23 PM

Post #25 of 44 (1536 views)
Shortcut
Re: [edandrea] CMS Multiple Images [In reply to] Can't Post

Sure. If you search the forum for "SlideShowPro" there's already some posts on it. It's the same idea using an XML file for the photos. We actually changed how CMS Builder works a couple months back to store thumbnails in a subdirectory called /uploads/thumb/ to make it more compatible with SlideShowPro (at the request of other users).

The process would be the same, create a working version with HTML first, and then get CMS to generate the XML file.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

First page Previous page 1 2 Next page Last page  View All
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4