Mother_Dee
03-26-2008, 10:00 PM
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:
<!-- 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):
</div>
</div>
</td>
</tr>
</table>
<else />
</table>
</if>
<!-- /End Last.fm -->
Demo (http://www.darkportals.com/forum/member.php?u=103)
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:
<!-- 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):
</div>
</div>
</td>
</tr>
</table>
<else />
</table>
</if>
<!-- /End Last.fm -->
Demo (http://www.darkportals.com/forum/member.php?u=103)