Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] bsl_audioscrobbler

#49 2005-01-11 10:44:48

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

Re: [archived] bsl_audioscrobbler

I’m getting the same error as above.

Offline

#50 2005-01-11 16:58:19

kevinashworth
Member
From: Massachusetts
Registered: 2004-07-30
Posts: 26
Website

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

#51 2005-02-20 22:28:12

puthupa
Member
From: ny
Registered: 2004-10-07
Posts: 27
Website

Re: [archived] bsl_audioscrobbler

hey,

just wondering how this plugin is developing…


arp laszlo
www.inkwire.net

Offline

#52 2005-04-05 00:24:23

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

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

#53 2005-04-05 11:19:38

ruairi
Archived Plugin Author
From: Madrid, Spain
Registered: 2005-04-05
Posts: 17
Website

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

#54 2005-04-05 14:49:46

ruairi
Archived Plugin Author
From: Madrid, Spain
Registered: 2005-04-05
Posts: 17
Website

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.

download

enjoy.

[edit] I screwed up. File couldn’t be downloaded.

Last edited by ruairi (2005-04-05 15:49:47)

Offline

#55 2005-04-06 18:55:41

kennethlove666
Member
From: arkansas
Registered: 2004-04-27
Posts: 107
Website

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

#56 2005-04-07 09:54:43

ruairi
Archived Plugin Author
From: Madrid, Spain
Registered: 2005-04-05
Posts: 17
Website

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

#57 2005-04-07 15:50:51

kennethlove666
Member
From: arkansas
Registered: 2004-04-27
Posts: 107
Website

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

#58 2005-04-12 12:26:20

ruairi
Archived Plugin Author
From: Madrid, Spain
Registered: 2005-04-05
Posts: 17
Website

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

  1. Index
  2. » Archives
  3. » [archived] bsl_audioscrobbler

Board footer

Powered by FluxBB