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