Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Link to your LastFM Profile in Postbit Legacy Details »»
Link to your LastFM Profile in Postbit Legacy
Version: 1.00, by zombietom zombietom is offline
Developer Last Online: Dec 2011 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.7.x Rating:
Released: 01-12-2010 Last Update: Never Installs: 5
Template Edits
Re-useable Code  
No support by the author.

I have a gaming website and with xbox 360 adding LastFm as a feature I figured it'd be nice to let my users link to their LastFM Profiles.
So I created this code.
This should work on any version of VB (maybe not 4.0)

Create a new profile Field (remember the field id number)
Directions:
1. In adminCP go to user profile fields
2. Click on add new profile field
3. add The following
Title - LastFM
Description -Add in your LastFM user name to create a link to your LastFM profile.
Default Value -leave blank
Max length of allowed user input - set to at least 15 or whatever you want
Field Length- Set to at least 15 or whatever you want
Profile Field Type -Single-Line Text Box
Field Required - yes or no ..up to you..i set mine to no
Field Editable by User - YES
Private Field - NO
Field Searchable on Members List - Yes or No ..up to you
Show on Members List -yes or no ..up to you
Regular Expression - Left mine blank
Which page displays this option - select "edit your details" from the menu
Finish - Click save and remember you fieldID number

Adding the following Code in your postbit legacy.

How to get to your postbit legacy:
Go to your forum's admin panel >Style & Templates>Style manager>pick Your style and click the expand button on the right>highlight postbit templets and click the expand/collapse button> select postbit legacy and click the edit button> ....

Look for this code:

look for(about in the middle):

PHP Code:
<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon]"><div class="postbit_icons">$post[icqicon$post[aimicon$post[msnicon$post[yahooicon$post[skypeicon

Add this Code at the end after [skypeicon] and before </div>


PHP Code:
<if condition="$post[fieldXX]"><a target="_blank" href="http://www.last.fm/user/$post[fieldXX]"><img src="http://www.yoursite/images/misc/LastFm2.png" alt="My LastFM Profile" border="0"></a>
</if> 
click save. Done.

Be sure to change the XX in the above code to you Field Id number that you just created. Then go to your forum usercp panel and click on edit Details, add in your LastFM profile name, click save. Done.

You can add this code about anywhere you want the LastFm link to show up.



I have included 2 different images for the icon, feel free to adjust the size to whatever you need, just make sure the image link is linking to whever images your using .

Click Installed.

This code is Reusable as long as you give me credit for it.

Thanks
Zombietom

Show Your Support

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

Comments
  #2  
Old 01-18-2010, 10:45 AM
VNVIP VNVIP is offline
 
Join Date: May 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works on VB 4.0.x to

PHP Code:
<vb:if condition="$post{?fieldXX?}"><a target="_blank" href="http://www.last.fm/user/{vb:raw post.fieldXX}"><img src="http://www.yoursite/images/misc/LastFm2.png" alt="My LastFM Profile" border="0"></a>
</
vb:if> 
Reply With Quote
  #3  
Old 01-18-2010, 04:29 PM
zombietom's Avatar
zombietom zombietom is offline
 
Join Date: May 2008
Location: ky
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great ! Thanks for posting..Please click installed
Reply With Quote
Reply


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 02:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11222 seconds
  • Memory Usage 2,227KB
  • Queries Executed 18 (?)
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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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