Dynamic URLs (script.php?foo=bar)
When using your own back-end XML playlist generator, your URL to retrieve a playlist 9or file) will invariably contain a ?query&string.
I'm assuming that the URL to retrieve a playlist (or file) is something like:
http://www.youriste.com/yourapp.app?foo1=bar1&foo2=bar2
Wimpy may choke on ? and & symbols. Non-alpha-numeric symbols should be URL encoded. The above would be properly URL encoded as:
http://www.youriste.com/yourapp.app%3Ffoo1%3Dbar1%26foo2%3Dbar2
Sometimes, the ? nd & do not go out of wimpy the same way they came in. In other words, sometimes & symbols get truncated. This means that "&" symbols may need to be replaced with @ or some other identifier.
Example:
http://www.youriste.com/yourapp.app?foo1=bar1@foo2=bar2
Then on the back end, you can split() on the "@" and "=" to generate token pairs. Of course, the above would have to be properly URL encoded (see next example).
Once you have your app outputting XML using the above method, use the Customizer tool to generate the proper HTML code to display the player in an HTML page.
For the first question at the Customizer tool "Where is Wimpy?", enter the URL to your app including the ?query@string as a URL encoded string. Example:
http://www.youriste.com/yourapp.app%3Ffoo1=get_inital_list@foo2=bar2
IMPORTANT: Be sure to check the "Force XML Compliance" option (question #19) so that wimpy reads the incoming playlist as XML.
Then you can output your initial playlist as:
<item>
<filename>http://www.youriste.com/yourapp.app%3Ffoo1=bar1@foo2=bar2@foo3=bar3.xml</filename>
<title>Artists</title>
</item>
<item>
<filename>http://www.youriste.com/yourapp.app%3Ffoo1=bar1@foo2=bar2@foo3=bar3.xml</filename>
<title>Albums</title>
</item>
Notice that I've added the additional @foo3=bar3.xml to the end of the query string? This is done so that wimpy will recognize the <item> as an XML file, and thereby display and handle the item as a playlist rather than an mp3 file. (Wimpy recognizes file types based on the extension used in the <filename> i.e. foo.xml would be recognized as an xml file and foo.mp3 would be recognized as an mp3 file because of the "dot" extension at the end of the string.
In addition, if you are including the <visual> tag, or using the <comments> tag to act as a hyperlink on the graphic or ecommerce link, you should use the @ tokenizing method.
Hope this additional information helps get you pointed in the right direction.
|