From 193d12b4066db0d9db148fa570d9908abc4aa135 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 4 Sep 2010 23:58:05 +0200 Subject: More documentation. - Added a 'Documentation.html'. This is the HTML documentation which can also be seen in the 'Help' section of the installed plugin. - Added a small README file because github.org complained about the absence of this file. --- Documentation.html | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Documentation.html (limited to 'Documentation.html') diff --git a/Documentation.html b/Documentation.html new file mode 100644 index 0000000..1db7bd7 --- /dev/null +++ b/Documentation.html @@ -0,0 +1,94 @@ + + + + kch_lastfm_recently documentation + + +

kch_lastfm_recently

+ +

Returns a unsorted list of your recently listened songs.

+ +

Usage

+ +

Insert this txp tag to your template:
+<txp:kch_lastfm_recently />

+ +

Here is a table of parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterNeededDefaultExplanation
nameYes Your last.fm account name
countNo3How many songs should be listed
coverNo1Whether album covers should be displayed, or not
track_formatNo{ar} – {s} ({t})Format of track information (See beyond)
date_formatNo%d %h %Y %H:%M:%STime/Date format as used by strftime1
cachingNo1Should we enable caching? (See section caching)
+ +

And here is a list of track_format tokens (case sensitive): +

+ +

Output

+ +

The output will be a unsorted list (<ul> ... </ul>) with the CSS class kch_lastfm_recently .
+The single list elements have this format:

+ +
<li>
+  <img src="http://lastfm-or-amazon-server.foo/path/to/image" alt="Album cover" style="width:60px;height:60px;" />
+  <a href="http://last.fm/path/to/song/informations">The parsed track_format</a></li>";
+</li>
+
+ +

Hidden errors

+ +

If something went wrong, <txp:kch_lastfm_recently /> will not displaying anything, but it will write an HTML comment with an errormessage. So if you can not see anything, first check the returned HTML code, if there is a comment with an error message.

+ +

Caching

+ +

If you have enabled caching, kch_lastfm_recently will save the results to “/my/textpattern/installation/textpattern/cache”.
+So if you want to use caching, you have to create a directory called “caching” inside the textpattern directory and the HTTP server must have write permission to it.
+Results are cached for one minute. If you have multiple <txp:kch_lastfm_recently /> tags with different configurations, this is not a problem, because the cache file gets a unique identifier based on the parameters.
+If you have the possibility to create the cache directory and set the required permissions, you really should use this feature, because the last.fm API calls can generate a lot of traffic, if your website has much hits.

+ +

1 Documentation of strftime

+ -- cgit v1.2.3-70-g09d2