Boyah Forums

Important => Announcements => Topic started by: Daddy on July 27, 2009, 04:43:34 PM

Title: Last.fm thing
Post by: Daddy on July 27, 2009, 04:43:34 PM
Okay PrivateRolf reminded me to get around to implementing the Last.fm mod.

If you enter your username in your profile your last played track on Last.FM will show above the "Report to Moderator" button in your profile.

Thanks Malpercio for writing it. baddood;
Title: Re: Last.fm thing
Post by: Samus Aran on July 27, 2009, 05:02:09 PM
Awesome, a feature that actually pertains to my interests.

thumbup;
Title: Re: Last.fm thing
Post by: Classic on July 27, 2009, 05:08:37 PM
I do not have Last.fm.

Do they have music I like?  O_0
Title: Re: Last.fm thing
Post by: Thyme on July 27, 2009, 05:09:42 PM
Quote from: Dr. Hystakes Casino on July 27, 2009, 05:08:37 PM
I do not have Last.fm.

Do they have music I like?  O_0


Necessarily, since it's your music. maps;
Title: Re: Last.fm thing
Post by: Daddy on July 27, 2009, 05:11:11 PM
Quote from: Ken on July 27, 2009, 05:02:09 PM
Awesome, a feature that actually pertains to my interests.

thumbup;
hocuspocus;

Add your name so I can see that it works. happydood;
Title: Re: Last.fm thing
Post by: Classic on July 27, 2009, 05:15:08 PM
Quote from: Thyme on July 27, 2009, 05:09:42 PM
Necessarily, since it's your music. maps;

how does this work i don't know
Title: Re: Last.fm thing
Post by: Samus Aran on July 27, 2009, 05:16:23 PM
Quote from: Prowling Kewn on July 27, 2009, 05:11:11 PM
hocuspocus;

Add your name so I can see that it works. happydood;


Oh it works all right. thumbup;
Title: Re: Last.fm thing
Post by: Daddy on July 27, 2009, 05:16:44 PM
Quote from: Dr. Hystakes Casino on July 27, 2009, 05:15:08 PM
how does this work i don't know
1. Register on last.fm
2. Download a client that tracks what you listen to.
3. enter user name and password
4. Listen to music.
5. check website and find people who like music similar to yours and new artists. Q('_' Q)
Title: Re: Last.fm thing
Post by: Classic on July 27, 2009, 05:18:08 PM
Sounds complicated.
Title: Re: Last.fm thing
Post by: Samus Aran on July 27, 2009, 05:19:47 PM
Quote from: Dr. Hystakes Casino on July 27, 2009, 05:18:08 PM
Sounds complicated.


Not really. Basically it's a site that gives you a small little program that runs in the background automatically while you listen to music with iTunes, WMP, etc. It tracks what you listen to and puts them on your last.fm profile, which lists recently played music, most played artists, most played tracks, etc.

It's like social networking, but more lightweight and purely for music.
Title: Re: Last.fm thing
Post by: Thyme on July 27, 2009, 05:21:18 PM
Bah, my explanation was gonna be all clumsy and stuff, Kaz's is way better. hocuspocus;
Title: Re: Last.fm thing
Post by: Classic on July 27, 2009, 05:22:26 PM
So...the music I'm listening to in Windows Media Player...it tells you guys?  O_0
Title: Re: Last.fm thing
Post by: Daddy on July 27, 2009, 05:22:58 PM
Quote from: Dr. Hystakes Casino on July 27, 2009, 05:22:26 PM
So...the music I'm listening to in Windows Media Player...it tells you guys?  O_0
yeah.
Title: Re: Last.fm thing
Post by: Samus Aran on July 27, 2009, 05:23:41 PM
Quote from: Dr. Hystakes Casino on July 27, 2009, 05:22:26 PM
So...the music I'm listening to in Windows Media Player...it tells you guys?  O_0


Yes, so long as you have it labeled correctly and all.
Title: Re: Last.fm thing
Post by: Thyme on July 27, 2009, 05:23:55 PM
Quote from: Dr. Hystakes Casino on July 27, 2009, 05:22:26 PM
So...the music I'm listening to in Windows Media Player...it tells you guys?  O_0


Only if you enter your username in your Forum Profile Information here. Otherwise, we'd have to go directly to your last.fm page. n_u
Title: Re: Last.fm thing
Post by: Daddy on July 27, 2009, 05:25:43 PM
 (http://imagegen.last.fm/tristaz/recenttracks/JMV290.gif)  (http://www.last.fm/user/JMV290/?chartstyle=tristaz)

You can also make silly images. giggle;
Title: Re: Last.fm thing
Post by: Classic on July 27, 2009, 05:34:09 PM
Sounds cool.
Title: Re: Last.fm thing
Post by: Smell Memory on July 27, 2009, 08:05:29 PM
I lost interest in my Last.FM

I'm going to delete it sometime this week if I feel like it  hocuspocus;
Title: Re: Last.fm thing
Post by: Thyme on July 27, 2009, 08:44:14 PM
Needs more people who do it. badass
Title: Re: Last.fm thing
Post by: FAMY2 on July 27, 2009, 08:47:10 PM
And let people know what I listen too?   n_u  Actually I have one. 
Title: Re: Last.fm thing
Post by: Thyme on July 27, 2009, 09:03:48 PM
Quote from: FAMY2 on July 27, 2009, 08:47:10 PM
And let people know what I listen too?   n_u  Actually I have one. 


Yes, Rae. Let people know what you listen too. happydood; n_u

But I was more referencing to all those people who posted in the other last.fm thread. saddood;
Title: Re: Last.fm thing
Post by: FAMY2 on July 27, 2009, 09:09:09 PM
Quote from: Thyme on July 27, 2009, 09:03:48 PM
Yes, Rae. Let people know what you listen too. happydood; n_u

But I was more referencing to all those people who posted in the other last.fm thread. saddood;


I haven't got much. lol
Title: Re: Last.fm thing
Post by: Thyme on July 27, 2009, 09:13:51 PM
Quote from: FAMY2 on July 27, 2009, 09:09:09 PM
I haven't got much. lol


Me either, actually. You're probably going to see "Psychosocial - Slipknot" in my posts half of the time from now on. n_u
Title: Re: Last.fm thing
Post by: FAMY2 on July 27, 2009, 09:23:48 PM
I play Prince about every other song.   n_u
Title: Re: Last.fm thing
Post by: Petro on July 27, 2009, 10:28:03 PM
You know, I can give you the more recent code that adds a tiny, tiny thumbnail of the album art and a link to the song.

It honestly won't take that long.  happydood;
Title: Re: Last.fm thing
Post by: strongbad on July 27, 2009, 10:51:51 PM
Quote from: Petro on July 27, 2009, 10:28:03 PM
You know, I can give you the more recent code that adds a tiny, tiny thumbnail of the album art and a link to the song.

It honestly won't take that long.  happydood;

I'd rather just have the text. The rest seems too obtrusive.
Title: Re: Last.fm thing
Post by: strongbad on July 27, 2009, 10:53:19 PM
Also I deleted the last.fm software since it didn't work with my Zune media player. What player (other than iTunes) should I use instead? I feel like getting back into last.fm now.
Title: Re: Last.fm thing
Post by: Petro on July 27, 2009, 11:13:14 PM
Quote from: Henry Hatsworth on July 27, 2009, 10:53:19 PM
Also I deleted the last.fm software since it didn't work with my Zune media player. What player (other than iTunes) should I use instead? I feel like getting back into last.fm now.
Foobar, MediaMonkey.
Title: Re: Last.fm thing
Post by: Geno on July 27, 2009, 11:18:44 PM
I just got last.fm for the hell of it
now how do I use this thing.


nm I got it
Title: Re: Last.fm thing
Post by: Placebo Headwound on July 28, 2009, 07:22:49 AM
Quote from: Prowling Kewn on July 27, 2009, 05:25:43 PM
(http://imagegen.last.fm/tristaz/recenttracks/JMV290.gif)  (http://www.last.fm/user/JMV290/?chartstyle=tristaz)

You can also make silly images. giggle;
Fuck yeah Mountain Goats. giggle;
Title: Re: Last.fm thing
Post by: Petro on July 28, 2009, 09:28:43 AM
This is basically what it loooks like with album art, and there's a link to the song if you click on the picture/text.

(http://img193.imageshack.us/img193/62/snip1.png)

Just my opinion, but it doesn't seem that much more obtrusive.
Title: Re: Last.fm thing
Post by: Daddy on July 28, 2009, 09:35:41 AM
Quote from: Petro on July 28, 2009, 09:28:43 AM
This is basically what it loooks like with album art, and there's a link to the song if you click on the picture/text.

(http://img193.imageshack.us/img193/62/snip1.png)

Just my opinion, but it doesn't seem that much more obtrusive.
What if there is no image baddood;

Also what is the line lol
Title: Re: Last.fm thing
Post by: Petro on July 28, 2009, 09:40:18 AM
Quote from: Prowling Kewn on July 28, 2009, 09:35:41 AM
What if there is no image baddood;

Also what is the line lol
It's the signature line.

It displays this if there's no image:
(http://cdn.last.fm/depth/catalogue/noimage/cover_med.gif)

Only smaller. baddood;
Title: Re: Last.fm thing
Post by: Daddy on July 28, 2009, 10:27:50 AM
Quote from: Petro on July 28, 2009, 09:40:18 AM
It's the signature line.

It displays this if there's no image:
(http://cdn.last.fm/depth/catalogue/noimage/cover_med.gif)

Only smaller. baddood;
No i meant the line of code lol
Title: Re: Last.fm thing
Post by: Petro on July 28, 2009, 01:17:08 PM
Quote from: Prowling Kewn on July 28, 2009, 10:27:50 AM
No i meant the line of code lol

Place this in Display.template.php
[spoiler]
Code Select
//Last.fm listening mod

// We need to determine what their last.fm username is
$lastuser = @mysql_result(mysql_query("SELECT value FROM smf_themes WHERE variable='last' AND id_member='" .  $message['member']['id'] . "'"),0);
// Do they have a last.fm username?
$emptyornot = empty($lastuser);

// And now to display what the user is listening to.
if( $emptyornot != 1)
{
// The last.fm username you want to get data for.
$username = $lastuser;

// Your Last.fm API Key.
$apikey = 'YOURAPIKEYGOESHERE'
// This tells the script what method to use to get the data from last.fm.
// Different methods and examples are documented under "methods" below.
$method = 'RecentTracks';

// Custom Formatting. In the example below, [url] is converted into the track
// URL on last.fm, [name] into the track name and [artist] into the track's artist.
// Refer to the documentation for that method below for formatting options.
$formatting = '<a href="[url]"><img align="right" src="[medium]" height="50px" width="50px">[name] - [artist]</a><br>';

// Number of recent tracks you want to show. (Leave blank for maximum)
$number = '1';

// URL for image if no album/track art. (Leave blank for last.fm default)
$defaultart = '';

// GMT hour offset. (0 or blank means keep the time at GMT, -5 makes the time EST etc.)
$offset = '-5';

include('lfmfuncs.php');
lastfmdata($method,$username,$apikey,$formatting,$number,$defaultart,$offset);
}
[/spoiler]
And put this in the root of your forum.
http://source.aelabs.net/downloads/lfmfuncs.php
Title: Re: Last.fm thing
Post by: Daphnia on July 28, 2009, 06:52:13 PM
PRETTY COOL, DUDES
Title: Re: Last.fm thing
Post by: Daddy on July 28, 2009, 08:17:05 PM
Quote from: Petro on July 28, 2009, 01:17:08 PM
Place this in Display.template.php
[spoiler]
Code Select
//Last.fm listening mod

// We need to determine what their last.fm username is
$lastuser = @mysql_result(mysql_query("SELECT value FROM smf_themes WHERE variable='last' AND id_member='" .  $message['member']['id'] . "'"),0);
// Do they have a last.fm username?
$emptyornot = empty($lastuser);

// And now to display what the user is listening to.
if( $emptyornot != 1)
{
// The last.fm username you want to get data for.
$username = $lastuser;

// Your Last.fm API Key.
$apikey = 'YOURAPIKEYGOESHERE'
// This tells the script what method to use to get the data from last.fm.
// Different methods and examples are documented under "methods" below.
$method = 'RecentTracks';

// Custom Formatting. In the example below, [url] is converted into the track
// URL on last.fm, [name] into the track name and [artist] into the track's artist.
// Refer to the documentation for that method below for formatting options.
$formatting = '<a href="[url]"><img align="right" src="[medium]" height="50px" width="50px">[name] - [artist]</a><br>';

// Number of recent tracks you want to show. (Leave blank for maximum)
$number = '1';

// URL for image if no album/track art. (Leave blank for last.fm default)
$defaultart = '';

// GMT hour offset. (0 or blank means keep the time at GMT, -5 makes the time EST etc.)
$offset = '-5';

include('lfmfuncs.php');
lastfmdata($method,$username,$apikey,$formatting,$number,$defaultart,$offset);
}
[/spoiler]
And put this in the root of your forum.
http://source.aelabs.net/downloads/lfmfuncs.php

That seems really convoluted lol.

What about index.php?
Title: Re: Last.fm thing
Post by: Petro on July 28, 2009, 09:55:18 PM
Quote from: Prowling Kewn on July 28, 2009, 08:17:05 PM
That seems really convoluted lol.

What about index.php?
It's no longer necessary in index.template.php or index.php if you do what I did above.