diff options
-rw-r--r-- | Documentation.html | 94 | ||||
-rw-r--r-- | INSTALL | 3 | ||||
-rw-r--r-- | README | 15 |
3 files changed, 111 insertions, 1 deletions
diff --git a/Documentation.html b/Documentation.html new file mode 100644 index 0000000..1db7bd7 --- /dev/null +++ b/Documentation.html @@ -0,0 +1,94 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<html> +<head> + <title>kch_lastfm_recently documentation</title> +</head> +<body> +<h1>kch_lastfm_recently</h1> + + <p>Returns a unsorted list of your recently listened songs.</p> + + <h2>Usage</h2> + + <p>Insert this txp tag to your template:<br /> +<code><txp:kch_lastfm_recently /></code></p> + + <p>Here is a table of parameters:</p> + + <table> + <tr> + <th>Parameter</th> + <th>Needed</th> + <th>Default</th> + <th>Explanation</th> + </tr> + <tr> + <td>name</td> + <td>Yes</td> + <td><code> </code></td> + <td>Your last.fm account name</td> + </tr> + <tr> + <td>count</td> + <td>No</td> + <td>3</td> + <td>How many songs should be listed</td> + </tr> + <tr> + <td>cover</td> + <td>No</td> + <td>1</td> + <td>Whether album covers should be displayed, or not</td> + </tr> + <tr> + <td>track_format</td> + <td>No</td> + <td>{ar} – {s} ({t})</td> + <td>Format of track information (See beyond)</td> + </tr> + <tr> + <td>date_format</td> + <td>No</td> + <td>%d %h %Y %H:%M:%S</td> + <td>Time/Date format as used by strftime<sup class="footnote"><a href="#fn16153874754c5696e133803">1</a></sup></td> + </tr> + <tr> + <td>caching</td> + <td>No</td> + <td>1</td> + <td>Should we enable caching? (See section caching)</td> + </tr> + </table> + + <p>And here is a list of <strong>track_format</strong> tokens (case sensitive): + <ul> + <li><code>{ar}</code> – <strong>Ar</strong>tist</li> + <li><code>{s}</code> – <strong>S</strong>ong name</li> + <li><code>{al}</code> – <strong>Al</strong>bum name ( will turn to “(?)”, if Album is unknown)</li> + <li><code>{t}</code> – The <strong>T</strong>ime, you’ve listened to the song</li> + </ul></p> + + <h2>Output</h2> + + <p>The output will be a unsorted list (<code><ul> ... </ul></code>) with the <span class="caps">CSS</span> class <code>kch_lastfm_recently</code> .<br /> +The single list elements have this format:</p> + +<pre><code><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> +</code></pre> + + <h2>Hidden errors</h2> + + <p>If something went wrong, <code><txp:kch_lastfm_recently /></code> will not displaying anything, but it will write an <span class="caps">HTML</span> comment with an errormessage. So if you can not see anything, first check the returned <span class="caps">HTML</span> code, if there is a comment with an error message.</p> + + <h2>Caching</h2> + + <p>If you have enabled caching, kch_lastfm_recently will save the results to “/my/textpattern/installation/textpattern/cache”.<br /> +So if you want to use caching, you have to create a directory called “caching” inside the textpattern directory and the <span class="caps">HTTP</span> server must have write permission to it.<br /> +Results are cached for one minute. If you have multiple <code><txp:kch_lastfm_recently /></code> tags with different configurations, this is not a problem, because the cache file gets a unique identifier based on the parameters.<br /> +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 <span class="caps">API</span> calls can generate a lot of traffic, if your website has much hits.</p> + + <p id="fn16153874754c5696e133803" class="footnote"><sup>1</sup> Documentation of <a href="http://php.net/strftime">strftime</a></p> +</body></html> @@ -8,4 +8,5 @@ How to install kch_lastfm_recently: 5. Activate the Plugin by clicking the 'No' in the column 'Active' in the row of the kch_lastfm_recently plugin. 6. Read the Help of the plugin (there is a 'help' link in the 'Manage' column) - to learn how to integrate the plugin into your site. + or the 'Documentation.html' in this directory to learn how to integrate the + plugin into your site. @@ -0,0 +1,15 @@ +kch_lastfm_recently v.0.5.1 +=========================== + +A simple Textpattern plugin, which will return a list of recently listened +songs. + +How to Install +-------------- + +See 'INSTALL'. + +Documentation +------------- + +See 'Documentation.html' |