Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] bsl_audioscrobbler
I can’t get version seven to work, but if I use version 6 it works fine… Anyone have any ideas as to why this would happen? I’m using the example of the audioscrobbler form above, and I remember that it worked at one point in time. The plugin tag looks like the one above.
Offline
Re: [archived] bsl_audioscrobbler
If it helps, here’s mine:
<pre><txp:bsl_audioscrobbler username=“kevinashworth”
limit=“4” form=“audioscrobbler” usecache=“1” cachepath=”./as_cache”
notworkingmessage=“This feature is having technical difficulties; please stand by.” /></pre>
The audioscrobbler form is thus:
<pre><span class=“songauthor”><txp:author /></span>:
<txp:permlink><span class=“songtitle”><txp:title /></span></txp:permlink><br /></pre>
Last edited by kevinashworth (2004-12-04 07:00:02)
Offline
#48 2004-12-06 21:03:25
- arakune
- Member
- Registered: 2004-10-23
- Posts: 13
Re: [archived] bsl_audioscrobbler
> kevinashworth wrote:
> If it helps, here’s mine:
<pre><txp:bsl_audioscrobbler username=“kevinashworth”
limit=“4” form=“audioscrobbler” usecache=“1” cachepath=”./as_cache”
notworkingmessage=“This feature is having technical difficulties; please stand by.” /></pre>
The audioscrobbler form is thus:
<pre><span class=“songauthor”><txp:author /></span>:
<txp:permlink><span class=“songtitle”><txp:title /></span></txp:permlink><br /></pre>
Using your txp:bsl_audioscrobbler tag & form, I still get the same error:
Fatal error: Call to undefined function: curl_init() in /u2/afs/home/arakune/web_tree/blog.cp/textpattern/publish.php(767) : eval()’d code on line 946
Offline
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