Embed Music into Forum
Page 1 of 1 • Share
- Vanilla990Administrator
- Forum Posts : 114
Member Since : 2011-10-30
How to embed music into your Forum
Hello, this is going to be a very simple tutorial on how to embed music into your forum without causing too much problems with page loading times.
There is one downside to this tutorial which is that everytime a user changes the page the music will restart.
Step 1: Getting the Embed code
The first thing you will need to do is go online to a website and grab an embed code for the music you want to add.
The best way I know of doing this is to go onto YouTube and find a video which has the song you want playing in the background.
There are several different variations of embed code but all of them should work. If you have any problems, post a comment below and I shall try to help you out.
For the benefit of this tutorial, I will be using the newer YouTube embed code which looks like this:
- Code:
<iframe width="480" height="360" src="http://www.youtube.com/embed/1TnONMzvZdQ" frameborder="0" allowfullscreen="no"></iframe>
Step 2: Adjusting the Embed code
Once you have your embed code you will need to adjust it slightly to make it work the way you want it.
The first thing you want to do is set the height and width of the object or iframe to 0 so that it won't show up as a big box on your forum, unless you want it to of course.
The second thing will vary depending on where you go the embed code from but if you are hiding the object/iframe you will want to set the video to play automatically. If you have a YouTube embed code you can do this by adding
- Code:
?&autoplay=1
Once you have finished editing the embed code, it should look something like this:
- Code:
<iframe width="0" height="0" src="http://www.youtube.com/embed/1TnONMzvZdQ?&autoplay=1"></iframe>
Step 3: Adding the code in the Administration Panel
There are several places you could add this code for it to work. The best place I find is to add the code to the forum description, that way it will automatically be added to every page on the forum as long as you haven't edited the templates and removed the description.
To access the forum description in the Administration panel, go to: "Admin Panel > General > Forum - Configuration" and you will find the box in there.
Paste the code into that box and everything will be done, load up your forum or refresh an existing page already open and you should notice the music start to play.
Congratulations, you have reached the end of the tutorial
Tutorial created by Vanilla990
CodingHelp.org
- YoshiGMMember
- Forum Posts : 3
Member Since : 2012-03-12
Its Ok but i don't like this kind of features because is how the user must listen the music that the admins like :/
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|