Russian
New member
Hello,
Could anybody please give an advise on how to make BB media code on xenforo for following...
<iframe src="http://vkontakte.ru/video_ext.php?oid=575394&id=99661021&hash=213017780c4ddc86" width="607" height="360" frameborder="0"></iframe>
Somewhere in the web i found a script that helps to paste video
Please anybody help me to implement this to my xenforo forum
Could anybody please give an advise on how to make BB media code on xenforo for following...
<iframe src="http://vkontakte.ru/video_ext.php?oid=575394&id=99661021&hash=213017780c4ddc86" width="607" height="360" frameborder="0"></iframe>
Somewhere in the web i found a script that helps to paste video
Code:
<!--Frame-->
<style type="text/css">
#button-frame {background-image:url('http://img265.imageshack.us/img265/9213/frame1.gif'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
function addFrame(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[frame]",from))==-1) return str;
if((pos2=str.indexOf("[/frame]"),pos+7)==-1) return str;
newpos=str.indexOf("[frame]",pos+7)
if(newpos<pos2 && newpos!=-1) str=addFrame(str,pos+7,true)
if((pos2=str.indexOf("[/frame]",pos+7))==-1) return str;
str=str.substring(0,pos)+makeFrame(str.substring(pos+7,pos2))+str.substring(pos2+8,str.length)
if( str.indexOf("[frame]")!=-1 && internal==false) str=addFrame(str,0,false)
return str}
function makeFrame(txt){
txt='<iframe src="'+txt+'" frameborder="0" scrolling="auto" width="607" height="400" ></iframe>'
return txt}
function tag_frame()
{var FoundErrors = '';
var enterURL = prompt("Paste a link to the frame", "http://");
if (!enterURL)
{FoundErrors += " " + error_no_url;}
if (FoundErrors)
{alert("Error!" + FoundErrors);
return;}
insert("[frame]" + enterURL + "[/frame]");}
if((document.URL.indexOf("viewtopic.php")!=-1) || (document.URL.indexOf("post.php")!=-1)){
elm=document.getElementById("pun-main").getElementsByTagName("div")
for(x in elm) if(elm[x].className=="post-content"){
var post=elm[x]
post.innerHTML=addFrame(post.innerHTML,0,false)}}
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(14).innerHTML="<img src='/i/blank.gif' title='Enter frame' id='button-frame' onclick=\"tag_frame()\">"
</script>
Please anybody help me to implement this to my xenforo forum