
[quote][align=center][b]Hello there friend. Im here to share you this one about background music.
The advantage of it is that you can have not just one song but u can have ur playlist!
So now, lets start.[/b][/align][/quote]
I want to share this for the sake of my friend hannah. she was asking me if i know a better code for background music that loads faster.
This one is just a matter of hiding.
[u][align=center][b]REQUIREMENTS[/b][/align][/u]
[b]1.) Knowledge about js and css.
2.) You should know the definitions are terms used with this thread. For more understanding of terms, [url=http://theftalk.com/t23618-Confusing-words-terms-Newbies..html]CLICK ME[/url]
3.) Common sense.

4.) A code for your song or your playlist.
5.)Ripway account.[/b]
[align=center]thats all. [/align]
[b]So now, lets begin.[/b]
_______________________________________________________________
[b]

You should study about the addBox tutorial made by ate ducheszv. For more infos, [url=http://theftalk.com/t16599-WVM2.2-Marfillaster%27s-Addbox-Gen.-Explained.html]CLICK ME[/url]

If you know this one already, gut the code of ur song or playlist and generate it here:: [url=http://h1.ripway.com/mumbhaki/addBoxGenerator.html]muhmbaki[/url]
:idea: I prefer to use googleAds as the placement of ur code.
then after that, u will have sumthin lyk this:
[spoiler][/b]
[quote]// css injection
var css = document.createElement("link");
css.setAttribute("rel","stylesheet");
css.setAttribute("href","[b]CSS_URL_HERE[/b]");
document.getElementsByTagName("head")[0].appendChild(css);
//onload handler
function onProfileLoad() {
//insert generated boxes here
var header="music";
var code="<center>"+
"<a href=\"http://divine-music.net\" target=\"_blank\"><img src=\"http://divine-music.net/images/dmmusicbar.gif\" border=\"0\" alt=\"Free Music\"></a><br>"+
"<a href=\"http://divine-music.net\" target=\"_blank\"><img src=\"http://divine-music.net/images/dmlogo.gif\" border=\"0\" alt=\"Free Music\"></a>"+
"<EMBED allowScriptAccess=\"never\" allownetworking=\"internal\" SRC=\"http://divine-music.net/musicfiles/Rihanna - Please Don't Stop The Music.wma\" AUTOSTART=TRUE LOOP=TRUE WIDTH=0 HEIGHT=0 ALIGN=\"CENTER\"></EMBED>"+
"<br>"+
"<a href=\"http://www.divine-music.net\" target=\"_blank\">Free Music</a>";
addBox(header,code,"custombox_371",/standalonebox[\s]*?ads/i);
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function addBox(head,code,id,siblingafter) {
/*
head:
html string title
null - no header bar
code:
html string content
id:
unique string css pointer
siblingafter:
regexp classname
'left' - mainbar column end
'right' - sidebar column end
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(!head) head="";
else head="<h2>"+head+"</h2>";
li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+
head+
"<div id=\"content_"+id+"\">"+
code+
"</div>"+
"</div>";
if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else {
var si=getElementsByClass(siblingafter,null,"DIV")[0];
si.parentNode.parentNode.insertBefore(li,si.parentNode);
}
}
function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp(searchClass);
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}[/quote]
[/spoiler]
[u][b]Then thats the end of your js file.[/b][/u]

Lets go now to ur css file.
[b]If you used googleAds as the placement of your code, kindly put this one in ur css file:
[spoiler] #content_14 {display:none!important;} [/spoiler]
But if you didnt put it there, kindly proceed to this link and find the code that fits to the place where you added your song.
[url=http://theftalk.com/t10469-Compilation-Hide-Codes-%28CSS-Codes%29.html]CLICK ME[/url][/b]
[align=center]Go now to your profile and see it. Thats the end of it.

For a live preview, go here:
[url=profiles.friendster.com/audistahguy]FRIENDSTER[/url][/align] (use FF. sum users say that the linker is not working with ie anymore.)
[b]CREDITS!!![/b]

ate ducheszv

xavierkim

portuniecho

hannAh.t0t

me

fstalk.
Gud Luck!
Last edited by japzy (2008-05-02 00:14:09)