View Full Version : Profile Enhancements - last.fm (was Audioscrobbler ) integration into Member Profile Page
buro9
10-15-2005, 10:00 PM
No longer supported by the author.
buro9
10-16-2005, 05:25 PM
First post reserved for updates, edits, announcements etc... because some of you guys browse around with the hack part minimised ;)
eNforce
10-16-2005, 06:02 PM
Is there a way to check if this pear stuff is already installed and running on the server? Cause my list is not updating n the profile
XML_RSS & cache lite?
michaelbenson
10-16-2005, 06:06 PM
Been looking for this for AGES!
Thanks a bunch :)
buro9
10-16-2005, 06:51 PM
Is there a way to check if this pear stuff is already installed and running on the server? Cause my list is not updating n the profile
XML_RSS & cache lite?
The simplest way is to upload the testPear.php file and call it.
It should tell you in green text that everything is fine... if you get a blank page, then you probably have an error (PEAR not existing) and errors got surpressed or something.
Snake
10-16-2005, 06:53 PM
Great hack!
eNforce
10-16-2005, 07:00 PM
The simplest way is to upload this as a test PHP file and call it:
I've just knocked it together... but it should work. It just tries to call both PEAR objects :)
If it falls over, it's because the PEAR items don't exist.
It just comes up blank for me so I guess that means it isn't installed :(
I don't know how to install this junk through cpanel or ssh so I'll just wait for a plugin or something I dunno.
Great idea for a hack though!
buro9
10-16-2005, 07:11 PM
It just comes up blank for me so I guess that means it isn't installed :(
I don't know how to install this junk through cpanel or ssh so I'll just wait for a plugin or something I dunno.
Great idea for a hack though!
Try now with the testPear.php file I've just attached. I actually had a bug in my posted script for testing PEAR, but this one I've tested myself instead of being so cowboy.
It's rather simple, echo's along the way:
<?php
echo 'About to include cache object<br />';
require_once('Cache/Lite.php');
$options = array(
'cacheDir' => '/tmp/',
'lifeTime' => 5*60
);
echo 'About to create cache object<br />';
$cacheLite = new Cache_Lite($options);
echo 'About to include call cache object<br />';
if ($cacheStructure = $cacheLite->get('cacheTest')) {
echo '<span style="color:green">Stuff in cache already, Cache_Lite must exist, as must XML_RSS.</span>';
} else {
echo 'Nothing in the cache, but cache object called successfully<br />';
echo 'About to include RSS object<br />';
require_once "XML/RSS.php";
echo 'About to create and call RSS object<br />';
$rss =& new XML_RSS('http://ws.audioscrobbler.com/rss/recent.php?user=buro9' );
$rss->parse();
echo 'About to save stuff to the cache<br />';
$cacheLite->save('textContent', 'cacheTest');
echo '<span style="color:green">Able to put stuff into cache, Cache_Lite must exist, as must XML_RSS.</span>';
}
?>
eNforce
10-16-2005, 07:19 PM
About to include cache object
About to create cache object
About to include call cache object
Nothing in the cache, but cache object called successfully
About to include RSS object
About to create and call RSS object
About to save stuff to the cache
Able to put stuff into cache, Cache_Lite must exist, as must XML_RSS.
This post was edited alot
Edit: OMG it's working on my forum! /me installs
buro9
10-16-2005, 07:26 PM
This post was edited alot
Clearly ;) It doesn't match what I got emailed :)
Glad it's working for you :)
eNforce
10-16-2005, 07:29 PM
:}
When displaying track names with weird characters it appears strange on the forum.
Mötley Crüe - Bittersuite is what the forum shows.
Where as it should be Mötley Crüe
buro9
10-16-2005, 07:31 PM
:}
When displaying track names with weird characters it appears strange on the forum.
Mötley Crüe - Bittersuite is what the forum shows.
Where as it should be M?tley Cr?e
Oooh, good find.
Actually I half knew about this but had forgotten... Bj?rk showed up wrong ages ago.
I'll do some testing... it's got to be the character set of the RSS I guess... will try and figure it out :)
buro9
10-16-2005, 08:14 PM
:}
When displaying track names with weird characters it appears strange on the forum.
Mötley Crüe - Bittersuite is what the forum shows.
Where as it should be M?tley Cr?e
It's actually a bug in their (last.fm's) feed. They should be HTML escaping special characters in the Title part of their RSS, and they are not.
I've reported it as a bug on their site:
http://www.last.fm/forum/21716/_/56191/1
The hack will work fine in the meantime, but display incorrectly these characters. As soon as they fix it, it will be perfect :)
michaelbenson
10-17-2005, 06:35 AM
So i suppose getting the error:
Warning: main(Cache/Lite.php): failed to open stream: No such file or directory in /audioscrobbler.php on line 25
Fatal error: main(): Failed opening required 'Cache/Lite.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxx/public_html/audioscrobbler.php on line 25
Means i need to install Cache Lite?
buro9
10-17-2005, 07:05 AM
Means i need to install Cache Lite?
It more likely means that you need to ask your host if PHP is compiled with PEAR or check your PHPINFO() to see whether it is.
For example, my PHPINFO() page:
http://www.bowlie.com/phpinfo.php
You can see in the Configure Command the bit: --with-pear
If you have that... then you have PEAR and you simply need to install Cache_Lite. However if you don't have PHP compiled with PEAR, then either you (if it's a dedicated server) or your host (if it's shared) need to recompile PHP with PEAR (which actually is the default for recent releases of PHP).
Once you have PEAR you need to ensure you have Cache_Lite... to do this, from the command line (in SSH as root or the user who has power to do stuff to PHP installs) enter this command:
pear install Cache_Lite
To which, it should look something like this once run:
root@example [~]# pear install Cache_Lite
downloading Cache_Lite-1.5.2.tgz ...
Starting to download Cache_Lite-1.5.2.tgz (21,306 bytes)
........done: 21,306 bytes
install ok: Cache_Lite 1.5.2
root@example [~]#
The PEAR installer is documented here:
http://pear.php.net/manual/en/installation.cli.php
If you need to do the same with XML_RSS the CLI command is:
pear install XML_RSS
If it needs you to download any dependencies... it will tell you :) And if it does... install those in the same way :)
rezovor
10-17-2005, 01:03 PM
Very Awesome *installs*
buro9
10-18-2005, 08:47 PM
Updated to handle special characters like the ? in Bj?rk :)
Just download and modify the audioscrobbler.php file to your needs :)
eNforce
11-14-2005, 11:12 PM
I don't know what I did to make this stop working but I get this error when runnin testPear.php
Warning: main(XML/Parser.php) [function.main]: failed to open stream: No such file or directory in /home/areyous/public_html/XML/RSS.php on line 23
Fatal error: main() [function.require]: Failed opening required 'XML/Parser.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/areyous/public_html/XML/RSS.php on line 23
Been working outstanding then the other day it stopped :ermm:
Edit: I've fixed it by finding the contents of the Parser.php and uploading it manually, still no idea why it got removed. Maybe my host did something when he moved me to a new server.
buro9
11-15-2005, 07:32 AM
I don't know what I did to make this stop working but I get this error when runnin testPear.php
Warning: main(XML/Parser.php) [function.main]: failed to open stream: No such file or directory in /home/areyous/public_html/XML/RSS.php on line 23
Fatal error: main() [function.require]: Failed opening required 'XML/Parser.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/areyous/public_html/XML/RSS.php on line 23
Been working outstanding then the other day it stopped :ermm:
Edit: I've fixed it by finding the contents of the Parser.php and uploading it manually, still no idea why it got removed. Maybe my host did something when he moved me to a new server.
There was a PHP security announcement regards XML-RPC libraries. PEAR and numerous other apps updated. But maybe your host was enthusiastically deleting rather than updating.
Zweeper
11-15-2006, 03:04 PM
Wow, is der a Hack like this to show the personal charts of every single user in the own profile??
Blackhat
08-18-2008, 04:39 PM
good question, is there anything like this for vb3.7x ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.