We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43669
    • 5 Posts
    hello
    i have revo 2.2.7
    i need to create a music website
    i create a static resource with an mp3 file
    and in a chunk i have this :

    <object type="application/x-shockwave-flash" width="400" height="170"
    data="xspf_player.swf?track_url=[[*content]]">
    <param name="movie" 
    value="xspf_player.swf?track_url=[[*content]]" />
    </object>


    when i view the page i see just a strange language like this :

    ��� ���i �4�7'�����r���FA�=~


    help plz
      • 36996
      • 211 Posts
      I think you need the path to the resource and not it's content:
      <object type="application/x-shockwave-flash" width="400" height="170"
      data="xspf_player.swf?track_url=[[~[[*id]]]]">
      <param name="movie"
      value="xspf_player.swf?track_url=[[~[[*id]]]]" />
      </object>
      
      • With a static resource like that, you need to create a Custom Content type (in the System menu), with Binary set to Yes, then in the static resource's Settings tab choose that Content type. Whether it should be inline or attachment for the Content Disposition, I'm not sure in your case. When I have .pdf files for download, for example, I use attachment to insure the proper treatment of the file by the browser. Might need a bit of trial-and-error to get everything set properly.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 43669
          • 5 Posts
          nir-z
          thanks for reply
          but is not working
          the source of page is :
           <object type="application/x-shockwave-flash" width="400" height="170"
          data="xspf_player.swf?track_url=index.php?id=2">
          <param name="movie"
          value="xspf_player.swf?track_url=index.php?id=2" />
          </object>


            • 36996
            • 211 Posts
            Do you have a base tag in your template?

            <base href="[[++site_url]]" />
            
              • 43669
              • 5 Posts
              sottwell
              ok i set new content type
              mime type : audio/mpeg
              extention : .mp3
              but when i open the resource the mp3 file is played but with vlc not with the flash mp3 player !!!
                • 43669
                • 5 Posts
                nir-z
                no but i think that not the problem now just replace
                index.php?id=2
                with
                mp3file.html
                  • 36996
                  • 211 Posts
                  You need to change the resource content type to mp3 (in the settings tab), and for the path try:
                  value="xspf_player.swf?track_url=[[++site_url]][[~[[*id]]]]" />