Bravo List
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Old 10th March 2008, 17:27
Fynnon's Avatar
Fynnon Fynnon is offline
Join Date: Nov 2007
Posts: 975
Default Music on Index
Music Player

Ok, your going to need to grab the Button version 0.1 from the above link. Its very tiny, and not intrusive at all!

Now create a folder called something like button in the root directory of your site. And upload the content's of the into the Newly created directory. (you really should save it something different to this, to stop people linking to yours!)

Now create a folder called something like playlist (And again you really should save it something different to this, to stop people linking to yours! Im not joking, someone could easily link to your's and steal your BW!)

Note, there is a link on the same address above, where you can create the code for the player, but for this little "guide", I'll assume your going to use mine.

So, let's get on with the code.

First off, the SQL
ALTER TABLE `users` ADD `intromusic` ENUM( 'yes', 'no' ) DEFAULT 'yes' NOT NULL;
Upload whatever .mp3's you want to be played to the playlist folder. But I would suggest you name the mp3's something easy to to type out. You'll see why in a mo :)

Now, create and save a blank file called index.html, and place a copy in both of the newly created folder's. This is to stop people browsing, and of course downloading the contents of the folders!

So, by now, I'm assuming you have done the above, and now have the .mp3's nestling in your playlist folder.
So, create a file called crimbo.xspf, and edit it so that it contains links to all of the .mp3's you just uploaded. And save it in your playlist directory.
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns="">
You can obviously add as many tracks in the format as you want. I currently have over 20 :)

Now, in my.php, just after:
tr("Accept PMs",
"<input type=radio name=acceptpms" . ($CURUSER["acceptpms"] == "yes" ? " checked" : "") . " value=yes>All (except blocks)
<input type=radio name=acceptpms" .  ($CURUSER["acceptpms"] == "friends" ? " checked" : "") . " value=friends>Friends only
<input type=radio name=acceptpms" .  ($CURUSER["acceptpms"] == "no" ? " checked" : "") . " value=no>Staff only"

tr("Intro Music",
"<input type=radio name=intromusic" . ($CURUSER["intromusic"] == "yes" ? " checked" : "") . " value=yes>Yeppers
<input type=radio name=intromusic" .  ($CURUSER["intromusic"] == "no" ? " checked" : "") . " value=no>Bah Humbug"
Now in takeprofedit.php, just after:
$avatar = $_POST["avatar"];
$avatars = ($_POST["avatars"] != "" ? "yes" : "no");
$intromusic = $_POST["intromusic"];
And just after:
if (is_valid_id($stylesheet))
  $updateset[] = "stylesheet = '$stylesheet'";
if (is_valid_id($country))
  $updateset[] = "country = $country";
$updateset[] = "intromusic =  " . sqlesc($intromusic);
So it looks like:
if (is_valid_id($country))
  $updateset[] = "country = $country";

$updateset[] = "intromusic =  " . sqlesc($intromusic);
You can add it wherever you want it to display in index.php, but I placed mine at the top.

Now, This is where it could get a tad tricky. So please take care when editing the code. I would also suggest you save an index2.php with the index.php contents in, and tinker with it. Once your happy, put the code into index.php

Just after:
stderr("Error", "An error occured.");
Add, after you have ammended the the changes!!

if ($CURUSER["intromusic"] == 'yes') 
{ ?>
<object type="application/x-shockwave-flash"
width="17" height="17">
<param name="movie" 
value=",FFFF00,C0C0C0,000000&" />
<div align="bottom"><FONT FACE="Times New Roman" SIZE="1" COLOR="#FFFF00">Disable the music by
editing Your Profile</FONT></div>
<? }  
  print("<FONT FACE=\"Times New Roman\" SIZE=\"1\" COLOR=\"#FFFF00\">Bah HUMBUG!
 you disabled the crimbo music!</font>");
Now, the parts you need to pay attention to when editing, are obviously the link's, changing YOUR-SITE-HERE your site's URL of course, but also pay attention to the playlist and button in the link, You need to change those to the folders name ("duh" I hear you all cry, just making sure to wipe any nose's, that may need wiping :) )

Now, the little bugger thats hidden away, is playlist_size=3, You need to change that to however many .mp3's you have in your .xspf file!. Youll also need to remember to ammend that, if you add more track's at a later date :)

And of course, feel free to tinker with the colours to suit your site :)

So, I think thats all done.

Each individual user can choose wheter or not they want to hear the newly added cheesy addition to your site :)

mod by
Reply With Quote
The Following User Says Thank You to Fynnon For This Useful Post:
SooR (15th January 2009)
Old 10th October 2010, 17:03
DaDuKuTzU's Avatar
DaDuKuTzU DaDuKuTzU is offline
Join Date: Jul 2009
Posts: 4
thanks! Really works!
Reply With Quote
Old 20th January 2012, 15:41
laciz23's Avatar
laciz23 laciz23 is offline
Join Date: Oct 2011
Posts: 2
Is thare a way to make a replay option ?
Reply With Quote

index , music

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
TBDev Music Mania Edition hellix Downloads 43 14th August 2013 12:51
make music Tory Template Shares 1 12th September 2009 14:30
Music cat icons hellix TBDev 1 20th December 2008 19:08

All times are GMT +2. The time now is 06:36. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2022, vBulletin Solutions Inc.