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.
  • Animorph
    Posts: 2856
    Reputation: 189

    Message # 151 | 1:17 PM
    SummerStar, We don't help with these custom codes. Make a Thread in User COmmunication , you might get help there , but not in the official threads/boards about non-uCoz related codes
    To busy building a passive income online ;)
    aStrea
    Posts: 2
    Reputation: 0

    Message # 152 | 8:53 PM
    Hello, I read lot of posts, but I cant do it!
    I want a background player in my photo album without play buttons, just the music!
    The song I want is that http://www.youtube.com/watch?v=X_YF6md1lSs
    Can someone give me a code for this?
    Please.
    Sunny
    Posts: 9296
    Reputation: 456

    Message # 153 | 10:12 AM
    aStrea, use this code:

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


    But you will need an .mp3 file, not a YouTube video.

    I'm not active on the forum anymore. Please contact other forum staff.
    Teacher1659
    Posts: 4
    Reputation: 0

    Message # 154 | 6:14 PM
    why can't i upload an mp3 file on my ucoz?
    weloveenglish.ucoz.net
    Sunny
    Posts: 9296
    Reputation: 456

    Message # 155 | 12:20 PM
    Teacher1659, please explain the problem in more detail: how are you trying to upload it? what happens? what error message do you see?
    I'm not active on the forum anymore. Please contact other forum staff.
    Teacher1659
    Posts: 4
    Reputation: 0

    Message # 156 | 9:46 PM
    i try to upload a song to my simple mp3 player but the uploading drops at about 40% and start over and over again but it never actually finishes
    i put one song a month ago and now I cannot change it
    am I doing something wrong?
    tnx
    Sunny
    Posts: 9296
    Reputation: 456

    Message # 157 | 12:19 PM
    Teacher1659, please provide the correct website url, because the one you provided does not exist. Most probably the problem is at your end, maybe your Internet connection, or firewall. You could also try another browser.

    And please read the forum rules and do not ask one and the same question in several threads.

    I'm not active on the forum anymore. Please contact other forum staff.
    Teacher1659
    Posts: 4
    Reputation: 0

    Message # 158 | 6:40 PM
    well the url actually EXISTS,and if you were bored by answering my question,you shouldn't have done it anyway.
    you can simply delete my thread if it's not regular,i've been waiting fo3 days somebody to answer my question,which you as administrator should have done it more quickly
    no time for reading,though
    tnx anyway
    Sunny
    Posts: 9296
    Reputation: 456

    Message # 159 | 12:01 PM
    Quote (Teacher1659)
    weloveenglish.ucoz.net


    This one does not exist. Is it http://weloveenglish.ucoz.com/ ? Sorry, but I cannot check all domain zones (com, net, org, ru, de etc.) to find your website and be sure that it is really the website you meant (e.g. there is also _http://weloveenglish.ucoz.ru/). Therefore please be attentive when providing a link. And unfortunately I cannot be online 24/7 as an administrator.

    As for the problem, I still think that the problem is at your end and suggest that you try the following: for testing purposes try to work from another copy of operating system, another computer and, if possible, using another network provider. E.g., you can check your website from one of Internet clubs as they meet all the mentioned conditions.
    If you do not have such possibility, then it is desirable to do the following actions step by step:
    1. Disable your firewall, antivirus while running diagnostics;
    2. Disable the traffic saving services (e.g., Traffic Compressor);
    3. Disable the torrent client or any other services that can create a lot of connections, if any;
    4. Try to use another browser or update the current one. Maybe some necessary browser functions are disabled or are working incorrectly. If your Internet Explorer version is less than 8 – install latest Windows updates, or install Internet Explorer 8 as a separate package; if you use Opera version less than 10.60 or Firefox less than 3.6.3 – update the browser.
    5. Make sure that cookies are accepted by the browser, clear the cookies history; check whether JavaScript is enabled in your browser; clear the cache (temporary files) of the browser. You can find the information on how to do this in the "Help" tab of your browser.

    And btw, what's the size of the song?

    I'm not active on the forum anymore. Please contact other forum staff.
    Teacher1659
    Posts: 4
    Reputation: 0

    Message # 160 | 11:36 PM
    Oh,sorry I meant weloveenglish.ucoz.com
    I tried with Mozilla instead chrome,and it turned out to be better for uploading.I managed to upload a different song and it was successful.
    I hope it will be ok from now on

    I'm new in this thing so I'm spending a lot of time finding out how do these things actually work

    Thanks a lot for your time and help angel
    It seems to me a lot complicated ,though
    Thanks again and for your patience also kiss
    Admistrator
    Posts: 105
    Reputation: -3

    Message # 161 | 4:23 PM
    Can my website users put a song player on their profiles?
    Sunny
    Posts: 9296
    Reputation: 456

    Message # 162 | 2:55 PM
    Admistrator, you need to do the following:
    1. Enable any field not in use in the Users module settings (you can rename it in "Substitution of default phrases").
    2. When editing a profile, the user will have to provide an mp3 file link.
    3. Add the following script to the "User personal page" template:
    Code
    <script src="http://link_to_the_site/media/?auto=0;small=0;color=0055e9;textoff=0;t=audio;f=link_to_the_file.mp3" type="text/javascript"></script>

    I'm not active on the forum anymore. Please contact other forum staff.
    Admistrator
    Posts: 105
    Reputation: -3

    Message # 163 | 3:16 PM
    Sunny

    Quote
    Admistrator, you need to do the following:
    1. Enable any field not in use in the Users module settings (you can rename it in "Substitution of default phrases").
    2. When editing a profile, the user will have to provide an mp3 file link.
    3. Add the following script to the "User personal page" template:


    i don't understand can you please make a tutorial?
    bodbreed
    Posts: 313
    Reputation: 1

    Message # 164 | 2:19 AM
    Is it possible for file catalog to AUTOMATICALLY generate a music player, when someone uploads an audio? Also is there a code for file archive?
    Paradox
    Old Guard
    Posts: 3284
    Reputation: 145

    Message # 165 | 2:26 AM
    XO-Ferg, this can be custom coded with a little JavaScript - thus meaning the editing of custom templates which we don't generally provide support with here, I would advise you read up on HTML & Javascript. As to your second question I don't understand what you are meaning by file archive entirely, could you please eloborate on it. wink
    Jack of all trades in development, design, strategy.
    Working as a Support Engineer.
    Been here for 13 years and counting.
    Search: