Back to vBulletin 3.6 Template Modifications

Quick Last.fm/audoscrobbler latest tracks pack.
Mod Version: 1.00, by Sparky_s

This modification is in the archives.
vB Version: 3.6.1 Rating: (1 vote - 5.00 average) Installs: 11
Released: 26 Sep 2006 Last Update: Never Downloads: 3
Not Supported Template Edits Additional Files  

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: Quick Last.fm addon to member profile
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.

http://www.htireland.com/member.php?u=2

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 http://www.htireland.com/cablesatelliteterrestrial/t-sky-hd-preview-481.html.
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.



Download

No files for download.

Screenshots

Click image for larger version
Name:	site1.jpg
Views:	326
Size:	78.5 KB
ID:	53998   Click image for larger version
Name:	site2.jpg
Views:	377
Size:	127.8 KB
ID:	53999   Click image for larger version
Name:	site3.jpg
Views:	312
Size:	112.7 KB
ID:	54000  

Similar Mods

[Release] Quick Reply Expantion Pack vBulletin 2.x Template Modifications

vblts.ru supports vBulletin®, 2022-2024