Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] bsl_audioscrobbler
I’m getting the same error as above.
Offline
Re: [archived] bsl_audioscrobbler
This continues to work for me as I described it previously. A couple of possibilities, hopefully not too obvious.
1. Don’t use username=“kevinashworth”, but your own Audioscrobbler username.
2. Make sure the cachepath directory has proper write permissions (I don’t know what “proper” is, but try 777, at least as a test), and the directory has already been created.
If these things don’t help, I’m at a loss.
By the by, I’ve never seen the notworkingmessage appear, but I have seen blank information. Don’t know what that means.
Offline
Re: [archived] bsl_audioscrobbler
hey,
just wondering how this plugin is developing…
arp laszlo
www.inkwire.net
Offline
Re: [archived] bsl_audioscrobbler
‘am also wondering how this is doing…
and is this meant to work in RC3? if not, any chance that there will soon be a version that does?
thanks :)
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Re: [archived] bsl_audioscrobbler
I modified the plugin a bit. If there were less songs on the audioscrobbler feed than my limit empty items would show up. It’s a simple modification:
go to admin > plugins and edit the plugin.
The function that needs to be changes is parse_as_rdf
change this:
$Form = safe_field(‘Form’,‘txp_form’,“name=’$form’”);
for ($i = 1; $i <= $limit && $i <= $numsongs; $i++) {
to this:
$Form = safe_field(‘Form’,‘txp_form’,“name=’$form’”);
$numsongs = count($songinfo)/3;
for ($i = 1; $i <= $limit && $i <= $numsongs; $i++) {
And that’s it.
I’d like to add the posibility to display a message “I’m not listening to anything right now” when the audioscrobbler feed is empty, but I’m not versed enough in txp internals (ie it’ll have to wait a while).
Offline
Re: [archived] bsl_audioscrobbler
Had a bit of spare time. I’ve updated the plugin there’s a new attribute for the bsl_audioscrobbler tag: notlisteningmessage
. If the audioscrobbler feed contains no song the value of this attribute will be displayed.
Also if there are less songs than the limit you’ve set, the plugin will now only output the chosen form up to the last song in the list.
enjoy.
[edit] I screwed up. File couldn’t be downloaded.
Last edited by ruairi (2005-04-05 15:49:47)
Offline
Re: [archived] bsl_audioscrobbler
i’m getting errors with your new version, ruairi. had to go back to the old one. sorry i can’t give a better description, but i couldn’t get the error to consistently go away in order to find the culprit
Listen to Kenneth
Offline
Re: [archived] bsl_audioscrobbler
Kenneth,
which version of TXP are you on. I’m on RC3 and have no errors.
What was the error message?
Offline
Re: [archived] bsl_audioscrobbler
rc3, latest revision. it was an error with join() in publish.php. line 620 or so, the part of publish.php that deals with plugins.
Listen to Kenneth
Offline
Re: [archived] bsl_audioscrobbler
Ken,
I’ve tried to reproduce your error, but I’ve not had a lot of success. I get an error on join in txplib_misc.php (on line 304) in the evaled code.
I’m pretty sure that the following condition causes the following error:
When you don’t have any songs in the recently played feed:
the $articles array in the plugin isn’t initialized and when it tries to “join” the articles it’s passed a reference to an uninitialized array, then an error is raised.
Initializing the $articles array just before we enter the loop in parse_as_rdf should fix the problem:
$numsongs = count($songinfo)/3;
$articles = array();
for ($i = 1; $i <= $limit && $i <= $numsongs; $i++) {
Offline