![]() |
Quick Last.fm addon to member profile
From doing a search here for a Last.fm/audioscrobbler hack to add a last.fm recent tracks, the two I found required Pear.
So I decided to do a quick add on and to share it. As I'm new to this, I wont be able to offer full support, but I will hope that since it's fairly simple, none should be required. If so, I can try myself and hope for help from other users. Create new user profile field in User Profile Fields> Add new user profile field. Edit the following: Title= Last.fm recent tracks Description= Your Last.fm username Default Value= (leave blank) Max length of allowed user input=100 Field Length=25 Profile Field Type= Single-Line Text Box Display Order=99 (this is to make sure the last.fm field is last on the list) Field Required= No Field Editable by User= Yes Private Field=No Field Searchable on Members List= No Show on Members List= No Regular Expression= (blank) Which page displays this option?= Edit Profile. Once this is done, make sure to remember the field number, in my case it was 'field10'. In your case change it to whatever field number that you have. In Styles & Templates> Style Manager. Go to your chosen style and find MEMBERINFO under 'Member Info Templates' After: Code:
</tr> Code:
<if condition="$post['field10']"><div><a href="http://www.last.fm/user/$post[field10]/?chartstyle=basicrt10"><img src="http://imagegen.last.fm/basicrt10/recenttracks/$post[field10].gif" border="0" alt="$post[field10]'s Profile Page" /></a></div></if> Live example here If you want a different style or want to have top albums, top tracks etc, all you need to do is go to your last.fm tools section and select charts. Copy the code for websites and just replace the username with $post[fieldX]. Thank you all Sparky. |
safe simple but amazing thanks alot
|
nice simple hack my users should like it, nice forum as well mate
|
Cheers. Thanks for the complements ;)
|
Thanks for the hack! I'll install it right away...
|
|
Quote:
I will try out a simular system for vB. I am currently testing it out beside a username in the postbit. However, it only looks good in the standard postbit, not postbit legacy. http://www.htireland.com/television/...how-16461.html |
Installed! Thanks!
I modded it so I could put a link in peoples posts where the aim, icq, and other icons are. Find in postbit or postbit_legacy(whichever you use): Code:
$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] Insert this code after: Code:
<if condition="$post['fieldX']"><a href="http://www.last.fm/user/$post[fieldX]"><img src="http://yoursite.com/images/lastfm.gif" border="0" alt="$post[fieldX]'s Profile Page" /></a></if> |
Excellent. I never thought of that.
I could try to have it as an option also where you can either have the tracks listed beside the username or have the icon beside the IM icons. Excellent add. |
I've tested various options of adding the tracks to the postbit. The charts are usually too wide for the postbit_legacy so I had to make my own. It doesnt update that often depending on the users cache setting though. I've had it in my postbit for the last week or so just showing the last track but it seems very buggy as to whether it's showing the actual last track played or one of the last five. It's weird.
|
All times are GMT. The time now is 03:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|