[REQ] MP3 Player

kaB00M

New Member
If someone could spend a view seconds to grab me this, it would make me happy :)

Code:
http://www.vbulletin.org/forum/showthread.php?t=214321
 
While there are many profile enhancements to add another site-hosted MP3 Player/Playlist, this modification will just add an MP3 player to your profile that uses a normal http://www.xxx.com/xxx.mp3 link to embed and host. You can upload files to your own site and let your users add them themselves, or you can allow a staff member to preapprove them and add them for you.

== INSTALL ==

1. Navigate to User Profile Fields, and add a new Single-Line textbox.

Code:
Code:
Title: MP3 Player URL
Description: Type in your fully qualified MP3 link to enable music to appear on your profile!
Default Value: N/A
Field Required: No
Field Editable by User: (SEE *1 AT THE END OF THE POST)
Private Field: Yes
Field Searchable on Member's List: No
Show On Member's List: No
Once you are redirected to the "manager," scroll and find your field. Note the number your field is.

field.png


2. Navigate to your MEMBERINFO template, and add this under $blocks[stats_mini]:

HTML Code:
HTML:
   <!-- Music MP3 -->
<if condition="$userinfo[XXX]">
<div id="$id" class="tborder content_block">
    <h4 class="thead block_title">
        <a href="#top" class="collapse_gadget" onclick="return toggle_collapse('$id')"><img id="collapseimg_$id" src="$stylevar[imgdir_button]/collapse_generic{$vbcollapse['collapseimg_'.$id]}.gif" alt="" border="0" /></a>
        <a name="$id"></a>
        <span class="block_name">Music</span>
    </h4>
    <div class="block_content" id="collapseobj_$id" style="{$vbcollapse['collapseobj_'.$id]}"><div class="alt1 smallfont block_row block_footer">
<p align="center">
<EMBED TYPE="AUDIO/MPEG" SRC="$userinfo[XXX]" HEIGHT=14 WIDTH=239 AUTOSTART=TRUE>
</p>
</div></div>
</div>
</if>
<!-- / Music MP3 -->
***REPLACE the "XXX's" with your field number you found above, matching something like: fieldX with X as a number.***

3. All done!

== NOTES ==

*1 - If you would not like your users to be able to enter any MP3 URL they like, set this option to No. You will have to have someone that has access to "Edit a User" in the AdminCP to add the link in for them, for the box to show up. If you don't care, then your user can go to UserCP > Edit Your Details or wherever you placed the option to enable it.

Enjoy!
 
Back
Top