Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    May 2006
    Posts
    316
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    May 2006
    Location
    Texas
    Posts
    566
    Plugin Contributions
    4

    Default 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

  3. #3
    Join Date
    May 2006
    Posts
    316
    Plugin Contributions
    0

    Default Re: XML Slideshow in define_main_page.php

    Thanks for checking it out...

    I was linking them relative

    Code:
    <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.

  4. #4
    Join Date
    May 2006
    Posts
    316
    Plugin Contributions
    0

    Default 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...

  5. #5
    Join Date
    May 2006
    Location
    Texas
    Posts
    566
    Plugin Contributions
    4

    Default 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

  6. #6
    Join Date
    May 2006
    Posts
    316
    Plugin Contributions
    0

    Default 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

  7. #7
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,294
    Plugin Contributions
    1

    Default Re: XML Slideshow in define_main_page.php

    Had tried your files but the Flash show up in my local tests.
    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.
    Code:
    <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

    Code:
    <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

  8. #8
    Join Date
    May 2006
    Posts
    316
    Plugin Contributions
    0

    Default 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:
    Code:
    <param name="base" value="." /> 
    <embed base="." </embed>
    hope that helps someone in the future!

    thanks again, guys.

  9. #9
    Join Date
    May 2006
    Location
    Texas
    Posts
    566
    Plugin Contributions
    4

    Default Re: XML Slideshow in define_main_page.php

    awesome.. glad you got it figured out :)

  10. #10
    Join Date
    Sep 2006
    Posts
    32
    Plugin Contributions
    0

    Default 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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Psigate Xml Gateway
    By NetworkDad in forum Addon Payment Modules
    Replies: 15
    Last Post: 14 Apr 2011, 04:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •