vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Requesting An Code "Music In Post"
[F] Requesting An Code "Music In Post" - Posted By CåñåÐå™ (canada) on 3rd Mar 08 at 2:02pm
Being able to play music in post would be handy on my forum . I wonder if possible one of you guys (Wrighty, Marc or Ross) would be so kind to make the code please .
Re: Requesting An Code "Music In Post" - Posted By Michael (wrighty) on 3rd Mar 08 at 5:15pm
So you want to embed a song in your post?
So something like: [embed]http://x.mp3[/embed] would be the UBBC tag?
Re: Requesting An Code "Music In Post" - Posted By CåñåÐå™ (canada) on 3rd Mar 08 at 7:17pm
Yes please , Thanks Wrighty .
Re: Requesting An Code "Music In Post" - Posted By Michael (wrighty) on 4th Mar 08 at 10:32pm
Try this:
<script type="text/Javascript">
/*Embed UBBC
Created By Wrighty*/
if(location.href.match(/action\/view_topic\//i)){
for(i=0;i<get('td','tag').length; i++){
if(get('td','tag')[i].className == 'post' && get('td','tag')[i].innerHTML.match(/\[embed\](.+?)\[\/embed\]/i)){
a = (RegExp.$1.match(/>(.+?)</))? RegExp.$1: '';
get('td','tag')[i].innerHTML = get('td','tag')[i].innerHTML.replace(/\[embed\](.+?)\[\/embed\]/gi, '<embed src='+a+'>');
}
}
}else if(document.post_form && location.href.match(/\/quote\//i)){
document.post_form.message.value = document.post_form.message.value.replace(/\[embed\].+?\[\/embed\]/gi,"");
}
</script>
Global Footer:
[embed]Src[/embed]
Re: Requesting An Code "Music In Post" - Posted By CåñåÐå™ (canada) on 5th Mar 08 at 3:24am
Thank you Wrighty it work perfect
, great work my friend.
Re: Requesting An Code "Music In Post" - Posted By Michael (wrighty) on 5th Mar 08 at 7:45am