We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29525
    • 388 Posts
    Hi all

    I’m trying to setup my first podcast following the Neon Eddies’ tutorial and having few problems. Not sure what to do next.
    http://modxcms.com/forums/index.php/topic,11108.0.html

    The result is the player does not appear on the Podcast Test page and the download now link doesn’t present a save dialogue box but opens quick time in full browser window.

    Here the steps that I followed.

    1. Create TV to hold the mp3 file. Name the TV "Audio" Set input type to "File".
    2. Create snippet to conditionally call the player. Name the snippet “AudioPlayer”
    <?php
    $output='';
    
    $tvValue=$modx->getTemplateVarOutput('tvAudio',$modx->documentIdentifier);
    
    if($tvValue['Audio']!='') $output.='<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p><p><a href="'.$tvValue['Audio'].'">Download File NOW!</a></p><script type="text/javascript">
    	var FU = { 	movie:"/assets/flash/mp3player.swf",width:"250",height:"20",majorversion:"7",build:"0",wmode:"transparent",
    				flashvars:"file='.$tvValue['Audio'].'&repeat=False&showdigits=false&displayheight=0&lightcolor=0xb22450&backcolor=0x990000&frontcolor=0xFFFFFF&autoscroll=true" };
    	UFO.create(	FU, "player2");
    </script>';
    
    return $output;
    ?>
    

    3. Download JW player from http://www.jeroenwijering.com/?item=JW_FLV_Media_Player
    4. Copy player.swf and video.flv into c:\wamp\www\assets\flash
    5. Copy swfobject.js to c:\wamp\www\assets\js

    6. Create new “Podcast” template
    7. Assign Audio TV to “Podcast” template
    8. Added to head of “Podcast” template
    <script type="text/javascript" src="assets/js/swfobject.js"></script>
    9. Added the snippet call to the body of the “Podcast” template
    [[AudioPlayer]]
    10. Create chunk call “Podcast” that contains
    <item>
    <title>[+title+]</title>
    <link>[~[+id+]~] </link>
    
    
    <itunes:album></itunes:album>
    <description></description>
    <pubDate>[+date+]</pubDate>
    <enclosure url="[+tvAudio+]" type="audio/mpeg"/>
    <itunes:author></itunes:author>
    <itunes:subtitle></itunes:subtitle>
    <itunes:keywords></itunes:keywords>
    </item>
    

    11. Create new document called “Podcast” with blank template, content type text/xml and pasted in the content per the tutorial
    12. Modified the ditto call with the new start ID and updated the other site specific info, name, email etc.
    13. Edited the Podcast Test page and linked the Audio TV to an mp3 file and saved the document.
    14. The Podcast Test page shows nothing
    15. Modified original snippet to reflect the name of the newer media player
    movie:"/assets/flash/mp3player.swf",
    to
    movie:"/assets/flash/player.swf",
    16. Modified original snippet to match the name of the TV created above – Audio vs tvAudio. Without this, the podcast test page outputs nothing. When this is changed the snippet recognizes the content in the TV and output the “get player” and “download now” text.
    $tvValue=$modx->getTemplateVarOutput(’tvAudio’,$modx->documentIdentifier);
    to
    $tvValue=$modx->getTemplateVarOutput(’Audio’,$modx->documentIdentifier);
    17. Podcast Test page now displays the text from the snippet but the player is not displayed
    Podcast test
    Get the Flash Player to see this player.
    Download File NOW!
    18. Clicking on Get Flash opens up the Adobe page for the flash player
    19. Clicking on the Download File opens a quicktime player using the entire browser window and begins playing the mp3 file
      www.terrybarthdesign.com
      • 29525
      • 388 Posts
      Anyone?
        www.terrybarthdesign.com
        • 5518
        • 28 Posts
        Show us the example page.
          • 29525
          • 388 Posts
          CMCDraonkai

          Thank you so much for taking a look at this.

          Here’s the test page. http://www.terrybarthdesign.com/podcast-test.html

          If I go to url: http://www.terrybarthdesign.com/assets/flash/player.swf the player appears in the browser window full screen with control, etc. So I think this means the player should be detected. Yes?

          Terry
            www.terrybarthdesign.com
            • 10449
            • 956 Posts
            IE7 tells me that UFO is undefined smiley

            You are referencing the SWFObject JS file, but I don’t see the UFO JS anywhere. Either use SWFObject to embed the player, or include the UFO JS.

            These are just two different ways to embed Flash content in your html page. Personally, I prefer SWFObject, but I don’t think there’s a huge difference.

            Also, just in case: I see you’re using the shorthand base href syntax. This can cause strange errors in some IE versions. I’d use <base href=""></base> instead of <base href="" />.
              • 29525
              • 388 Posts
              GaneshXL

              Thanks for catching the base href thing for me. I’ve corrected it on all my templates.

              I’m not sure I understand your help re: the UFO JS. Honestly, i’m still stumbling around in the dark here with how these pieces fit together. Is there a step in the tutorial that I missed?

              I assumed since the tutorial has a step to reference SWFObject JS file that was the method being used. I don’t really know about UFO JS.

              Is there a step in the tutorial that I missed?

              Terry
                www.terrybarthdesign.com
                • 29525
                • 388 Posts
                Ugh! I’ve been googling for hours trying to figure out this problem.

                I hadn’t seen the "UFO not defined" error before, thanks for pointing that out. That certainly narrowed this down, however, I do not know how to resolve this.

                The line in question appears to be generated from the snippet I found in the tutorial I referenced above.

                <?php
                $output='';
                
                $tvValue=$modx->getTemplateVarOutput('Audio',$modx->documentIdentifier);
                
                if($tvValue['Audio']!='') $output.='<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p><p><a href="'.$tvValue['Audio'].'">Download File NOW!</a></p><script type="text/javascript">
                	var FU = { 	movie:"/assets/flash/player.swf",width:"250",height:"20",majorversion:"7",build:"0",wmode:"transparent",
                				flashvars:"file='.$tvValue['Audio'].'&repeat=False&showdigits=false&displayheight=0&lightcolor=0xb22450&backcolor=0x990000&frontcolor=0xFFFFFF&autoscroll=true" };
                	UFO.create(	FU, "player2");
                </script>';
                
                return $output;
                ?>
                


                I’m dead in the water on this one.
                  www.terrybarthdesign.com
                  • 10449
                  • 956 Posts
                  Upload the necessary Javascript to your server and use something like:

                  <script type="text/javascript" src="ufo.js"></script>
                  


                  http://www.bobbyvandersluis.com/ufo/index.html

                  But, as the author says himself, UFO is deprecated. Use SWFObject instead: http://blog.deconcept.com/swfobject/
                    • 29525
                    • 388 Posts

                    ganeshXL

                    Yes, I did see that page where he indicates it is deprecated. It is my intent to use SWFObject.

                    I have been using the snippet described in the tutorial. I think I will abandon that and just start over with a clean slate.

                    I appreciate very very much your time and effort to help me.

                    Thank you.
                      www.terrybarthdesign.com
                      • 29525
                      • 388 Posts
                      ganeshXL

                      Just wanted to follow-up, I found the JWPlayer snippet. Works great. I had no trouble with this one.

                      Thank you again for your help.

                      Terry
                        www.terrybarthdesign.com