|
Post by bobbotheclown on Sept 29, 2010 13:32:23 GMT -5
music in post? the old code for putting it on profiles?
i wanna post a leroy jenkins mp3 in a thread here.
|
|
|
Post by Sesu Reinoruzu on Sept 30, 2010 9:10:49 GMT -5
Like the one we have now?
|
|
|
Post by bobbotheclown on Sept 30, 2010 9:21:49 GMT -5
well, do you know what it is?
|
|
|
Post by Sesu Reinoruzu on Sept 30, 2010 20:14:52 GMT -5
Ok, here it is.
<script type="text/javascript"><!-- /* Music in Profile Concept by FireIndy Recreated by Triad for v4.5 http://support.proboards.com */
var hide = true; // Set true to hide the media. var loop = false; // Set true to loop the media forever.
if(location.href.match(/on=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/)){ var td = document.getElementsByTagName("td"); for(x=td.length-1; x>1; x--){ if((td[x-1].innerHTML.match(/>signature</i) || td[x].vAlign == "bottom") && td[x].innerHTML.match(/(\[music:(.+?)\])/i)){ var d = RegExp.$2; td[x].innerHTML = td[x].innerHTML.replace(RegExp.$1, ""); if(location.href.match(/on=viewprofile/i)){ var e = "<div style='text-align: center;'><embed src='"+d.replace(/\s/gi, '')+"' "; if(hide) e += "hidden='true' "; e += "autostart='true' loop='"+loop+"' /></div>"; document.write(e); break; } } } }
if(document.modifyForm){ var tb = document.getElementsByTagName("table"); for(a=4; a<tb.length; a++){ if(tb[a].width == "650" && tb[a].innerHTML.match(/location:/i)){ var _input = document.createElement("input"); _input.type = "text"; _input.size = "35"; _input.id = "music"; if(document.modifyForm.signature.value.match(/(\[music:(.+?)\])/i)){ _input.value = RegExp.$2; document.modifyForm.signature.value = document.modifyForm.signature.value.replace(RegExp.$1, ""); } var font_1 = document.createElement("font"); font_1.size = "2"; font_1.appendChild(document.createTextNode("Profile Music:")); var font_2 = document.createElement("font"); font_2.size= "1" font_2.appendChild(document.createTextNode("If you wish to have music played on your main profile page, enter the URL here.")); var _row = tb[a].insertRow(tb[a].rows.length); var _cell = _row.insertCell(0); _cell.width = "160"; _cell.appendChild(font_1); _cell = _row.insertCell(1); _cell.width = "245"; _cell.appendChild(_input); _cell = _row.insertCell(2); _cell.width = "245"; _cell.appendChild(font_2);
function addMusic(){ var p = document.modifyForm.signature; if(document.getElementById("music").value.length > 0){ p.maxLength = p.value.length + document.getElementById("music").value.length + 8; p.value += "[music:" + document.getElementById('music').value + "]"; } else if(p.value.match(/(\[music:.+?\])/i)){ p.value = p.value.replace(RegExp.$1, ""); } }
if(document.addEventListener) document.modifyForm.addEventListener("submit", addMusic, false); else if(document.attachEvent) document.modifyForm.attachEvent("onsubmit", addMusic); else document.modifyForm.onsubmit = addMusic;
break; } } } //--></script>
|
|