Topic: Display Title & Artist in Plaintext

If you want to put plain text artist and title info into a webpage (i.e. not an image) we have the capability.

Use the URL: http://beta.winampdb.com/plain_text.php … _TEXT_CODE
where USERNAME is your username and PLAIN_TEXT_CODE is the plaintext code (see below).

PLAIN_TEXT_CODE
a[0] :: Current Artist
t[0] :: Current Title
a[1] :: Last played artist
t[1] :: Last played title
.
.
.
.
a[5] :: Artist from 5 songs ago
t[5] :: Title from 5 songs ago


Usage
In your HTML use the following:
<script type="text/javascript" language="JavaScript" src="http://beta.winampdb.com/plain_text.php?user=Tom&plain_text=t[0]"></script>
HTML and multiple variables can be used in the query as well:
<script type="text/javascript" language="JavaScript" src="http://beta.winampdb.com/plain_text.php?user=Tom&plain_text=t[0] <br />t[1]"></script>

Tom

http://www.winampdb.com/alpha/song.php?user=Tom&amp;image=1

Re: Display Title & Artist in Plaintext

Excellent work! How about some RewriteRules though? wink

http://www.winampdb.com/alpha/song.php/|/user/|/Kaboon/|/

Re: Display Title & Artist in Plaintext

You mean like:
<script type="text/javascript" language="JavaScript" src="http://beta.winampdb.com/plain_text.php/|/user/|/Tom/|/plain_text/|/t[0] <br />t[1]"></script>

That works as well as the method posted above.

Tom

http://www.winampdb.com/alpha/song.php?user=Tom&amp;image=1

Re: Display Title & Artist in Plaintext

Awesome! What's the reason for the very complicated rules/links btw? Why not remove all the "|"'s?

http://www.winampdb.com/alpha/song.php/|/user/|/Kaboon/|/

Re: Display Title & Artist in Plaintext

It was so variables such as usernames can contain a /.

Tom

http://www.winampdb.com/alpha/song.php?user=Tom&amp;image=1

Re: Display Title & Artist in Plaintext

That makes sense somehow.

On a side note, the plain text message doesn't display an offline message, is this intended behavior?

http://www.winampdb.com/alpha/song.php/|/user/|/Kaboon/|/

Re: Display Title & Artist in Plaintext

This was a feature that was added fairly quick based on a request and the basic text provide was adequate at the time.  We should probably look into this feature more and make sure we are providing all the possible information in a logical and easy to use interface which I can say now we are not (such as the on or offline as you pointed out).  I  suppose we need to determine how valuable this feature is before we determine the best way to set it up (Control Panel vs. "hidden feature" like it is now) because although we want to make the features easy to use and understand we don't want to overwhelm the user with tons of rarely used features.

Tom

http://www.winampdb.com/alpha/song.php?user=Tom&amp;image=1