• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[Add More Video Sites] BB Code Media

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

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
 
An iframe is a weird way to embed. Do you have a URL to a video on that site? I can take a look to see if it's possible to create a BB Code Media Site out of it.
 
Hello, I have a video site that I need to add

I did this:

Code:
videolog
VideoLog
http://www.videologo.com.br
http://www.videolog.com.br/video.php?id={$id}

But the embed code part got me lost:
Code:
<object id='playerFlash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='500' height='375'><param name='movie' value='http://www.videolog.tv/ajax/codigoPlayer.php?id_video=621022&relacionados=S&default=S&lang=PT_BR&cor_fundo=FFFFFF&cor_titulo=777777&hd=S&swf=1&width=500&height=375' /><param name='flashvars' value='id_video=621022' /><param name='allowScriptAccess' value='always' /><param name='allowFullScreen' value='true' /><param name='wmode' value='opaque' /><embed src="http://www.videolog.tv/ajax/codigoPlayer.php?id_video=621022&relacionados=S&default=S&lang=PT_BR&cor_fundo=FFFFFF&cor_titulo=777777&hd=S&swf=1&width=500&height=375" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="375"></embed></object>
<p><a href="http://www.videolog.tv/video.php?id=621022">Na Estrada - Paraty</a> por <a href="http://www.videolog.tv/plustv"> plustv </a> no <a href="http://www.videolog.tv">Videolog.tv</a>.</p>
 
Jake, thanks for a try...
unfortunately i'm not a coder... does that code provided not help? It works fine on one of the forums (not sure what software been used there) but it works onthat site... i asked question there but novody answered... presume because it's an old topic
anyway if it works somewhere, i would think it may work on xenforo, and i think that idea of how it can work shown on that script... =(
 
Do you have instructions for the BB code on the other forum you mentioned?

I couldn't make vkontakte.ru work with xenForo because there are too many URL parameters.
 
there is no any instructions... somebody just posted the code i pasted above...
frown.png
 
I tested the iframe code you posted above. That still doesn't work in xenForo. Too many parameters in the URL.
 
I created a quick INSERT script for all the video tags above that are supposed to be working. Connect to your MySQL database, and run it to add them all in 1 go. Note this is nothing original, just a quick way to import the already listed sites.

Code:
INSERT INTO xf_bb_code_media_site
(media_site_id, site_title, site_url, match_urls, embed_html, supported)
VALUES
('google_video', 'Google video', 'http://video.google.com', 'http://video.google.com/videoplay?docid={$id}', '<embed id=VideoPlayback src=http://video.google.com/googleplayer.swf?docid={$id}&hl=en&fs=true style=width:640px;height:360px allowFullScreen=true allowScriptAccess=always type=application/x-shockwave-flash></embed>', 1)
, ('liveleak', 'LiveLeak', 'http://www.liveleak.com', 'http://www.liveleak.com/view?i={$id}', '<object width="450" height="370">
<param name="movie" value="http://www.liveleak.com/e/{$id}"></param>
<param name="wmode" value="transparent"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.liveleak.com/e/{$id}" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" width="450" height="370"></embed>
</object>', 1)
, ('trackitdown', 'Track It Down', 'http://trackitdown.net', 'http://www.trackitdown.net/track/sticker_xml/{$id}', '<div style="background:url(http://www.trackitdown.net/stickers/1/sticker_track_bg.png) top left no-repeat; width:300px; height:118px; text-align:left">
<div style="float:right; margin-top:10px; margin-right:10px;">
<object width="170" height="64">
<param name="movie" value="http://www.trackitdown.net/stickers/1/sticker_track.swf?persistent=false&defaultPlaylist=http://www.trackitdown.net/track/sticker_xml/{$id}">
</param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.trackitdown.net/stickers/1/sticker_track.swf?persistent=false&defaultPlaylist=http://www.trackitdown.net/track/sticker_xml/{$id}" type="application/x-shockwave-flash" wmode="transparent" width="170" height="64"></embed>', 1)
, ('dailymotion', 'Dailymotion', 'http://www.dailymotion.com', 'http://www.dailymotion.com/video/{$id}_', '<object width="480" height="382"><param name="movie" value="http://www.dailymotion.com/swf/video/{$id}?additionalInfos=0"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/{$id}?additionalInfos=0" width="480" height="382" allowfullscreen="true" allowscriptaccess="always"></embed>
</object>', 1)
, ('break', 'Break', 'http://www.break.com', 'http://embed.break.com/{$id}', '<object width="464" height="376" id="1946677" type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" alt="">
<param name="movie" value="http://embed.break.com/{$id}=="></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="http://embed.break.com/{$id}==" type="application/x-shockwave-flash" allowScriptAccess=always width="464" height="376"></embed>
</object>', 1)
, ('twitvid', 'TwitVid', 'http://www.twitvid.com', 'http://www.twitvid.com/{$id}', '<object width="425" height="344"><param name="movie" value="http://www.twitvid.com/player/{$id}"></param><param name="allowscriptaccess" value="always"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.twitvid.com/player/{$id}" quality="high" allowscriptaccess="always" allowNetworking="all" allowfullscreen="true" wmode="transparent" height="344" width="425"></embed></object>', 1)
, ('megavideo', 'MegaVideo', 'http://www.megavideo.com', 'http://www.megavideo.com/?v={$id}', '<object width="640" height="467"><param name="movie" value="http://www.megavideo.com/v/{$id}1f1255f8cae082f8ab52922c45b6d63e1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.megavideo.com/v/{$id}1f1255f8cae082f8ab52922c45b6d63e1" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="467"></embed></object>', 1)
 
Ok that's cool...thanks for that. How do you actually embed media from Facebook? I've tried all sorts of URL's but I can't embed a pic however hard I try...
 
GameTrailers
This will match a GameTrailers link and embed the SD version of the video. If a user clicks the HD version they will be redirected to the GameTrailers site (which seems fair enough to me).
  • Media Site ID: gametrailers
  • Site Title: GameTrailers
  • Site URL: http://www.gametrailers.com/
  • Match URLs:
    Code:
    gametrailers.com/video/*/{$id}
  • Embed HTML:
    Code:
    <embed src="http://www.gametrailers.com/remote_wrap.php?mid={$id}" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="409></embed>
  • Example URL: http://www.gametrailers.com/video/review-dragon-age/711452
  • Result:
    Code:
    [media=gametrailers]711452[/media]
 
Top Bottom