ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

XML templates

August 08, 2007 6:12am

Subscribe [6]
  • #1 / Aug 08, 2007 6:12am

    sm9

    352 posts

    more background on this problem here

    I’m using EE and the gallery module to manage the upload and management of my photos, and to dynamically generate an XML file to be loaded by Slideshow Pro depending on which particular page you’re on. I then use swfobject to load in the XML to slideshowpro. The XML generation works fine, and slideshowpro works fine when i give it a static XML file but when i try to use the two of them together, slideshowpro doesn’t load any images.

    I’ve checked the generated XML by copy/pasting it into a file and using that with slideshowpro and that works - just when it’s dynamically generated it doesn’t load. I have a feeling that it may be the URL to the dynamic XML file, it is as follows http://www.mysite.com/index.php?/scheme_images/gallery_xml/&scheme_id=42

    like i said earlier, if I load that url in a browser, copy/paste the output and save it as a static xml file and tell slideshowpro to load that, everything works as it should.

    does EE do anything ‘extra’ to the XML templates that would make them differ from a static xml file?

  • #2 / Aug 08, 2007 10:13am

    AJP

    311 posts

    Just because I’m not familiar, does swfobject allow you to pass the XML to SSP? I usually have to edit the SSP flash file and tell it where to look for the xml file. Does swfobject allow you to do this dynamically?

  • #3 / Aug 08, 2007 10:26am

    Robin Sowell

    13255 posts

    Hm- make sure the xml template is set to the ‘type’ xml.  And I might run it through a validator to double check it’s good.  Should be if a copy/paste works, but it wouldn’t hurt to confirm that.  I’ve done it this way before, no reason it shouldn’t work fine.

    As AJP notes- it may be a path issue, with the xml file not being found.  I believe I’ve always passed it as a parameter- and it will need the full path rather than a relative path.  That could be the issue.  If that doesn’t help- is it possible to link to it in action?  You can pm me if it needs to stay non-public.

  • #4 / Aug 08, 2007 10:44am

    sm9

    352 posts

    Just because I’m not familiar, does swfobject allow you to pass the XML to SSP? I usually have to edit the SSP flash file and tell it where to look for the xml file. Does swfobject allow you to do this dynamically?

    SSP will allow you to call in any XML you like with a little actionscript and the addVariable method in swfobject.

    as far as I can see, the XML is perfectly valid and is of type XML in the templates section. If I visit the url and duplicate the output in a sepearte, static XML file and load that into SSP everything works as expected.

    Robin, PM sent.


    Many Thanks.

  • #5 / Aug 10, 2007 9:40am

    sm9

    352 posts

    Hi there,

    Just wondering if anyone else has any other ideas?  I can PM the link if needed.

    Getting to the critical stage now where we need to get it working or look for a Plan B - except we don’t really have a Plan B! 😊

    Thanks.

  • #6 / Aug 10, 2007 11:47am

    Sue Crocker

    26054 posts

    sm9, can you post a link to the url in question? Can you use the Pages module and put in an XML template that looks like it is an actual filename?

  • #7 / Aug 10, 2007 4:49pm

    jejuna

    105 posts

    Maybe this will help.

    On page 14 of the SSP Customization guide, there’s a section about dynamically assigning an XML file.

    Here’s the relevant portion:

    Open the FLA containing SlideShowPro.
    Open the Properties panel (Windows > Properties) and give the component instance a unique variable name For this tutorial, I’ll name it “my_ssp”.

    Now we need to write some ActionScript.
    Create a new layer in your movie timeline, and click its first frame so it’s highlighted

    Open the Actions panel and enter this:

    my_ssp.xmlFilePath=xmlfile;

    That’s it!

    To use it with swobject, you’d pass the variable like this:

    so.addVariable(“xmlfile”, “myXML.xml”);

    ###

    So, check to make sure that little piece of actionscript is in the flash file. If you have it in there and are pointing to the right place, it should work fine. If it’s not in there, that might be your problem, and, if it is, it’s a 2 second fix!

  • #8 / Aug 10, 2007 4:52pm

    Sue Crocker

    26054 posts

    When using EE, shouldn’t pathing from the root be done?

    so.addVariable(“xmlfile”, “/xml/myXML.xml”);

  • #9 / Aug 10, 2007 5:19pm

    jejuna

    105 posts

    It doesn’t really matter…whatever it is that generates the correct URL should work. Since it’s in a template, you can have both EE tags and even PHP in there if you want.

    One of mine looks like this:

    so.addVariable(“xmlfile”, “{path="site_index"}photos/ssp_xml-sept/<?php echo $myyear ?>/<?php echo $lastmonth ?>”);

    ...and it works fine.

  • #10 / Aug 10, 2007 8:23pm

    John Henry Donovan

    12339 posts

    The problem is actually this

    The line in the SWFObject code is such because of Force Query String includes a preceding question mark before the needed query string variable. So in fact in the case of the url below, /images/gallery_xml/?specific_id={entry_id} is being passed as a variable rather than just specific_id={entry_id}

    The server in question does not support PATH_INFO. Various .htaccess methods have been used but to no avail yet. Cannot think of an alternative solution other than a mod rewrite at this present time other than asking host if they can support PATH_INFO or switching hosts.

    so.addVariable("xmlfile", "http://www.mysite.com/index.php?/images/gallery_xml/?specific_id={entry_id}");
  • #11 / Aug 12, 2007 12:11pm

    Robin Sowell

    13255 posts

    Bugger- that one didn’t occur to me.  Yep- having path_info supported would definitely be the way to go. 

    This needs to be dynamic?  If not, I bet you could use php and include the xml template.  But if it needs to be dynamic, I think you’d run into the same trouble with passing a variable.  Bleck.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases