MyBB Community Forums

Full Version: Background Music to my Forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do i put an Background Music into my Forum? i want this for this Halloween day..

Thanks!
Use this into your index template: <bgsound src="yourmusicfile.mid" loop="infinite"> above the <body> tag.

Just rename yourmusicfile.mid into the musicfile you have or want to use.
(2016-10-31, 03:33 PM)johnnyvang Wrote: [ -> ]Use this into your index template: <bgsound src="yourmusicfile.mid" loop="infinite"> above the <body> tag.

Just rename yourmusicfile.mid into the musicfile you have or want to use.

if youtube music how do i do this?

Thanks is advance, im so noob..
Youtube is only a movie or musicclip.
If you can download that music and save as mp3
Upload it to your server and add it into the code.
Else you can search for wav, mid or mp3 halloween files.

2 other codes you can use are ( if the first one dosnt work ):

	<embed src="bestandsnaam.mp3" width="145" height="58" />

<embed src="bestandsnaam.mp3" width="145" height="58" autostart="false" loop="true" / >

Replace
width="145" height="58"

With
width="0" height="0"


To hide the small player from your forum.
First code start on auto, second only when a member click on play.

So don't use width="0" height="0" in the second code Smile
Oh, if you put this in the header_include template, all pages (and not just index) will have your background music. Please note that it will start from the beginning with each page change / page refresh.
Yes.
Thats why i say put it on the index.
Then you only hear it there and not when you look at the topics.
If add in header_include the music start over and over each time you open a new topic/forum or sub forum.
(2016-10-31, 08:34 PM)johnnyvang Wrote: [ -> ]Yes.
Thats why i say put it on the index.
Then you only hear it there and not when you look at the topics.
If add in header_include the music start over and over each time you open a new topic/forum or sub forum.

I wanted to make sure Black Box knew the pros / cons of putting it in the index template versus the header_include.
Just a side note to Johnnys post, it's not technically "User-Friendly" to have audio playing in background, especially if they are browsing a site.

<iframe width="0" height="0" src="http://www.youtube.com/embed/[INSERT YOUTUBE ID HERE]?rel=0&autoplay=1"
frameborder="0" allowfullscreen></iframe>
You can include that in INDEX if you would like. Else if you are looking for the webpage to dynamically keep playing from X seconds/X Minutes. You may need to either build the site in Flash(Which is really outdated now), use Ajax and dynamically load parts of the site(Way out of my scope), or lastly the easier way... Make it a popup.