vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Miscellaneous Hacks - Last.fm Widget in MEMBERINFO Template (https://vborg.vbsupport.ru/showthread.php?t=174324)

Mother_Dee 03-26-2008 10:00 PM

Last.fm Widget in MEMBERINFO Template
 
I've had a couple of people ask on my forums how I did this, so here it is:

Create a new User Profile Field:
  • Profile Field Type: Single Line Textbox
  • Title: Last.fm
  • Description: Last.fm Username

Write down the Field ID (ie: field20), you'll need it in a few minutes.


Create your Last.fm Widget:

Create your widget at http://www.last.fm/widgets - customize the type and color for your forums, then copy the HTML code.


Edit the MEMBERINFO template:
  • Find the end of your table code, above the footer variable.

(The code below may need to be tweaked a little based on your own style, this is just a guideline)
  • Replace the table closing tag with:
Code:

<!-- Last.fm -->
<if condition="$post['fieldXX']">
<tr>
        <td class="tcat" width="100%" colspan="2">Music</td>
</tr>
<tr valign="top">
        <td class="panelsurround" align="center" colspan="2">
        <div class="panel">
                <div align="$stylevar[center]">

  • Replace 'fieldXX' with your user profile field field number (ie: 'field20')
  • Insert your widget HTML code
  • Find and Replace all instances of your last.fm username used to create the widget with your user profile field id variable (ie: ?url=user%2FHENRY should become ?url=user%2F$post[fieldXX]) - bold is only for looks. ^.^
  • Close the table with the following (tweak code according to style):
Code:

</div>
          </div>
      </td>
  </tr>
</table>
        <else />
</table>
        </if>
<!-- /End Last.fm -->


Demo

pvalderh 05-28-2008 01:07 AM

Thanks for this :)

Nosferatu 06-25-2008 12:54 PM

heya, any idea how you do it for the tabbed profiles? I had it before in a previous version but accidently reverted my templates without backup (grrz)

I tried just seeing if I could add it at the bottom but not having much luck, I think this is a brilliant mod, very underated!

http://www.gothicwinter.com/forums/member.php?u=1


All times are GMT. The time now is 10:55 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.01006 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete