Music

DDRtists

ɹoʇɐɹǝpoɯ ɹǝdns
Reaction score
415
Code:
<embed src="" id="change" />


<script>
document.getElementById('change').src = "http://somesongurl.com/mysong.mp3";
</script>

Not tested.
 

Nigerianrulz

suga suga how'd you get so fly?
Reaction score
199
Im not exactly sure of this but this is what i found to put music on my forum but it should work with others too i think.
P.S. There are the codes of COLOR blue and stuff to show you where to change stuff so ummm you want to take that off or something if i take it off then you wont know where to put it :p
Step 1:


Open Notepad paste the following code into it.


PHP:
<center><embed src="[COLOR="Blue"]LINK TO MUSIC FILE HERE[/COLOR]" 
loop="true" autostart="true" controls="smallconsole" /></center>

Blue: Change to your music file link

Step 2:

Now that same file, go to Save as and save the file "music.html"

Step 3:

Upload the "music.html" to a file host

Step 4:

Open Notepad paste the following code into it.

PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>[COLOR="orange"]SITE NAME[/COLOR]</title>
</head>
<body>
<frameset rows= "0%,*" frameborder="no" border="0" framespacing="0">

<frame src="[COLOR="Red"]music.html[/COLOR]" name="topFrame" scrolling="no" noresize >

<frame src="[COLOR="Orange"]http://FORUM NAME.x.forumer.com/index.php?" [/COLOR]name="mainFrame">

<noframes>

<p>Click here for the <a href="[COLOR="orange"]http://FORUM NAME.x.forumer.com/index.php[/COLOR]?">non-frame based version of this site.</a></p>

</noframes>
</frameset>
</body>
</html>

Red: Replace with the URL to the "music.html" file you uploaded before.
Orange: Change "FORUM NAME" to your board's name and the "x" to the sever number.


Step 5:

Now that same file, go to Save as and save the file "boardname.html"

Step 6:

Upload the "boardname.html" to a file host

Step 7:

|-- HTML Templates -> Manage HTML -> Global HTML elements -> Board Header (logo, links, etc) Add to top


PHP:
<script language='JavaScript' type="text/javascript">
<!--
if (! document.referrer.match("[COLOR="Orange"]http://FORUM NAME.x.forumer.com[/COLOR]") ) {
window.location = [COLOR="Lime"]'boardname.html'[/COLOR];
}
//-->
</script>


Green: Replace with the URL to the "boardname.html" file you uploaded before.
Orange: Change "FORUM NAME" to your board's name and the "x" to the sever number.

Hope this helps
 

Rad

...
Reaction score
228
Its... sort of what I was looking for. Just a few things, which im sure you already knew:

I am not using a host, so I dont need to upload anything
I do not have forums
|-- HTML Templates -> Manage HTML -> Global HTML elements -> Board Header (logo, links, etc) Add to top
I do not have this option at all...

I dont know HTML/Java whatever else well enough to turn this into something though...

Code:
<embed src="" id="change" />


<script>
document.getElementById('change').src = "http://somesongurl.com/mysong.mp3";
</script>

Not tested.

I successfully crashed firefox several times in a row :)
Cant get this to work! Gah.

Heres what I came up with (DOES NOT WORK):

Code:
<html>
<head>
<title>Test</title>
<SCRIPT language="JavaScript">
function doit()
 {
	document.getElementById('change').src="Sonne.mp3";
 }
</script>
</head>
<body>
<center><embed src="" type="audio/mpeg" id="change" /></center>
<BR><BR><BR>
<a href="#" onclick="doit">Click here</a>

</body></html>
Note Sonne.mp3 was in the same folder as this file

any suggestions?
 

mase

____ ___ ____ __
Reaction score
154
Ok, well the embed is being gay for me, so I'm just going to use flash.
I'm going to do
HTML:
function(msrc){
parent.mp.document.location = 'loadsong.php?sl=' + msrc;
}
and for the msrc you can use any link to a song so I'll be using something like that to list the songs.
then the flash will load the songs.

-Edit-

Also here is my code if you want to see it. (Don't have loadsong.php done or even started lol just an idea)
Its rather messy but once I get it done it will be nice.
test.html
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<frameset rows="*,80" frameborder="no" border="0" framespacing="0">
  <frame src="html1.html" name="mainFrame" id="mainFrame" title="mainFrame" />
  <frame src="mp.html" name="mp" scrolling="No" noresize="noresize" id="mp" title="" />
</frameset>
<noframes><body>
</body>
</noframes></html>
mp.html
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<div name="mtxt" id="mtxt"></div>
<embed src="" width="25" volume="100" height="25" hspace="0" vspace="0" autostart="true" loop="false" id="music" name="music" border="0"></embed>

</body>
</html>
html1.html
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<script type="text/javascript">
function changeSong(msrc){
	alert(msrc);
	parent.mp.document.location = "loadsong.php?sl=" + msrc;
}
</script>

<body>
<a href="javascript:void()" onclick="javascript:changeSong('test.mp3');">Test</a>
</body>
</html>
 
P

Persen

Guest
Well I've been away for a while but it seems like mase got it all together:D
 

Rad

...
Reaction score
228
Mase do those 3 pages function at all (without the loadsong.php)?

I tried it a few days ago but couldnt figure it out
 

mase

____ ___ ____ __
Reaction score
154
At all what? Work?
Yes they do work. I tested it by changing the loadsong.php? to http://mase.110mb.com and the bottom frame relocated ;)
 

mase

____ ___ ____ __
Reaction score
154
Lol, I found an even better way! I realized that flash can't get URI... So I just set the embed src to the uri using php ;)
So far it changes the source of the embed, but since 110mb.com doesn't allow uploads > 2mb for now I haven't really tested it.

-Edit-

Current progress:
http://mase.110mb.com/flashtest/atest.html
 

Rad

...
Reaction score
228
Will this work if the links are in the frame, and the object is in the main window?
 

mase

____ ___ ____ __
Reaction score
154
The links are in the main window, the music player is on the bottom frame. Now I just need to list all of the songs in a directory on your host :D
 

Rad

...
Reaction score
228
Well, site isnt dedicated so it may or may not be up:

http://24.22.34.239/

But the main page has a frame, the frame lists the links... I wanted the player to be in the main window so that it would keep playing while navigating the page, but you could go back and change songs inside the frame...

And you could get to the music simply by the index:
http://24.22.34.239/Files/Music/
 

mase

____ ___ ____ __
Reaction score
154
Ok, well we got the files up and ready, but Rad and I don't know how to get the server's PHP to work... Help!?
 
P

Persen

Guest
Will do:D
Server software, first of all.
second, is PHP installed (correctly)?
 
P

Persen

Guest
You need to install PHP to use it. Think of PHP as an addon to apache:D
php.net... Download and follow the instructions. Sometimes a bit tricky to get to work, however.
 

Rad

...
Reaction score
228
lol yeah now im like totally lost i dont think its working ... why do i need MySQL?
 

mase

____ ___ ____ __
Reaction score
154
lol yeah now im like totally lost i dont think its working ... why do i need MySQL?

For a databases ><
 

Rad

...
Reaction score
228
I really dont understand though why do I need to set up a database? Unless its to organize the music or something..?

Not really sure what it is never used one before
 

mase

____ ___ ____ __
Reaction score
154
You don't need but its smart to get it. If you are going to have forums, a user system, or a comment/news system(s) then a database is recommended.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top