Creating and modifying plugins.
Some of you might know the wonderful software Last.fm, which collects your music listening behaviour and provides useful statistics like weekly personal charts, overall track and artist top lists and similiar stuff like that. But beneath the data they are displaying on there website they provide a useful REST-based API which provides statistics in a machine readable format. This is what serendipity_plugin_heavyrotation is based on. To keep it short: it displays the cover of the top-album of the last week, for those who knows this is often called »heavy rotation« when it comes to broadcast terms.
All you need is to install the plugin via Spartacus, supplying your Last.fm-username and an Amazon API-key (Amazon is used to fetch the covers). You can see the plugin in action there.
WARNING: This plugin works only with PHP 5.1 since I like to use sensible OO-features, which are just provided by PHP 5.1. I'm focusing on maintainability and clean code, so I'm sorry if your hoster is not willing to provide you the needed environment.
Great idea, some suggestions however:
a) We already have an "audioscrobbler" plugin (last.fm bought audioscrobbler some time ago), and a few weeks ago someone already announced a "last.fm" plugin - though with a different set of features. Would it be possible to merge all these plugins into one?
b) About the Amazon API key: Would it be possbile to provide a default API key for users that don't want to register as a dev with Amazon? I know some applications that do this, so it seems to be ok with Amazon.
Apart from that I really like it, even if I can't use it because of my provider
I'm generally not a friend of all-in-one plugins. I prefer sharing libraries and I would like to see a way how plugins can do this. For example my class serendipity_plugins_heavyrotation_helper_audioscrobbler provides a default way how to access the audiscrobbler API.
And, btw: change the provider
Yeah, if it was that easy ... I've already got myself webspace from a different provider exactly because of PHP5. But I'm not happy with the new one either because of a few other shortcomings, and because PHP5 only runs as cgi ... bummer. Right now I'm thinking about switching to a dedicated server.
Yes, Garvin is always concerned about keeping the number of plugins low to avoid confusion. We generally prefer few all-in-one plugins (Windows way) to lots of little plugins that work together (Unix way).
You can still use the Unix way in your plugin programming, just not as separate plugins themselves. Or you can host your own plugins if Garvin won't allow them into SPARTACUS.
Sorry, my mistake. I meant the plugin-page of s9y where a hint regarding PHP 5.1 is missing:
I think it could be useful to mention this in the plugin-description, so that non PHP5.1 users (like me ) know where the error messages come from.
Visit Hokeys Blog!
I thought it were implemented, but evidently the requirement check for PHP fails when using spartacus - only locally downloaded plugins are checked for the requirements.
So the spartacus plugin needs some attention *g*
Getting the following error, any idea why? I have filled out all the settings correctly!
Re: »Heavy Rotation« - Your top album in the last week
The sidebar plugin on my blog only updates the picture every few months. Could this be some sort of caching issue? I have checked the query to last.fm, and the server returns correct (updated) stats when I manually request it ( http://ws.audioscrobbler.com/1.0/user/.../weeklyalbumchart.xml )
Who is online
Users browsing this forum: No registered users and 2 guests