uCoz Community » uCoz Modules » Additional Features » Music on the Site (How to add music .mp3, playlist so on...)
Music on the Site
Sunny
Posts: 9296
Reputation: 456

Message # 1 | 12:28 PM
You can insert mp3 player into any page or message. It may serve to let visitors listen to various compositions. It may be a background for you site (do not abuse this capability, don’t forget that mp3 files weight quite a lot, and not all users have broadband Internet access. They won’t be able to load your site in case of automatic playback)

It is used in the following way:
By means of the BB-code:

Code
[audio] [/audio]

Having entered the following
Code
[audio]http://forum.ucoz.com/i_love_ucoz.mp3[/audio]

we'll get

You can also insert a player with the help of JS-code.
To get it use Multimedia - > Insert audio (mp3)
or Multimedia - > Upload audio (mp3) [after uploading press JS-code near necessary file]
As a result, for the mp3 file at http://forum.ucoz.com/i_love_ucoz.mp3
we'll get the following code

Code
<script src="http://forum.ucoz.com/media/?auto=0;small=0;color=0055e9;textoff=0;t=audio;f=http%3A%2F%2Fforum.ucoz.com%2Fi_love_ucoz.mp3" type="text/javascript"></script>

You can also insert it into any place of your site. Besides, it has controlled parameters (settings), which we’ll describe below.

Quote
auto=0;small=0;color=0055e9;loop=0;textoff=0

Values in bold type may be changed from 0 to 1. In this way, you’ll enable them. By means of "color" specify code color.
So, if we change in the code
auto=0 for auto=1 - a song will be played automatically (be careful with this feature, think of those who have slow Internet and paid traffic).

small=1 – will display a small player of two buttons. Here it is:

loop=1 – a file will be played back non-stop (till you press stop)

textoff=1 – will remove text (e.g. "i_love_ucoz.mp3" in the example above)

color=0055e9 (player color management) –instead of 0055e9 write the code of a desired color. Codes can be found out from tables or in Photoshop by clicking on a color.
Example. Let’s take the code of the black color - 000000

Code
<script src="http://forum.ucoz.com/media/?auto=0;small=0;color=000000;textoff=0;t=audio;f=http%3A%2F%2Fforum.ucoz.com%2Fi_love_ucoz.mp3" type="text/javascript"></script>

we'll get:



Music as a background

Code
<bgsound src="URL" loop=5 volume=0 balance=0>

where
URL – file name
loop – number of repeats, if loop="infinite" - unlimited
format - .wav .mid

EMBED tag

It is used to insert into pages multimedia content and other files.

Code
<EMBED attributes> </EMBED>

  • height sets vertical size of embedded object

  • width sets horizontal size of embedded object

  • autostart sets possibility to start while loading, takes on the values "true" or "false"

  • loop sets number of repeats, takes on the values "true" or "false"

  • hidden allows to hide active module, takes on the values "true" or "false"

  • src specifies URL of a multimedia file

  • pluginspage specifies URL of the plug-in for playing back a multimedia file

  • bgcolor sets background of the object

  • type specifies multimedia file type

  • quality specifies multimedia file quality

  • alt sets alternative content

    Code
    <EMBED src="file.swf" menu="true" quality="high" bgcolor="#000066" width="760" height="410" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave"></EMBED>

    As you can see from the example you can insert Flash files, as well as video and audio.

    You can write a code with minimal number of attributes

    Code
    <embed src="video.avi" width="760" height="410">

    Music in a pop-up (new) window

    There is nothing difficult, use JavaScript

    On the page where you want to place the button "Play music" insert the following code between the < head> tags

    Code
    <script>
    function openWindow()
    {
    muzWindow = open("http://www.ucoz.com/music.html", "newWindow", "width=300,height=300, status=no, toolbar=no, menubar=no");
    }
    </script>

  • width=300 height=300 – width, height
  • http://www.ucoz.com/music.html – link to the page with your music

    Then put in any place of the page either the link

    Code

    <a href="#" onClick="openWindow()">Press to play music</a>

    or the button

    Code
    <button onClick="openWindow()">Press to play music</button>

    I'm not active on the forum anymore. Please contact other forum staff.
  • Sunny
    Posts: 9296
    Reputation: 456

    Message # 121 | 3:10 PM
    Killer047, if you had read the whole thread you would know. You need to add music in a pop-up window.
    I'm not active on the forum anymore. Please contact other forum staff.
    [MOB]Trip
    Posts: 10
    Reputation: 0

    Message # 122 | 3:22 AM
    i've read most of the thread...cba 2 read it all

    but... what i want is to embed audio on the forum as a post....

    somen like this

    Code
    <embed src="http://www.youtube.com/v/gNpUlJvcc5U&hl=en_US&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="1" height="1"></embed>

    now if i had removed the code tags...u would not see the embeded code..instead u would just hear the song...

    how2can?

    if u would pm me on my site about it...i've fried most my braincells and my not remember to check back
    http://anybodykillas.ucoz.com
    thx

    Post edited by [MOB]Trip - Saturday, 2010-02-27, 3:27 AM
    Dartz
    Posts: 1931

    Message # 123 | 9:10 AM
    I don't understand where is the problem? Administrators can use HTML,
    therefore you can make music be invisible and playing. What's wrong?

    [... With uCoz since December 2 2007 ...]
    [MOB]Trip
    Posts: 10
    Reputation: 0

    Message # 124 | 1:41 AM
    when u insert the embeded code...it simply shows the code and does nothing...

    and keep n mind this is as a forum post/reply.

    maybe i missed a setting in the user account permissions?

    also

    off topic..

    i have a user who tried to embed some xfire vids... and they failed...it simply displays blankness when i attempt the video tags.

    Post edited by [MOB]Trip - Sunday, 2010-02-28, 1:45 AM
    Dartz
    Posts: 1931

    Message # 125 | 10:30 AM
    It works just fine for me. Check if your browser supports this.

    Code
    <embed src="http://www.youtube.com/v/gNpUlJvcc5U&hl=en_US&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="1" height="1"></embed>

    And Xfire videos aren't meant for video tags. Use embed code for them.
    Make sure the group your user belongs to allows HTML tags inside posts.


    [... With uCoz since December 2 2007 ...]
    [MOB]Trip
    Posts: 10
    Reputation: 0

    Message # 126 | 10:27 PM
    yuh xfire vids work...and embeded audio...works on other pc...so i gotta c wut dis n00b browser i got on here missin -_- thx
    b ez
    Valmont
    Posts: 17
    Reputation: 0

    Message # 127 | 3:44 PM
    1 question! With your trak (i_love_ucoz) is all ok! but how can i do if i want to change track with my music?

    something like upload imagine in imageshack?

    Post edited by Valmont - Wednesday, 2010-03-17, 3:57 PM
    Sunny
    Posts: 9296
    Reputation: 456

    Message # 128 | 1:07 PM
    Valmont, you can upload your music file to File Manager or any file hosting service. Then just change the link http://forum.ucoz.com/i_love_ucoz.mp3 into your own link.
    I'm not active on the forum anymore. Please contact other forum staff.
    Valmont
    Posts: 17
    Reputation: 0

    Message # 129 | 2:43 PM
    Sunny, it work now! Thank you!

    Is possible to let the music play also in Forum?

    Sunny
    Posts: 9296
    Reputation: 456

    Message # 130 | 2:56 PM
    Valmont, yes, add the music code to forum template.
    I'm not active on the forum anymore. Please contact other forum staff.
    Valmont
    Posts: 17
    Reputation: 0

    Message # 131 | 3:11 PM
    Sunny, how can i have access to templates of forum! damn, i didnt get it...in page editor i see only some pages, not all!

    and i have to us JS or BB?

    Added (2010-03-18, 9:11 Am)
    ---------------------------------------------
    ahhh!!! Done all! ty for your help!!

    Sunny you are really a very good moderator/admin!!!

    Post edited by Valmont - Thursday, 2010-03-18, 3:09 PM
    jarrett
    Posts: 3
    Reputation: 0

    Message # 132 | 9:53 PM
    i can't find the place where you add the code
    Tommy
    Posts: 454
    Reputation: 38

    Message # 133 | 2:43 AM
    Quote (Sunny)
    You can insert mp3 player into any page or message.

    "I don't like to commit myself about heaven and hell - you see, I have friends in both places"
    Valmont
    Posts: 17
    Reputation: 0

    Message # 134 | 8:05 AM
    I'm sorry but i have 1 problem: i've done about the music and it work fine but when i open any pages into my site the music restart and continue to play... this make a little disturb in my opinion... so how can i put the music ONLY in the main page of my site?
    Sunny
    Posts: 9296
    Reputation: 456

    Message # 135 | 9:51 AM
    Quote (Valmont)
    so how can i put the music ONLY in the main page of my site?

    Add the music code to the page content. Or, if you add it to the template - use conditional operators - http://forum.ucoz.com/forum/37-471-1


    I'm not active on the forum anymore. Please contact other forum staff.
    uCoz Community » uCoz Modules » Additional Features » Music on the Site (How to add music .mp3, playlist so on...)
    Search: