We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27449
    • 211 Posts
    I need to build an xml playlist for the JW image rotator from a directory of images or flash files.
    I use to AUtoSlides snipped (http://modxcms.com/AUtoSlides-1753.html), but doesn´t work sad
    How do I do?
      • 25483
      • 741 Posts
      What steps did you take to install the snippet and what part does not work?
      Can you show us a example of the document that has to output the xml file?
        with regards,

        Ronald Lokers
        'Front-end developer' @ h2o Media

        • 27449
        • 211 Posts
        I create a new snipped with autoslides name, in the next I create a new template with this code:

        <div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this rotator.</div>

        <script type="text/javascript" src="assets/templates/Group/plugins/main_banner/swfobject.js"></script>
        <script type="text/javascript">
        var so = new SWFObject(’assets/templates/Group/plugins/main_banner/imagerotator.swf’,’rotator’,’933’,’300’,’7’);
        so.addParam("allowscriptaccess","always");
        so.addParam("wmode","transparent");
        so.addVariable(’height’,’300’);
        so.addVariable(’width’,’933’);
        so.addVariable(’file’,’assets/templates/Group/plugins/main_banner/teste.xml’);
        so.addVariable(’rotatetime’,’3’);
        so.addVariable(’kenburns’,’true’);
        so.write(’container’);
        </script>

        In the file teste.xml it’s this code line:
        [[autoslides? &dir=`assets/templates/Group/main_banner` &extensions=`jpg,png,gif`]]
          • 25483
          • 741 Posts
          Quote from: sjscosta at Aug 25, 2008, 07:26 AM

          I create a new snipped with autoslides name, in the next I create a new template with this code:

          <div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this rotator.</div>

          <script type="text/javascript" src="assets/templates/Group/plugins/main_banner/swfobject.js"></script>
          <script type="text/javascript">
          var so = new SWFObject(’assets/templates/Group/plugins/main_banner/imagerotator.swf’,’rotator’,’933’,’300’,’7’);
          so.addParam("allowscriptaccess","always");
          so.addParam("wmode","transparent");
          so.addVariable(’height’,’300’);
          so.addVariable(’width’,’933’);
          so.addVariable(’file’,’assets/templates/Group/plugins/main_banner/teste.xml’);
          so.addVariable(’rotatetime’,’3’);
          so.addVariable(’kenburns’,’true’);
          so.write(’container’);
          </script>

          In the file teste.xml it’s this code line:
          [[autoslides? &dir=`assets/templates/Group/main_banner` &extensions=`jpg,png,gif`]]

          You just created the file "teste.xml"?

          You should paste that line of code into a MODx document and then change the alias to teste.xml and you have to turn on friendly url’s. Then you have to change this line:

           so.addVariable('file','assets/templates/Group/plugins/main_banner/teste.xml');


          to this:

           so.addVariable('file','teste.xml');
            with regards,

            Ronald Lokers
            'Front-end developer' @ h2o Media

            • 27449
            • 211 Posts
            I modify this line but doen’t work
            Appears one message: "waiting for answer from the localhost" and not show nothing sad

            I’m to begin to despair :’(
              • 25483
              • 741 Posts
              Quote from: sjscosta at Aug 25, 2008, 08:03 AM

              I modify this line but doen’t work
              Appears one message: "waiting for answer from the localhost" and not show nothing sad

              I’m to begin to despair :’(

              Did you turn on friendly url’s in your modx installation and did you test it with other pages to see if it is working? Just try http://addresstoyourmodx/thisurliswrong.html, then you should get the 404 page you defined in your modx installation (if you just installed it you will get document id 1 as page)
                with regards,

                Ronald Lokers
                'Front-end developer' @ h2o Media

                • 36416
                • 589 Posts
                Quote from: sjscosta at Aug 25, 2008, 08:03 AM

                I’m to begin to despair :’(

                MODx document that serves XML needs to have Page Settings/Content Type field set to text/xml
                  • 25483
                  • 741 Posts
                  Quote from: Eol at Aug 25, 2008, 08:14 AM

                  Quote from: sjscosta at Aug 25, 2008, 08:03 AM

                  I’m to begin to despair :’(

                  MODx document that serves XML needs to have Page Settings/Content Type field set to text/xml

                  *ouch* lipsrsealed

                  I forgot that detail rolleyes
                    with regards,

                    Ronald Lokers
                    'Front-end developer' @ h2o Media

                    • 27449
                    • 211 Posts
                    I don’t understand :S
                    I went see this and my url id it’s 1 and I’m not use the friendly urls.
                    When I use the wrong url I go for the page 404


                    What do I do ?
                      • 25483
                      • 741 Posts
                      Quote from: sjscosta at Aug 25, 2008, 08:33 AM

                      I don’t understand :S
                      I went see this and my url id it’s 1 and I’m not use the friendly urls.
                      When I use the wrong url I go for the page 404


                      What do I do ?

                      then you can’t use "teste.xml" because you have to activate friendly urls! You should link to "index.php?q=<pagidofthedocumentwiththesnippetcall" instead (example if the document has id 2: index.php?q=2)
                        with regards,

                        Ronald Lokers
                        'Front-end developer' @ h2o Media