Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
Quick Last.fm/audoscrobbler latest tracks pack. Details »»
Quick Last.fm/audoscrobbler latest tracks pack.
Version: 1.00, by Sparky_s Sparky_s is offline
Developer Last Online: Oct 2009 Show Printable Version Email this Page

Version: 3.6.1 Rating:
Released: 09-25-2006 Last Update: Never Installs: 11
Template Edits
Additional Files  
No support by the author.

Following on from my quick hack to the member profiles, I have tested this setup out for quite a few months and I am very happy with the results.
The most recent add-on to the pack, I have tested for a few days and is pretty simple in terms of what it does.
Many special thanks to Skedoozy for his idea on the AIM icons add on, which is included here.

What it is!
This is basically a template mod to the posbit templates to add any latest songs/tracks a user has played beside their avatar/name.

Install time?

~5 minutes max for each feature.
~15 max for the whole package.

Add-on 1- Latest tracks in member profile.

As per this hack: https://vborg.vbsupport.ru/showthread.php?t=122843
If you have already installed this, you can proceed to install the next feature. (Add-on 2)

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>
                </if>
                $customfields
                </table>
Add:
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>
Save the template and thats it.

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].

Please also note the "basicrt10" in the http address for both chartstyle and /recenttracks.

You can change this to any of the following in the codes here:
http://www.last.fm/tools/charts/

If you have any querys, post them here if you like or PM me.

Add-on 2 - Tracks in Postbit

Note: If you have your forum on postbit_legacy please scroll to Add- on 2.1 after you read how to add a profile field below.

Having created the user input field in add-on 1, we can now use them to also show the details on the postbit.
However you must first create the option for if the user wants to display their tracks beside their username/avatar.

Create new user profile field in User Profile Fields> Add new user profile field.

Single selection radio buttons.

Edit the following:

Title= Show Last.fm track with posts?
Description= Click YES to show your last played track where you post.
Items per line= (leave at zero)
Options= YES on first line, NO on second line.
Set default= select 'no'
Display order= 98
Field Required= No
Field Editable by User= Yes
Private Field=No
Field Searchable on Members List= No
Show on Members List= No
Allow user to input their own value for this option=no
Max length of allowed user input=100
Field length= 25
Regular Expression= (blank)
Which page displays this option?= Options:Other

Once that's done go to
Styles & Templates> Style Manager.

Your style>>>Postbit templates>>>>>postbit

Find
Code:
<div id="postmenu_$post[postid]">
                    <if condition="$show['profile']">
                    <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
                    $post[onlinestatus]
                    <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
                    <else />
                    $post[musername]
                    </if>
                </div>
                
                <if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
After </if> add:
Code:
<if condition="$post[field10]">
<if condition="$bbuserinfo[field11] != 'NO'"><a href="http://www.last.fm/user/$post[field10]/?chartstyle=basicrt10"><img src="http://imagegen.last.fm/basicrt10/recenttracks/1/$post[field10].gif" border="0" /></a></if></if>
That is all for the postbit template.
Remember that [field11] will be whatever your profile field turns out to be. ie: 9, 10 etc.
The same also applies to the existing [field10] for the last.fm users name.

You can see a live example here.
Please not that I am using my own design to show latest tracks under the name "sparkysimple", you can change "basicrt10" to it if you rather that look.


Add-on 2.1 - Tracks in Postbit_legacy

As the image is generally too big to use in postbit_legacy, I have choosen to have it added beneath the signatures, you can tinker around with this and post your results if you can do better.

Please follow the step above to add a user field....

After the above is done....

In
Styles & Templates> Style Manager.

Your style>>>Postbit templates>>>>>postbit_legacy

Find
Code:
<if condition="$show['postedited']">
        <!-- edit note -->
            <div class="smallfont">            <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
                <em>
                <phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
                <if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
                </em>
            </div>
        <!-- / edit note -->
        </if>
Add after </if>:
Code:
<if condition="$post[field10]">
<if condition="$bbuserinfo[field11] != 'NO'">$post[field10]'s latest tracks -<a href="http://www.last.fm/user/$post[field10]/?chartstyle=sparkysimple"><img src="http://imagegen.last.fm/sparkysimple/recenttracks/1/$post[field10].gif" border="0" /></a></if></if>
Save all.


Add-on 3- Last.fm AIM icon linking to your profile

Special thanks to Skedoozy for this idea.

Again you will need to create another user option field in the same fashion as above but rename as appropiate.


Find in postbit or postbit_legacy, whichever your forum is running on:
Code:
$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
After add the following:
Code:
 <if condition="$bbuserinfo[field12] != 'NO'"><if condition="$post['fieldX']"><a href="http://www.last.fm/user/$post[fieldX]"><img src="/images/lastfm.gif" border="0" alt="$post[fieldX]'s Profile Page" /></a></if>
Again, [field12] is used for example and [fieldX] will be the id of the last.fm username profile field.

The last.fm icon is available below to save to your images directory.
(rightclick- save as)


After all this is done, inform your users and watch tracks appear.

I will offer of what I know and my knoweledge as support to help anyone with and problems they may encounter.

Happy installing and remember to hit the install button.



Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-26-2006, 08:21 PM
da420 da420 is offline
 
Join Date: Nov 2005
Posts: 1,232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry, but I am unsure of what this product accomplishes exactly...

Maybe some screenshots?

Quote:
This is basically a template mod to the posbit templates to add any latest songs/tracks a user has played beside their avatar/name.
I mean that I understand. But does it add the latest tracks automatically, or does a user have to manually add it?
Reply With Quote
  #3  
Old 09-26-2006, 08:35 PM
tazB.ca's Avatar
tazB.ca tazB.ca is offline
 
Join Date: Sep 2005
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks For This I Love Music And So My Members
Reply With Quote
  #4  
Old 09-27-2006, 03:37 PM
Sparky_s Sparky_s is offline
 
Join Date: Nov 2005
Location: Dublin, Ireland
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by da420
I'm sorry, but I am unsure of what this product accomplishes exactly...

Maybe some screenshots?



I mean that I understand. But does it add the latest tracks automatically, or does a user have to manually add it?
Oh sorry, I should of said more.

What it really does is grab the latest tracks info from last.fm.
They create an image of the last track you have played and have it on their server.
Basically what you are doing is grabbing that image and displaying it.

This is the image for my last.fm tracks info.


I'll upload a few screenshots for all soon.

I have tinkered around with the postbit_legacy template as to where the latest track image should be placed.

I know the edit buttons are on the right etc, using the stylevar, but does anyone have an idea as to get the image on the same line as them but only over on the left.
Stylevar left seems to keep it left but one line over. Maybe I need to tinker a bit more
Reply With Quote
  #5  
Old 10-05-2006, 12:12 AM
SecTa SecTa is offline
 
Join Date: Dec 2004
Location: Alfa Centauri
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a possibility to use XML for integrating it in forum, take a look here. This will be more customizable and won't lag as picture version does...
Reply With Quote
  #6  
Old 10-15-2006, 11:16 PM
Sparky_s Sparky_s is offline
 
Join Date: Nov 2005
Location: Dublin, Ireland
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm going to have a good luck at some other methods.

For the moment the image seems to be the simplest. Pitty it can be slow at times.
Reply With Quote
  #7  
Old 11-30-2006, 02:32 PM
Sparky_s Sparky_s is offline
 
Join Date: Nov 2005
Location: Dublin, Ireland
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just an update:

There was a small error in the lastfm icon code.

I have since edited the code, so all should be ok.

Basically. I left the http: in after the src code.
Reply With Quote
  #8  
Old 05-27-2007, 05:28 PM
Drix Drix is offline
 
Join Date: Aug 2005
Location: Norway
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance for an update of this to 3.6.7 PL1?

That would be great!
Reply With Quote
  #9  
Old 05-29-2007, 04:13 AM
Drix Drix is offline
 
Join Date: Aug 2005
Location: Norway
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wasn't that much change in the template, so i fixed it myself. Thanks for the script!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:09 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05691 seconds
  • Memory Usage 2,295KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete