Post by Peter on Oct 29, 2004 15:00:16 GMT
Code created by Awesome AnDrEw [/color]
Description: This handful of code will alter the profile pages so that users can select their own theme music which will be played when people view their profiles. Administrators have control over what music is used, and it's simple to add more. This script goes in the footers.
Description: This handful of code will alter the profile pages so that users can select their own theme music which will be played when people view their profiles. Administrators have control over what music is used, and it's simple to add more. This script goes in the footers.
<script language="vbscript">
'Brought to you by
'Awesome AnDrEw & Web Wonders
'http://w2.proboards16.com/
Dim Looper, MusName, MusURL, Looper2, Counter, Musik
MusName = Array("Music1","Music2","Music3")
MusURL = Array("http://yoursite.com/1.mid","http://yoursite.com/2.mid","http://yoursite.com/3.mid")
If instr(location.href, "action=profile&username=") Then
document.body.innerHTML = replace(document.body.innerHTML, "Locat" & "ion: ", "Theme Music: ")
For Looper = 0 to (document.getElementsByTagName("FONT").length - 1)
If instr(document.getElementsByTagName("FONT")(Looper).innerHTML, "name=location") Then
document.getElementsByTagName("FONT")(Looper).innerHTML = "<select name='location'></select>"
For Looper2 = 0 to Ubound(MusName)
document.creator.location.add(document.createElement("OPTION"))
document.creator.location(Looper2).innerText = MusName(Looper2)
document.creator.location(Looper2).value = MusURL(Looper2)
Next
End If
Next
Elseif instr(location.href, "action=viewprofile&username=") Then
For Looper = 0 to (document.getElementsByTagName("FONT").length - 1)
If Looper > 0 Then
Counter = (Looper - 1)
End If
If instr(document.getElementsByTagName("FONT")(Counter).innerText, "Location:") Then
Musik = document.getElementsByTagName("FONT")(Looper).innerText
document.write("<embed src='" & Musik & "' autostart='true' repeat='true' loop='true' hidden='true'>")
End If
Next
document.body.innerHTML = replace(document.body.innerHTML, "Locat" & "ion: ", "Theme Music: ")
End If
</script>