Forums / Templates, Stylesheets, Page Layout / XML Slideshow in define_main_page.php

XML Slideshow in define_main_page.php

Locked

Started by pensive612 on 28 Oct 2006, 4:25 AM · Views: 7,020

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
28 Oct 2006, 4:25 AM
#1
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

XML Slideshow in define_main_page.php

Hey everyone,

I'm at my wits end here...

I've created a slideshow using Slideshow Pro upon the client's request.
And I've done plenty of these before, so its all gone smoothly. except!! after I embed the flash file into the define_main_page.html it will not load the images, or the XML (I can't tell... all I know is it won't load)

here is the link for the site (obviously still in development)
i also created a blank page and embedded it in there... works fine. If I go directly to the link of the swf. it works fine.

how come when i embed it into the main page it won't connect?

any ideas at all would be very, very appreciated.

Thank you so much in advance.

  • pensive612
28 Oct 2006, 5:09 AM
#2
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: XML Slideshow in define_main_page.php

how are you linking to the images in your XML file? are you defining them as just the image file name, or are you putting flashGallery/ before the image? Because of the way includes work.. the flash file is looking for all the images in the root folder of the store.. not in the flashGallery folder. So.. the best solution is to change the XML file and prefix each image name with "flashGallery/" in order for it to load properly

28 Oct 2006, 6:06 AM
#3
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

Thanks for checking it out...

I was linking them relative

<gallery> 
 <album title="Shop Dari" 
lgPath="gallery/album1/large/" 
tnPath="gallery/album1/thumbs/" > 
  <img src="001.jpg" /> 
  <img src="002.jpg" /> 
  <img src="003.jpg" /> 
  <img src="004.jpg" /> 
  <img src="005.jpg" /> 
  <img src="006.jpg" />
  <img src="007.jpg" /> 
  <img src="008.jpg" /> 
  <img src="009.jpg" />
  <img src="010.jpg" /> 
  <img src="011.jpg" /> 
 </album> 
</gallery> 

I think you might be onto something here... I'll keep you posted while i'm trying to figure this out...

thanks again so much.

  • pensive612
28 Oct 2006, 7:12 AM
#4
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

first off, I just found an amazing way to debug flash files that are online... this is the link that explains how... as I know it will be definitely be helpful to someone out there...

as far as the linking problem. it tells me that the swf can't find the referenced XML file. however, it finds it when i put it on any other page outside of ZenCart.
so the link seems good. (its in the same folder as the swf, so pretty hard to mess up) and the absolute path won't work either.

anything that ZenCart could be effecting that i'm missing?

thanks...

  • pensive612
28 Oct 2006, 8:11 AM
#5
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: XML Slideshow in define_main_page.php

don't think its a part of zencart why its not working.. had similar problems on a clients website which is non-zencart

Try this: move the XML file to the root of your store (make a copy of the XML). In the one that you just put in the root, change the values to reflect the new path. For example, if the pictures were originally located in a folder called images/flash/gallery, but the XML only says the filename.. put images/flash/gallery in front of the file names.

I can't remember exactly how we fixed the problem on that site.. we may have gone into the SWF and changed the location of the XML file in relation to the gallery. Not 100% sure

A cheap workaround would be to have an IFRAME that calls a simple HTML page to show the SWF.. but i really don't suggest doing that because its not worth it :)

Is the gallery an open source gallery? if so, could you PM me details on where to download it? itll help in the debugging :)

//edit: nevermind.. found it on google.. $25 for it :P

28 Oct 2006, 8:33 AM
#6
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

man, i can't thank you enough for your advice on this...

so after debugging. i'm pretty sure that its not the location of the images. but its the location of the XML file relative to the swf. the image location could very well be a problem afterwards, but first, the debugger says it can't find the XML.

inside the flash component there is a field for XML file location. since the XML file and the swf are in the same folder. I have it as location - "images.xml"

as i mentioned, the swf works fine on any html page. as well as, flash player, local, and online. and debug is cool with all of it.

but if i put it anywhere in ZenCart (including EZpages) it says it can't find the XML file in the online debugger.

I actually have tried moving the XML file to all locations on the site (root/site-root etc.) with no change...

hope some of that helps...

here is link to a zip with the XML, SWF, and IMAGES. here

  • pensive612
28 Oct 2006, 5:34 PM
#7
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

Had tried your files but the Flash show up in my local tests. :smile:
Only saved all the following to the root.
/gallery/././.
/dari.swf
/images.xml

But your site had changed the path, and the swf pointed to:
flashGallery

And the following have not been changed accordingly.

<gallery> 
 <album title="Shop Dari" 
lgPath="gallery/album1/large/" 
tnPath="gallery/album1/thumbs/" > 
  <img src="001.jpg" /> 
   .....
  <img src="011.jpg" /> 
 </album> 
</gallery> 

To confirm that, in my test also swapping the locations of the files, it still work if make changes to both of the paths and the relative paths.
e.g.
/flashGallery/album1/large/.
/flashGallery/dari.swf
/images.xml

<gallery> 
 <album title="Shop Dari" 
lgPath="flashGallery/album1/large/" 
tnPath="flashGallery/album1/thumbs/" > 
  <img src="001.jpg" /> 
   .....
  <img src="011.jpg" /> 
 </album> 
</gallery> 

A New Starter again

28 Oct 2006, 10:37 PM
#8
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

I am eternally grateful Samad, and seethrou.

It is such a reminder of how lucky we are to have this kind of a forum. As I had posted this on the Slideshow forum as well, where no could even bother to view the post....!

we are so lucky.

I have solved the issue. but i never would have gotten there without you guys.

because the html is auto generated. it could only see a relative link from the position of the html_includes. even though it could correctly link the swf. the link from the swf was still affected... absolutes will not work in this situation either.. without additional js.

so: the answer was adding these two things to the html, overriding the relative base:

<param name="base" value="." /> 
<embed base="." </embed>

hope that helps someone in the future!

thanks again, guys.

  • pensive612
29 Oct 2006, 4:58 AM
#9
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: XML Slideshow in define_main_page.php

awesome.. glad you got it figured out :)

7 Nov 2006, 3:13 AM
#10
markov avatar

markov

New Zenner

Join Date:
Sep 2006
Posts:
32
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

Hi pensive612,
This is a post to clarify things for others that hit this problem -

I think seethrou has hit the nail on the head.
Basically to make SlideshowPro work correctly:
Put your xml file in the root of zen (where your index.php file is)
Your xml should be like so:

<gallery> <album title="My Title" description="My Project" lgPath="images/YOURFOLDERNAME/gallery/album1/large/"> tnPath="images/YOURFOLDERNAME/gallery/album1/thumbs/" <img src="yourPictureName.jpg" caption="Your Caption" /> </album> </gallery>

Hence the lgPath and tnPath need relative links
BUT the img src just needs the picture name.

**The html code for the flash is as follows (note relative links in bold)

**<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="360" height="400" id="slideshow" align="middle">

<param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value=**"images/YOURFOLDERNAME/slideshow.swf"** /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <embed src="**images/YOURFOLDERNAME/slideshow.swf" **quality="high" bgcolor="#ffffff" width="360" height="400" name="slideshow" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>

As fas as I can see - you **don't **need to alter the HTML to add

<param name="base" value="." /> <embed base="." </embed>

The reason I can say this is because I have just created all of the above in a SlideshowPro project and it is all functioning correctly. I hope this helps someone in the future.

7 Nov 2006, 3:27 AM
#11
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

Good call Markov. thanks for the detailed explanation. it made perfect sense.

I think what mine did, allowed you to not need the XML file in the root directory.

both solutions seem to work perfectly...

thanks again for the update.

now, onto getting them to validate!

  • pensive612
9 Nov 2006, 12:25 AM
#12
markov avatar

markov

New Zenner

Join Date:
Sep 2006
Posts:
32
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

Hi pensive,
I think I have just noticed the simplest answer to this - and perhaps we have both overlooked this.
In your flash file - look in the Component Inspector of Flash MX 2004 - and you will see "XML File Path".
Just set the correct path here eg. the default path would be images/slideshow/images.xml

and hey presto - your file can now find the XML file no problem!

9 Nov 2006, 2:02 AM
#13
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

markov,

i wish it were that simple my friend. the XML path field is all you need normally, but the outcome will not work inside ZenCart without modifying the code.

the problem is making the links relative to the SWF and not the HTML document. without having them all in the same folder, or having to keep them at the root level.

check out page 9 of the SSP user guide it has a decent explanation.

but the important part is this:

To keep your relative links, add the following
alongside the other existing <param> elements in your HTML document:

<param name="base" value="." /> Then add a similar base attribute anywhere inside the <embed> element: <embed base="." [rest of embed attributes] /> This base parameter is a special override forces the Flash Player into making all links relative to the SWF, not the HTML document.

here is the code i used to get the swf to load with the images for the slideshow:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="479" height="303">
  <param name="movie" value="/swfFolder/your.swf" />
  <param name="base" value="." /> 
  <param name="quality" value="high" />
  <embed src="/swfFolder/your.swf" base="." quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="479" height="303"></embed>
</object>

although, keep in mind, the code is not w3c compliant yet. i have to rewrite to avoid the embed script. but in the meantime. it works!

if the way you were doing is giving you any problems, let me know and i'll help out in any way i can...

take care.

  • pensive612
5 Apr 2007, 1:17 AM
#14
drma avatar

drma

New Zenner

Join Date:
Apr 2007
Posts:
2
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

pensive612:

I am eternally grateful Samad, and seethrou.

It is such a reminder of how lucky we are to have this kind of a forum. As I had posted this on the Slideshow forum as well, where no could even bother to view the post....!

we are so lucky.

I have solved the issue. but i never would have gotten there without you guys.

because the html is auto generated. it could only see a relative link from the position of the html_includes. even though it could correctly link the swf. the link from the swf was still affected... absolutes will not work in this situation either.. without additional js.

so: the answer was adding these two things to the html, overriding the relative base:

<param name="base" value="." /> <embed base="." </embed> ```hope that helps someone in the future! > > thanks again, guys.

Yes its help me man
i spend more then 3 days trying to solve this problem
im so thanxful to you
many many many thanx to you
god luck and may god bless you
:hug:
:hug::hug:

5 Apr 2007, 1:23 AM
#15
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

No problem at all, drma. Good luck with everything in the future...

Take care.

  • pensive612
7 Apr 2007, 2:37 AM
#16
drma avatar

drma

New Zenner

Join Date:
Apr 2007
Posts:
2
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

hope for you all the best

10 Jun 2007, 9:07 PM
#17
alexan avatar

alexan

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

Hi there,

I'm new to this tread and have a question.

Flash slideshow is working fine on my site.

But how do you get rid of the "press spacebar to activate".

In my flash header I had no problems with this (I used the swfobject.js)

But now with this slideshowpro I can't get rid of it.

Anyone knows ho to do that?

thanks

1 Apr 2010, 7:07 AM
#18
friedrich72 avatar

friedrich72

New Zenner

Join Date:
May 2009
Location:
Kansas
Posts:
39
Plugin Contributions:
0

Re: XML Slideshow in define_main_page.php

After two days of beating my head against the wall I found this thread.

thank you all so much! I can sleep now.