Post by Mistah Showtime on Apr 17, 2009 3:46:48 GMT -5
GLOBAL HEADER
<script type='text/javascript'>
<!--
/* Any Video in Post (header portion)- Eton Bones*/
/* last updated: 7/27/2008 (rev 9) */
var caller=[];
var vidType={
_Globals:{
defaultType:'Embed',
params:{allowfullscreen:true, allowscriptaccess:'always', pluginspage:'http://www.macromedia.com/go/getflashplayer', type:'application/x-shockwave-flash', classid:'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', quality:'autohigh', codebase:'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab', wmode:'transparent'},
maxVidsPerPost:100,
maxVidsPerPage:300,
defaultWidth:'720px',
defaultHeight:'480px',
canPost:'-Guest',
//canView:'-Guest',
autoLink:'YouTube'
},
Embed:{
prefix:'%video%',
checkid:function(vid){ if(/<(object|embed)\b/im.test(deEntify(vid)) /*&& /\.swf\b/i.test(vid)*/)return true; else return false;},
postprocess: function(ret){
var w=vidType['Embed'].maxwidth; var h=vidType['Embed'].maxheight
ret=deEntify(caller[caller.length-1].arguments[2])
if(!/width=\d+/i.test(caller[caller.length-1].arguments[0].split(/\]/)[0]))w=0
if(!/height=\d+/i.test(caller[caller.length-1].arguments[0].split(/\]/)[0]))h=0
ret=ret.replace(/(width|height)=['"]?(\d+)/gi,function(m,p1,p2){
if(/width/i.test(p1)&&w>0){
m=m.replace(/width=('|")\d+/i,'width=$1'+w)
}else if(/height/i.test(p1)&&h>0){
m=m.replace(/height=('|")\d+/i,'height=$1'+h)
}
return m;
})
//disable all SWF browser navigation and browser interaction APIs to avoid possible popups
if(/\ballownetworking\b/i.test(ret))
ret=ret.replace(/(value|allownetworking)=('|")all['"]/gim, "$1=$2internal$2");
else
ret=ret.replace(/<embed\s/gi,'<embed allownetworking="internal" ').replace( /<param\s/i,'<param name="allownetworking" value="internal"/><param ');
return String('<div name="swfPlayer">'+ret)
},
preprocess:function(vType,vURI){
//attempt to fix Proboards' hard wraps
vURI=pb_unwrap(vURI)
//allow only specific HTML tags
vURI = vURI.replace(/&(nbsp);?/gi,' ').replace(/&(quot);?/gi,'"').replace(/(<|&l{1}t;?)\s*(\/?\w+)/gi,function(m,p1,p2,i,s){
p1='';
if(p2.substr(0,1)=='/'){p1='/';p2 = p2.substr(1)}
p2=p2.toLowerCase()
if(p2== 'embed'){
var t = s.substr(i).split(/>/)[0];
if(t.match(/type\s*=\s*['"]?([^'"\s]+)/))
{if(!/shockwave-flash/i.test(RegExp.$1))return ''+'60;' + p1 + p2}
}else if( p2.match(/^(param|object)$/)){
return '<font></font'
}else if( p2.match(/^(table|tr|td|thead|tbody|tfoot|th|center)$/)){
}else if( p2.match(/^(font|a|span|div|img|br|b|i|u|s|hr)$/)){
}else{
return ''+'60;' + p1 + p2
}
return m
});
//disable possible script handlers
vURI=vURI.replace(/\bon(\w+)=/gi,'no$1=').replace(/javascript\:/gi,'pbscript:')
caller[caller.length-1].arguments[2]= vURI
},
description:'Embed Code'
},
AnySWF:{
prefix:'%video%',
description:'Generic SWF Player',
maxwidth:'425px',
maxheight:'350px',
params:{flashvars:_getFlashVars},
checkid:function(vid){return /\.swf(\?|\s*$)/i.test(vid)}
},
AnyFLV:{
prefix:'http://www.jeroenwijering.com/embed/mediaplayer.swf?file=%video%',
description:'Generic FLV Player',
maxwidth:'720px',
maxheight:'350px',
custom:{skinall:'&displayheight=%height%&displaywidth=%width%',skin1:'&lightcolor=0x000000&backcolor=0x334455&frontcolor=0x666666&screencolor=0xFFFFFF'},
params:{flashvars:_getFlashVars},
preprocess:function(vType,vURI){this['flashvars']=((this['flashvars'])?this['flashvars']:'');this.flashvars=this.flashvars.replace(/%height%/gi,parseInt(this.maxheight)).replace(/%width%/gi,parseInt(this.maxheight));if(vURI.match(/\.(flv|mp4|m4v|m4a|3gp|mov|f4v|f4p|f4a|f4b)(\?|\s*$)/i))this.flashvars+='&type='+RegExp.$1;},
checkid:function(vid){return /\.(flv|mp4|m4v|m4a|3gp|mov|f4v|f4p|f4a|f4b|xml|asx)(\?|\s*$)/i.test(vid)}
},
WMP:{
prefix:'%video%',
description:'Windows Media Player',
example:'http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=18',
params:{CLASSID:'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6', invokeurls:0, autostart:0,playcount:1, name:'mediaplayer1',CODEBASE:'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',pluginspage:'http://www.microsoft.com/Windows/MediaPlayer/',type:'application/x-mplayer2'}
},
Quicktime:{
prefix:'%video%',
example:'http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=17',
params:{CLASSID:'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', autoplay:0 , name:'quicktimeplayer1', CODEBASE:'http://www.apple.com/qtactivex/qtplugin.cab',pluginspage:'http://www.apple.com/quicktime/download',type:'video/quicktime'}
},
Real:{
description:'Real Player',
prefix:'%video%',
example:'http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=15',
preprocess:function(vType,vURI){if(!vURI.match(/\?embed$/i))caller[caller.length-1].arguments[2]+='?embed'},
postprocess:function(ret){
//real player requires separate controls for vid and control panel
ret+='<br><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" '+ret.match(/width=[^\s]+/)[0]+' '+ ' height="36" >'
ret+='<param name="controls" value="ControlPanel">';
ret+='<param name="console" value="vidplayer">';
ret+=ret.match(/\<embed[\w\W]+?<\/embed>/im)[0].replace(/controls="ImageWindow"/,'controls="ControlPanel"').replace(/height=".+?"/,'height="36"')
ret + '></object>'
return ret
},
params:{CLASSID:'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', autogotourl :0 , autostart :0, controls:'ImageWindow', console:'vidplayer', pluginspage:'http://www.real.com/', /*type:'audio/x-pn-realaudio-plugin'*/type:'application/vnd.rn-realplayer'}
},
VLC:{
prefix:'%video%',
description:'VideoLAN (VLC)',
params:{CLASSID:'clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8',CODEBASE:'http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab',pluginspage:'http://www.videolan.org',type:'application/x-vlc-plugin'}
}
}
function aV(video){
video=(video)?video:vidType._Globals.defaultType
add("[video=", "[/video]", video);
}
function _getFlashVars(){
var vType=caller[caller.length-1].arguments[1];
var a=prefix.split(/\?/);
prefix=a[0]; if(a.length==1)a.push('')
if(vidType[vType]['flashvars']){ a[1]+=((a[1].length)?'&':'')+vidType[vType]['flashvars']; }
return a[1]
}
function deEntify(sStr){
return sStr.replace(/&am{1}p;/gi,"&").replace(/&l{1}t;/gi,"<").replace(/&g{1}t;/gi,">")
}
function pb_unwrap(sStr){return sStr.replace(/([^\s\n\r]{111,})(\s|%20)/gm,'$1')}
function trim(sStr){
return sStr.replace(/(^\s+|\s+$)/g,'')
}
function isAllowed(users,user){
if(!vidType._Globals[users])return true
var u=vidType._Globals[users]
u=u.split(/,/).sort().reverse().join('|')
var v=u.indexOf('-')
if(v>-1){
if(RegExp('^('+u.substr(v).replace('-','')+')$').test(user))return false;
u=u.substr(0,v).replace(/|$/,'')
}
if(u.length){
if(RegExp('^('+u+')$',"i").test(user))return true;
return false;
}else{ return true;}
}
function disableVideo(vid,link,title){
title=(title)?title:''
var ret='<a href="javascript:void(0)" onClick="enableVideo(this)" title="'+title+'">'
ret+=link+'</a><xm'+'p style="display:none;">'+ vid +'</xm'+'p>'
return ret
}
function enableVideo(thiss){
var v=document.createElement('div');
v.innerHTML=deEntify(thiss.nextSibling.innerHTML);
thiss.parentNode.replaceChild(v.firstChild,thiss.nextSibling);
thiss.style.display="none"
}
function makeEmbed(m,vType,vURI){
var params=''; var attribs=null;
if(mTD.getElementsByTagName('a').length<((window['pb_VersionNo'])?2:1) && !isAllowed('canPost','Guest')) return '<DIV>Guests are not allowed to post videos</DIV>'
if(mTD.getElementsByTagName('a').length>((window['pb_VersionNo'])?2:1) && mTD.getElementsByTagName('a')[((window['pb_VersionNo'])?2:1)].href.match(/user=(\w+)/) && !isAllowed('canPost',RegExp.$1))
return '<DIV>'+mTD.getElementsByTagName('a')[((window['pb_VersionNo'])?2:1)].innerHTML + ' is not allowed to post videos</DIV>'
if(vidType._Globals['boards'] && !vidType._Globals['boards'].match(/\bmain\b/i))vidType._Globals['boards']+=",main";
if(!isAllowed('boards',((document.getElementsByName('board').length)?document.getElementsByName('board')[0].value:'main'))) return m;
if(!vType)vType=vidType._Globals.defaultType;
if(!/^Embed\b/.test(vType) && vURI.match(/href=['"]?([^\s'">]+)/i))vURI=RegExp.$1;
//if(/\<\s*(embed|object)/i.test(m))return m
if(/,/.test(vType)){attribs=trim(deEntify(vType.substr(vType.indexOf(',')+1)));vType=trim(vType.split(/,/)[0]);}
if(!vidType[vType]) return m;
if('checkid' in vidType[vType]) if(!vidType[vType].checkid(vURI)) return m;
caller.push(arguments.callee) //opera+safari don't support arguments.callee.caller
if(!vidType[vType]['maxwidth'])vidType[vType].maxwidth=vidType._Globals.defaultWidth;
if(!vidType[vType]['maxheight'])vidType[vType].maxheight=vidType._Globals.defaultHeight;
prefix=vidType[vType].prefix
if(attribs){
vidType[vType].maxwidth=(/width=([^,]+)/i.test(attribs) && parseInt(RegExp.$1)<=parseInt(vidType[vType].maxwidth))?RegExp.$1:vidType[vType].maxwidth;
vidType[vType].maxheight=(/height=([^,]+)/i.test(attribs) && parseInt(RegExp.$1)<=parseInt(vidType[vType].maxheight))?RegExp.$1:vidType[vType].maxheight;
if(attribs.match(/flashvars=([^,]+)/i)){if(/\?/.test(prefix))prefix+='&'; else prefix+='?'; prefix+=trim(attribs.match(/flashvars=([^,]+)/i)[1])}
}
if("custom" in vidType[vType]){
if(!('flashvars' in vidType[vType]))vidType[vType].flashvars='';
if('skin'+pb_skinid in vidType[vType].custom)vidType[vType].flashvars+=((vidType[vType].flashvars.length && vidType[vType].custom['skin'+pb_skinid].substr(0,1)!='&')?'&' + vidType[vType].custom['skin'+pb_skinid]:vidType[vType].custom['skin'+pb_skinid])
if('skinall' in vidType[vType].custom)vidType[vType].flashvars+=((vidType[vType].flashvars.length && vidType[vType].custom['skinall'].substr(0,1)!='&')?'&'+ vidType[vType].custom['skinall']:vidType[vType].custom['skinall'])
}
if("preprocess" in vidType[vType])vidType[vType].preprocess(vType,vURI)
prefix=prefix.replace(/%video%/g,vURI)
var ret='<div name="swfPlayer"><OBJECT width="'+ vidType[vType].maxwidth + '" height="'+ vidType[vType].maxheight + '" data="'+prefix.replace(/%video%/,vURI).split('?')[0]+'" standby="Loading player components..." >'
ret+= '<PARAM name="movie" value="'+prefix + '" />';
ret+= '<PARAM name="url" value="'+prefix + '" />';
ret+= '<PARAM name="src" value="'+prefix + '" />';
if("params" in vidType[vType]){
for(var v in vidType[vType].params){
var ret1=("function"==typeof vidType[vType].params[v])?vidType[vType].params[v]():vidType[vType].params[v]
if(!/^pluginspage$/.test(v)){
if(!/^(classid|codebase)$/i.test(v))
ret+= '<PARAM name="'+v + '" value="'+ ret1 + '" />';
else
ret=ret.replace(/<OBJECT\s/i,'<OBJECT '+v+'="'+ret1+'" ')
}
if(!/^(classid|codebase)$/i.test(v)){
params+= v + '="'+ ret1 + '" ';
}
}
}
for(var u in vidType._Globals.params){
if(!ret.match(new RegExp('name="'+ u +'"','i')) && !ret.match(new RegExp( u +'="','i')) && !params.match(new RegExp( u +'="','i'))){
var ret2=("function"==typeof vidType._Globals.params)?vidType._Globals.params():vidType._Globals.params
if(!/^pluginspage$/.test(u)){
if(!/^(classid|codebase)$/i.test(u))
ret+= '<PARAM name="'+ u + '" value="'+ ret2 + '" />';
else
ret=ret.replace(/<object\s/i,'<OBJECT '+u+'="'+ret2+'" ')
}
if(!/^(classid|codebase)$/i.test(u))
params+= u + '="'+ ret2 + '" ';
}
}
ret= '<div name="swfPlayer">' //7/4/08 abandon twice cooked embedding for <embed> alone
ret+= '<embed src=\042'+ prefix.replace(/%video%/,vURI)
ret+= '\042 width="'+ vidType[vType].maxwidth + '" height="'+ vidType[vType].maxheight + '" '+ params
ret+= ' id="_'+perPage+'"></embed>' //</object>'
if('postprocess' in vidType[vType])ret=vidType[vType].postprocess(ret)
ret+='</div>'
perPost++;
if(!isLink && (vidType._Globals.maxVidsPerPost<perPost || vidType._Globals.maxVidsPerPage<perPage || (attribs && attribs.match(/disabled?=(true|[1-9])/i))))
ret=disableVideo(ret,'<div style="text-align:center;line-height:30px;width:'+vidType[vType].maxwidth+';height:'+vidType[vType].maxheight+';" class="bordercolor" ><br><br>This video has been disabled to save bandwidth.<br> Click to enable</div>')
else
perPage++; caller.pop();
return ret
}
//-->
</script>
<script>
/* AVIP Addon:Google (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Google']={};
vidType['Google'].prefix='http://video.google.com/googleplayer.swf?docId=%video%';
vidType['Google'].params={flashvars:_getFlashVars};
vidType['Google'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=20';
vidType['Google'].preprocess=function(vType,vURI){if(/\bgoogle\./i.test(vURI) && vURI.match(/docid=([^&]+)/i))caller[caller.length-1].arguments[2]=RegExp.$1};
}
</script>
<script>
/* AVIP Addon:MySpace (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['MySpace']={};
vidType['MySpace'].prefix='http://lads.myspace.com/videos/vplayer.swf?m=%video%&type=video&cp=1';
vidType['MySpace'].params={flashvars:_getFlashVars};
vidType['MySpace'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=20';
vidType['MySpace'].preprocess=function(vType,vURI){if(/\bmyspace\./i.test(vURI) && vURI.match(/videoID=([^&]+)/))caller[caller.length-1].arguments[2]=RegExp.$1};
}
</script>
<script>
/* AVIP Addon:Yahoo (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Yahoo']={};
vidType['Yahoo'].prefix='http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.0.45&id=%gid%&vid=%video%&lang=en-US&intl =us&thumbUrl=';
vidType['Yahoo'].params={flashvars:_getFlashVars};
vidType['Yahoo'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=20';
vidType['Yahoo'].preprocess=function(vType,vURI){
if(vURI.match(/video\.yahoo\.com\/watch\/(\d+)\/(\d+)/i))
caller[caller.length-1].arguments[2]=vURI=RegExp.$2+ '.'+ RegExp.$1;
if(/^\d+\.\d+$/.test(vURI)){
prefix=prefix.replace(/%gid%/g,vURI.split('.')[0]).replace(/%video%/g,vURI.split('.')[1]);
caller[caller.length-1].arguments[2]=caller[caller.length-1].arguments[2].split('.')[1];
}
}
}
</script>
<script>
/* AVIP Addon:MegaVideo (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['MegaVideo']={};
vidType['MegaVideo'].prefix='http://www.megavideo.com/v/%video%';
vidType['MegaVideo'].params={flashvars:_getFlashVars};
vidType['MegaVideo'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=24';
// remove user specified color scheme if admin color scheme is present
vidType['MegaVideo'].preprocess=function(vType,vURI){if(vidType[vType].custom && ('skin'+pb_skinid in vidType[vType].custom)){caller[caller.length-1].arguments[2] = caller[caller.length-1].arguments[2].replace(/\.[0-3]$/,'');caller[caller.length-1].arguments[2]+=vidType[vType].custom['skin'+pb_skinid];}}
vidType['MegaVideo'].custom={skin1:'.0',skin2:'.1',skin3:'.0',skin4:'.3'};
/* INFO:
Megavideo offers 4 customized player color schemes
0 = orange, 1 = yellow, 2 = green, 3 = blue
*/
}
</script>
<script>
/* AVIP Addon:DailyMotion (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['DailyMotion']={};
vidType['DailyMotion'].prefix='http://www.dailymotion.com/swf/%video%';
vidType['DailyMotion'].params={flashvars:_getFlashVars};
vidType['DailyMotion'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=23';
vidType['DailyMotion'].preprocess=function(vType,vURI){if(vURI.match(/video\/([^_]+)/))caller[caller.length-1].arguments[2]=RegExp.$1};
vidType['DailyMotion'].custom={skin1:'colors=background:DDDDDD;glow:FFFFFF;foreground:333333;special:FFC300'};
}
</script>
<script>
/* AVIP Addon:Break (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Break']={};
vidType['Break'].prefix='http://embed.break.com/%video%';
vidType['Break'].params={flashvars:_getFlashVars};
vidType['Break'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=20';
vidType['Break'].description='Break.com';
}
</script>
<script>
/* AVIP Addon:ESPN (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['ESPN']={};
vidType['ESPN'].prefix='http://sports.espn.go.com/broadband/player.swf?mediaId=%video%';
vidType['ESPN'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=19';
vidType['ESPN'].preprocess=function(vType,vURI){if(vURI.match(/videoId=([^&]+)/i))caller[caller.length-1].arguments[2]=RegExp.$1};
vidType['ESPN'].params={allownetworking:'internal'}
}
</script>
<script>
/* AVIP Addon:Blip (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Blip']={};
vidType['Blip'].prefix='http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&file=%video%&showplayerpath=http%3A%2F%2Fblip% 2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf';
vidType['Blip'].params={id:'showplayer',flashvars:_getFlashVars};
vidType['Blip'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=21';
vidType['Blip'].preprocess=function(vType,vURI){if(vidType[vType].custom && ('skin'+pb_skinid in vidType[vType].custom))caller[caller.length-1].arguments[2] = caller[caller.length-1].arguments[2].replace(/&(amp;)?(light|back|front)color=[^&]+/gi,'');}
vidType['Blip'].custom={skin1:'&lightcolor=0x000000&backcolor=0xFFFFFF&frontcolor=0x666666'}
}
</script>
<script>
/* AVIP Addon:Metacafe (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Metacafe']={};
vidType['Metacafe'].prefix='http://www.metacafe.com/fplayer/%video%.swf';
vidType['Metacafe'].checkid=function(vid){return /http:\/\/(www.)?metacafe.com\/watch\/\d+\/\w+\/?/i.test(vid)};
vidType['Metacafe'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=38';
vidType['Metacafe'].preprocess=function(vType,vURI){caller[caller.length-1].arguments[2]=vURI.replace( /http:\/\/(www.)?metacafe.com\/watch\//,'').replace(/\/$/,'')}
}
</script>
<script>
/* AVIP Addon:Game Trailers (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['GT']={};
vidType['GT'].prefix='http://www.gametrailers.com/remote_wrap.php?mid=%video%';
vidType['GT'].description='Game Trailers';
vidType['GT'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=31';
vidType['GT'].preprocess=function(vType,vURI){if(vURI.match(/([^/]+)\.html?/))caller[caller.length-1].arguments[2]=RegExp.$1};
}
</script>
<script>
/* AVIP Addon:Veoh (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Veoh']={};
vidType['Veoh'].prefix='http://www.veoh.com/videodetails2.swf?permalinkId=%video%&id=anonymous&player=videodetailsembedded&video AutoPlay=0';
vidType['Veoh'].example='http://etonbones.proboards100.com/index.cgi?action=display&board=examples&thread=30';
vidType['Veoh'].preprocess=function(vType,vURI){if(vURI.match(/videos\/([^/?&]+)/))caller[caller.length-1].arguments[2]=RegExp.$1};
}
</script>
<script>
/* AVIP Addon:BrightCove (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['BrightCove']={};
vidType['BrightCove'].prefix='http://www.brightcove.tv/playerswf?initVideoId=%video%&servicesURL=http://www.brightcove.tv&viewer SecureGatewayURL=https://www.brightcove.tv&cdnURL=http://admin.brightcove.com&autoStart=false';
vidType['BrightCove'].params={flashvars:_getFlashVars}
}
</script>
<script>
/* AVIP Addon:GodTube (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['GodTube']={};
vidType['GodTube'].prefix='http://godtube.com/flvplayer.swf?viewkey=%video%';
vidType['GodTube'].params={flashvars:_getFlashVars}
}
</script>
<script>
/* AVIP Addon:ShoutFile (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['ShoutFile']={};
vidType['ShoutFile'].prefix='http://www.shoutfile.com/emb/%video%';
vidType['ShoutFile'].params={allowscriptaccess:'never'} //stop popups
}
</script>
<script>
/* AVIP Addon:GoFish (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['GoFish']={};
vidType['GoFish'].prefix='http://www.gofish.com/player/GFPlayer.swf?svr=www.gofish.com&loc=external&cgfid=%video%';
vidType['GoFish'].preprocess=function(vType,vURI){var vgfid='';if(vURI.match(/\bvideoGfid=([^&]+)/i)){vgfid='&vgfid='+RegExp.$1} if(vURI.match(/\bgfid=([^&]+)/i)){caller[caller.length-1].arguments[2]=RegExp.$1+vgfid;}};
vidType['GoFish'].params={flashvars:_getFlashVars,swliveconnect:true,name:'GFPlayerID'}
}
</script>
<script>
/* AVIP Addon:Vimeo (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Vimeo']={};
vidType['Vimeo'].prefix='http://www.vimeo.com/moogaloop.swf?clip_id=%video%&server=www.vimeo.com&show_title=1&show_byline=1&show _portrait=0';
}
</script>
<script>
/* AVIP Addon:iFilm (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['iFilm']={};
vidType['iFilm'].prefix='http://www.spike.com/efp?flvbaseclip=%video%&';
vidType['iFilm'].params={flashvars:_getFlashVars}
vidType['iFilm'].preprocess= function(vType,vURI){if(vURI.match(/(?:\/|VID_)(\d+)\??/i)){caller[caller.length-1].arguments[2]=RegExp.$1;}}
}
</script>
<script>
/* AVIP Addon:iMeem (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['iMeem']={};
vidType['iMeem'].prefix='http://media.imeem.com/v/%video%/aus=false/pv=2'
}
</script>
<script>
/* AVIP Addon:BigThink (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['BigThink262']={};
vidType['BigThink262'].description='Bigthink(262x196)'
vidType['BigThink262'].maxwidth='278px'
vidType['BigThink262'].maxheight='265px'
vidType['BigThink262'].params={flashvars:_getFlashVars};
vidType['BigThink262'].prefix= 'http://www.bigthink.com/swf/video_player_262x196.swf?ideaid=%video%&ideacolor=2&loadUrl=http://www.bigthink.com/feed/pl ayerInfo.xml'
vidType['BigThink262'].example='http://etonbones.proboards100.com/index.cgi?action=display&board=examples&thread=46';
vidType['BigThink404']={};
vidType['BigThink404'].description='Bigthink(404x303)'
vidType['BigThink404'].maxwidth='420px'
vidType['BigThink404'].maxheight='372px'
vidType['BigThink404'].params={flashvars:_getFlashVars};
vidType['BigThink404'].prefix= 'http://www.bigthink.com/swf/video_player_404x303.swf?ideaid=%video%&ideacolor=2&loadUrl=http://www.bigthink.com/feed/pl ayerInfo.xml'
vidType['BigThink404'].example='http://etonbones.proboards100.com/index.cgi?action=display&board=examples&thread=46';
}
</script>
<script>
/* AVIP Addon:MSN (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['MSN']={};
vidType['MSN'].prefix='http://images.video.msn.com/flash/soapbox1_1.swf?c=v&v=%video%&ifs=true&fr=msnvideo&mkt=en-US&brand='
vidType['MSN'].preprocess=function(vType,vURI){if(vURI.match(/vid=([^&]+)/))caller[caller.length-1].arguments[2]=RegExp.$1}
vidType['MSN'].params={flashvars:_getFlashVars,base:"http://images.video.msn.com"}
vidType['MSN'].postprocess= function(ret){return ret+'<br><a href="http://video.msn.com/StreamingUrl.aspx?vid='+caller[caller.length-1].arguments[2]+'&t=.flv">download this video</a>'}
}
</script>
GLOBAL FOOTER
<script type='text/javascript'>
<!--
/*Any Video in Post (footer portion)- Eton Bones */
/* last updated: 8/10/2008 (rev9)*/
var _color=document.getElementsByName('color')
if(document.postForm && _color.length && isAllowed('canPost',pb_username) && isAllowed('boards',((document.getElementsByName('board').length)?document.getElementsByName('board')[0].value:'main'))){
_color=_color[0];
var select=document.createElement('select');
select.options[0]=new Option('videos','')
for(var v in vidType){
if(v.substr(0,1)!="_")
select.options[select.options.length]=new Option(('description' in vidType[v])?vidType[v].description:v,v)
}
select.options[0].selected=true;
select.onchange=function(){
if("example" in vidType[this.options[this.selectedIndex].value]){
document.getElementById('videoExample').innerHTML='For an example of how to insert a'+((/[aeiou]/i.test(this.options[this.selectedIndex].text.substr(0,1)))?'n ':' ')+ this.options[this.selectedIndex].text + ' video into a post please see <a href="' + vidType[this.options[this.selectedIndex].value].example + '" target="_blank">this</a> link.'
}else{
document.getElementById('videoExample').innerHTML='';
}
aV(this.options[this.selectedIndex].value);this.selectedIndex=0;
}
_color.parentNode.appendChild(document.createTextNode(' '));
_color.parentNode.appendChild(select)
var ex = document.createElement('fieldset'); ex.id = "videoHelp";
ex.innerHTML = '<legend>Video Help</legend><div id="videoExample"></div>'
ex.innerHTML += '<a href="http://etonbones.proboards100.com/index.cgi?action=display&board=examples&thread=72" target="_blank">Advanced Postings</a>'
document.postForm.message.parentNode.appendChild(ex)
}
if((location.href.match(/action=(display|goto|(?:user)?recent|search2|pmview)/i)||(location.href.split(/\//).pop()=="index.cgi" && (document.body.innerHTML.match(/b>\d+\sresults found<\/b/i)||document.title.match(/-\sPreview/)))) && isAllowed('canView',pb_username)){
var mTD=document.getElementsByTagName('td'),imgDisabled=true, perPost=perPage=0,prefix='',isLink=false;
for(var i=0;i<mTD.length;i++){
if(imgDisabled && mTD.className=="titlebg" && mTD.colSpan=="2" && mTD.getElementsByTagName('img').length)imgDisabled=false;
if(mTD.width=="20%" && mTD.className.match(/windowbg2?/) && !imgDisabled){
var post=mTD.nextSibling; perPost=0;
post.innerHTML= post.innerHTML.replace(/\[video=?([^\]]+?)?\]([\s\S]+?)\[\/video\]/gim,makeEmbed);
if(vidType._Globals['autoLink'] && vidType._Globals['autoLink'].length){
var v=vidType._Globals['autoLink'].split(/,/)
isLink=true;
for(var u=0;u<v.length;u++){
try{ret=vidType[v].autolink(post)}catch(e){}
}
isLink=false;
}
}
}
}
//-->
</script>
<script type='text/javascript'>
<!--
/* Any Video in Post (header portion)- Eton Bones*/
/* last updated: 7/27/2008 (rev 9) */
var caller=[];
var vidType={
_Globals:{
defaultType:'Embed',
params:{allowfullscreen:true, allowscriptaccess:'always', pluginspage:'http://www.macromedia.com/go/getflashplayer', type:'application/x-shockwave-flash', classid:'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', quality:'autohigh', codebase:'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab', wmode:'transparent'},
maxVidsPerPost:100,
maxVidsPerPage:300,
defaultWidth:'720px',
defaultHeight:'480px',
canPost:'-Guest',
//canView:'-Guest',
autoLink:'YouTube'
},
Embed:{
prefix:'%video%',
checkid:function(vid){ if(/<(object|embed)\b/im.test(deEntify(vid)) /*&& /\.swf\b/i.test(vid)*/)return true; else return false;},
postprocess: function(ret){
var w=vidType['Embed'].maxwidth; var h=vidType['Embed'].maxheight
ret=deEntify(caller[caller.length-1].arguments[2])
if(!/width=\d+/i.test(caller[caller.length-1].arguments[0].split(/\]/)[0]))w=0
if(!/height=\d+/i.test(caller[caller.length-1].arguments[0].split(/\]/)[0]))h=0
ret=ret.replace(/(width|height)=['"]?(\d+)/gi,function(m,p1,p2){
if(/width/i.test(p1)&&w>0){
m=m.replace(/width=('|")\d+/i,'width=$1'+w)
}else if(/height/i.test(p1)&&h>0){
m=m.replace(/height=('|")\d+/i,'height=$1'+h)
}
return m;
})
//disable all SWF browser navigation and browser interaction APIs to avoid possible popups
if(/\ballownetworking\b/i.test(ret))
ret=ret.replace(/(value|allownetworking)=('|")all['"]/gim, "$1=$2internal$2");
else
ret=ret.replace(/<embed\s/gi,'<embed allownetworking="internal" ').replace( /<param\s/i,'<param name="allownetworking" value="internal"/><param ');
return String('<div name="swfPlayer">'+ret)
},
preprocess:function(vType,vURI){
//attempt to fix Proboards' hard wraps
vURI=pb_unwrap(vURI)
//allow only specific HTML tags
vURI = vURI.replace(/&(nbsp);?/gi,' ').replace(/&(quot);?/gi,'"').replace(/(<|&l{1}t;?)\s*(\/?\w+)/gi,function(m,p1,p2,i,s){
p1='';
if(p2.substr(0,1)=='/'){p1='/';p2 = p2.substr(1)}
p2=p2.toLowerCase()
if(p2== 'embed'){
var t = s.substr(i).split(/>/)[0];
if(t.match(/type\s*=\s*['"]?([^'"\s]+)/))
{if(!/shockwave-flash/i.test(RegExp.$1))return ''+'60;' + p1 + p2}
}else if( p2.match(/^(param|object)$/)){
return '<font></font'
}else if( p2.match(/^(table|tr|td|thead|tbody|tfoot|th|center)$/)){
}else if( p2.match(/^(font|a|span|div|img|br|b|i|u|s|hr)$/)){
}else{
return ''+'60;' + p1 + p2
}
return m
});
//disable possible script handlers
vURI=vURI.replace(/\bon(\w+)=/gi,'no$1=').replace(/javascript\:/gi,'pbscript:')
caller[caller.length-1].arguments[2]= vURI
},
description:'Embed Code'
},
AnySWF:{
prefix:'%video%',
description:'Generic SWF Player',
maxwidth:'425px',
maxheight:'350px',
params:{flashvars:_getFlashVars},
checkid:function(vid){return /\.swf(\?|\s*$)/i.test(vid)}
},
AnyFLV:{
prefix:'http://www.jeroenwijering.com/embed/mediaplayer.swf?file=%video%',
description:'Generic FLV Player',
maxwidth:'720px',
maxheight:'350px',
custom:{skinall:'&displayheight=%height%&displaywidth=%width%',skin1:'&lightcolor=0x000000&backcolor=0x334455&frontcolor=0x666666&screencolor=0xFFFFFF'},
params:{flashvars:_getFlashVars},
preprocess:function(vType,vURI){this['flashvars']=((this['flashvars'])?this['flashvars']:'');this.flashvars=this.flashvars.replace(/%height%/gi,parseInt(this.maxheight)).replace(/%width%/gi,parseInt(this.maxheight));if(vURI.match(/\.(flv|mp4|m4v|m4a|3gp|mov|f4v|f4p|f4a|f4b)(\?|\s*$)/i))this.flashvars+='&type='+RegExp.$1;},
checkid:function(vid){return /\.(flv|mp4|m4v|m4a|3gp|mov|f4v|f4p|f4a|f4b|xml|asx)(\?|\s*$)/i.test(vid)}
},
WMP:{
prefix:'%video%',
description:'Windows Media Player',
example:'http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=18',
params:{CLASSID:'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6', invokeurls:0, autostart:0,playcount:1, name:'mediaplayer1',CODEBASE:'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',pluginspage:'http://www.microsoft.com/Windows/MediaPlayer/',type:'application/x-mplayer2'}
},
Quicktime:{
prefix:'%video%',
example:'http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=17',
params:{CLASSID:'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', autoplay:0 , name:'quicktimeplayer1', CODEBASE:'http://www.apple.com/qtactivex/qtplugin.cab',pluginspage:'http://www.apple.com/quicktime/download',type:'video/quicktime'}
},
Real:{
description:'Real Player',
prefix:'%video%',
example:'http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=15',
preprocess:function(vType,vURI){if(!vURI.match(/\?embed$/i))caller[caller.length-1].arguments[2]+='?embed'},
postprocess:function(ret){
//real player requires separate controls for vid and control panel
ret+='<br><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" '+ret.match(/width=[^\s]+/)[0]+' '+ ' height="36" >'
ret+='<param name="controls" value="ControlPanel">';
ret+='<param name="console" value="vidplayer">';
ret+=ret.match(/\<embed[\w\W]+?<\/embed>/im)[0].replace(/controls="ImageWindow"/,'controls="ControlPanel"').replace(/height=".+?"/,'height="36"')
ret + '></object>'
return ret
},
params:{CLASSID:'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', autogotourl :0 , autostart :0, controls:'ImageWindow', console:'vidplayer', pluginspage:'http://www.real.com/', /*type:'audio/x-pn-realaudio-plugin'*/type:'application/vnd.rn-realplayer'}
},
VLC:{
prefix:'%video%',
description:'VideoLAN (VLC)',
params:{CLASSID:'clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8',CODEBASE:'http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab',pluginspage:'http://www.videolan.org',type:'application/x-vlc-plugin'}
}
}
function aV(video){
video=(video)?video:vidType._Globals.defaultType
add("[video=", "[/video]", video);
}
function _getFlashVars(){
var vType=caller[caller.length-1].arguments[1];
var a=prefix.split(/\?/);
prefix=a[0]; if(a.length==1)a.push('')
if(vidType[vType]['flashvars']){ a[1]+=((a[1].length)?'&':'')+vidType[vType]['flashvars']; }
return a[1]
}
function deEntify(sStr){
return sStr.replace(/&am{1}p;/gi,"&").replace(/&l{1}t;/gi,"<").replace(/&g{1}t;/gi,">")
}
function pb_unwrap(sStr){return sStr.replace(/([^\s\n\r]{111,})(\s|%20)/gm,'$1')}
function trim(sStr){
return sStr.replace(/(^\s+|\s+$)/g,'')
}
function isAllowed(users,user){
if(!vidType._Globals[users])return true
var u=vidType._Globals[users]
u=u.split(/,/).sort().reverse().join('|')
var v=u.indexOf('-')
if(v>-1){
if(RegExp('^('+u.substr(v).replace('-','')+')$').test(user))return false;
u=u.substr(0,v).replace(/|$/,'')
}
if(u.length){
if(RegExp('^('+u+')$',"i").test(user))return true;
return false;
}else{ return true;}
}
function disableVideo(vid,link,title){
title=(title)?title:''
var ret='<a href="javascript:void(0)" onClick="enableVideo(this)" title="'+title+'">'
ret+=link+'</a><xm'+'p style="display:none;">'+ vid +'</xm'+'p>'
return ret
}
function enableVideo(thiss){
var v=document.createElement('div');
v.innerHTML=deEntify(thiss.nextSibling.innerHTML);
thiss.parentNode.replaceChild(v.firstChild,thiss.nextSibling);
thiss.style.display="none"
}
function makeEmbed(m,vType,vURI){
var params=''; var attribs=null;
if(mTD.getElementsByTagName('a').length<((window['pb_VersionNo'])?2:1) && !isAllowed('canPost','Guest')) return '<DIV>Guests are not allowed to post videos</DIV>'
if(mTD.getElementsByTagName('a').length>((window['pb_VersionNo'])?2:1) && mTD.getElementsByTagName('a')[((window['pb_VersionNo'])?2:1)].href.match(/user=(\w+)/) && !isAllowed('canPost',RegExp.$1))
return '<DIV>'+mTD.getElementsByTagName('a')[((window['pb_VersionNo'])?2:1)].innerHTML + ' is not allowed to post videos</DIV>'
if(vidType._Globals['boards'] && !vidType._Globals['boards'].match(/\bmain\b/i))vidType._Globals['boards']+=",main";
if(!isAllowed('boards',((document.getElementsByName('board').length)?document.getElementsByName('board')[0].value:'main'))) return m;
if(!vType)vType=vidType._Globals.defaultType;
if(!/^Embed\b/.test(vType) && vURI.match(/href=['"]?([^\s'">]+)/i))vURI=RegExp.$1;
//if(/\<\s*(embed|object)/i.test(m))return m
if(/,/.test(vType)){attribs=trim(deEntify(vType.substr(vType.indexOf(',')+1)));vType=trim(vType.split(/,/)[0]);}
if(!vidType[vType]) return m;
if('checkid' in vidType[vType]) if(!vidType[vType].checkid(vURI)) return m;
caller.push(arguments.callee) //opera+safari don't support arguments.callee.caller
if(!vidType[vType]['maxwidth'])vidType[vType].maxwidth=vidType._Globals.defaultWidth;
if(!vidType[vType]['maxheight'])vidType[vType].maxheight=vidType._Globals.defaultHeight;
prefix=vidType[vType].prefix
if(attribs){
vidType[vType].maxwidth=(/width=([^,]+)/i.test(attribs) && parseInt(RegExp.$1)<=parseInt(vidType[vType].maxwidth))?RegExp.$1:vidType[vType].maxwidth;
vidType[vType].maxheight=(/height=([^,]+)/i.test(attribs) && parseInt(RegExp.$1)<=parseInt(vidType[vType].maxheight))?RegExp.$1:vidType[vType].maxheight;
if(attribs.match(/flashvars=([^,]+)/i)){if(/\?/.test(prefix))prefix+='&'; else prefix+='?'; prefix+=trim(attribs.match(/flashvars=([^,]+)/i)[1])}
}
if("custom" in vidType[vType]){
if(!('flashvars' in vidType[vType]))vidType[vType].flashvars='';
if('skin'+pb_skinid in vidType[vType].custom)vidType[vType].flashvars+=((vidType[vType].flashvars.length && vidType[vType].custom['skin'+pb_skinid].substr(0,1)!='&')?'&' + vidType[vType].custom['skin'+pb_skinid]:vidType[vType].custom['skin'+pb_skinid])
if('skinall' in vidType[vType].custom)vidType[vType].flashvars+=((vidType[vType].flashvars.length && vidType[vType].custom['skinall'].substr(0,1)!='&')?'&'+ vidType[vType].custom['skinall']:vidType[vType].custom['skinall'])
}
if("preprocess" in vidType[vType])vidType[vType].preprocess(vType,vURI)
prefix=prefix.replace(/%video%/g,vURI)
var ret='<div name="swfPlayer"><OBJECT width="'+ vidType[vType].maxwidth + '" height="'+ vidType[vType].maxheight + '" data="'+prefix.replace(/%video%/,vURI).split('?')[0]+'" standby="Loading player components..." >'
ret+= '<PARAM name="movie" value="'+prefix + '" />';
ret+= '<PARAM name="url" value="'+prefix + '" />';
ret+= '<PARAM name="src" value="'+prefix + '" />';
if("params" in vidType[vType]){
for(var v in vidType[vType].params){
var ret1=("function"==typeof vidType[vType].params[v])?vidType[vType].params[v]():vidType[vType].params[v]
if(!/^pluginspage$/.test(v)){
if(!/^(classid|codebase)$/i.test(v))
ret+= '<PARAM name="'+v + '" value="'+ ret1 + '" />';
else
ret=ret.replace(/<OBJECT\s/i,'<OBJECT '+v+'="'+ret1+'" ')
}
if(!/^(classid|codebase)$/i.test(v)){
params+= v + '="'+ ret1 + '" ';
}
}
}
for(var u in vidType._Globals.params){
if(!ret.match(new RegExp('name="'+ u +'"','i')) && !ret.match(new RegExp( u +'="','i')) && !params.match(new RegExp( u +'="','i'))){
var ret2=("function"==typeof vidType._Globals.params)?vidType._Globals.params():vidType._Globals.params
if(!/^pluginspage$/.test(u)){
if(!/^(classid|codebase)$/i.test(u))
ret+= '<PARAM name="'+ u + '" value="'+ ret2 + '" />';
else
ret=ret.replace(/<object\s/i,'<OBJECT '+u+'="'+ret2+'" ')
}
if(!/^(classid|codebase)$/i.test(u))
params+= u + '="'+ ret2 + '" ';
}
}
ret= '<div name="swfPlayer">' //7/4/08 abandon twice cooked embedding for <embed> alone
ret+= '<embed src=\042'+ prefix.replace(/%video%/,vURI)
ret+= '\042 width="'+ vidType[vType].maxwidth + '" height="'+ vidType[vType].maxheight + '" '+ params
ret+= ' id="_'+perPage+'"></embed>' //</object>'
if('postprocess' in vidType[vType])ret=vidType[vType].postprocess(ret)
ret+='</div>'
perPost++;
if(!isLink && (vidType._Globals.maxVidsPerPost<perPost || vidType._Globals.maxVidsPerPage<perPage || (attribs && attribs.match(/disabled?=(true|[1-9])/i))))
ret=disableVideo(ret,'<div style="text-align:center;line-height:30px;width:'+vidType[vType].maxwidth+';height:'+vidType[vType].maxheight+';" class="bordercolor" ><br><br>This video has been disabled to save bandwidth.<br> Click to enable</div>')
else
perPage++; caller.pop();
return ret
}
//-->
</script>
<script>
/* AVIP Addon:Google (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Google']={};
vidType['Google'].prefix='http://video.google.com/googleplayer.swf?docId=%video%';
vidType['Google'].params={flashvars:_getFlashVars};
vidType['Google'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=20';
vidType['Google'].preprocess=function(vType,vURI){if(/\bgoogle\./i.test(vURI) && vURI.match(/docid=([^&]+)/i))caller[caller.length-1].arguments[2]=RegExp.$1};
}
</script>
<script>
/* AVIP Addon:MySpace (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['MySpace']={};
vidType['MySpace'].prefix='http://lads.myspace.com/videos/vplayer.swf?m=%video%&type=video&cp=1';
vidType['MySpace'].params={flashvars:_getFlashVars};
vidType['MySpace'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=20';
vidType['MySpace'].preprocess=function(vType,vURI){if(/\bmyspace\./i.test(vURI) && vURI.match(/videoID=([^&]+)/))caller[caller.length-1].arguments[2]=RegExp.$1};
}
</script>
<script>
/* AVIP Addon:Yahoo (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Yahoo']={};
vidType['Yahoo'].prefix='http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.0.45&id=%gid%&vid=%video%&lang=en-US&intl =us&thumbUrl=';
vidType['Yahoo'].params={flashvars:_getFlashVars};
vidType['Yahoo'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=20';
vidType['Yahoo'].preprocess=function(vType,vURI){
if(vURI.match(/video\.yahoo\.com\/watch\/(\d+)\/(\d+)/i))
caller[caller.length-1].arguments[2]=vURI=RegExp.$2+ '.'+ RegExp.$1;
if(/^\d+\.\d+$/.test(vURI)){
prefix=prefix.replace(/%gid%/g,vURI.split('.')[0]).replace(/%video%/g,vURI.split('.')[1]);
caller[caller.length-1].arguments[2]=caller[caller.length-1].arguments[2].split('.')[1];
}
}
}
</script>
<script>
/* AVIP Addon:MegaVideo (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['MegaVideo']={};
vidType['MegaVideo'].prefix='http://www.megavideo.com/v/%video%';
vidType['MegaVideo'].params={flashvars:_getFlashVars};
vidType['MegaVideo'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=24';
// remove user specified color scheme if admin color scheme is present
vidType['MegaVideo'].preprocess=function(vType,vURI){if(vidType[vType].custom && ('skin'+pb_skinid in vidType[vType].custom)){caller[caller.length-1].arguments[2] = caller[caller.length-1].arguments[2].replace(/\.[0-3]$/,'');caller[caller.length-1].arguments[2]+=vidType[vType].custom['skin'+pb_skinid];}}
vidType['MegaVideo'].custom={skin1:'.0',skin2:'.1',skin3:'.0',skin4:'.3'};
/* INFO:
Megavideo offers 4 customized player color schemes
0 = orange, 1 = yellow, 2 = green, 3 = blue
*/
}
</script>
<script>
/* AVIP Addon:DailyMotion (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['DailyMotion']={};
vidType['DailyMotion'].prefix='http://www.dailymotion.com/swf/%video%';
vidType['DailyMotion'].params={flashvars:_getFlashVars};
vidType['DailyMotion'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=23';
vidType['DailyMotion'].preprocess=function(vType,vURI){if(vURI.match(/video\/([^_]+)/))caller[caller.length-1].arguments[2]=RegExp.$1};
vidType['DailyMotion'].custom={skin1:'colors=background:DDDDDD;glow:FFFFFF;foreground:333333;special:FFC300'};
}
</script>
<script>
/* AVIP Addon:Break (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Break']={};
vidType['Break'].prefix='http://embed.break.com/%video%';
vidType['Break'].params={flashvars:_getFlashVars};
vidType['Break'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=20';
vidType['Break'].description='Break.com';
}
</script>
<script>
/* AVIP Addon:ESPN (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['ESPN']={};
vidType['ESPN'].prefix='http://sports.espn.go.com/broadband/player.swf?mediaId=%video%';
vidType['ESPN'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=19';
vidType['ESPN'].preprocess=function(vType,vURI){if(vURI.match(/videoId=([^&]+)/i))caller[caller.length-1].arguments[2]=RegExp.$1};
vidType['ESPN'].params={allownetworking:'internal'}
}
</script>
<script>
/* AVIP Addon:Blip (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Blip']={};
vidType['Blip'].prefix='http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&file=%video%&showplayerpath=http%3A%2F%2Fblip% 2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf';
vidType['Blip'].params={id:'showplayer',flashvars:_getFlashVars};
vidType['Blip'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=21';
vidType['Blip'].preprocess=function(vType,vURI){if(vidType[vType].custom && ('skin'+pb_skinid in vidType[vType].custom))caller[caller.length-1].arguments[2] = caller[caller.length-1].arguments[2].replace(/&(amp;)?(light|back|front)color=[^&]+/gi,'');}
vidType['Blip'].custom={skin1:'&lightcolor=0x000000&backcolor=0xFFFFFF&frontcolor=0x666666'}
}
</script>
<script>
/* AVIP Addon:Metacafe (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Metacafe']={};
vidType['Metacafe'].prefix='http://www.metacafe.com/fplayer/%video%.swf';
vidType['Metacafe'].checkid=function(vid){return /http:\/\/(www.)?metacafe.com\/watch\/\d+\/\w+\/?/i.test(vid)};
vidType['Metacafe'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=38';
vidType['Metacafe'].preprocess=function(vType,vURI){caller[caller.length-1].arguments[2]=vURI.replace( /http:\/\/(www.)?metacafe.com\/watch\//,'').replace(/\/$/,'')}
}
</script>
<script>
/* AVIP Addon:Game Trailers (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['GT']={};
vidType['GT'].prefix='http://www.gametrailers.com/remote_wrap.php?mid=%video%';
vidType['GT'].description='Game Trailers';
vidType['GT'].example='http://etonbones.proboards100.com/index.cgi?board=examples&action=display&thread=31';
vidType['GT'].preprocess=function(vType,vURI){if(vURI.match(/([^/]+)\.html?/))caller[caller.length-1].arguments[2]=RegExp.$1};
}
</script>
<script>
/* AVIP Addon:Veoh (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Veoh']={};
vidType['Veoh'].prefix='http://www.veoh.com/videodetails2.swf?permalinkId=%video%&id=anonymous&player=videodetailsembedded&video AutoPlay=0';
vidType['Veoh'].example='http://etonbones.proboards100.com/index.cgi?action=display&board=examples&thread=30';
vidType['Veoh'].preprocess=function(vType,vURI){if(vURI.match(/videos\/([^/?&]+)/))caller[caller.length-1].arguments[2]=RegExp.$1};
}
</script>
<script>
/* AVIP Addon:BrightCove (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['BrightCove']={};
vidType['BrightCove'].prefix='http://www.brightcove.tv/playerswf?initVideoId=%video%&servicesURL=http://www.brightcove.tv&viewer SecureGatewayURL=https://www.brightcove.tv&cdnURL=http://admin.brightcove.com&autoStart=false';
vidType['BrightCove'].params={flashvars:_getFlashVars}
}
</script>
<script>
/* AVIP Addon:GodTube (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['GodTube']={};
vidType['GodTube'].prefix='http://godtube.com/flvplayer.swf?viewkey=%video%';
vidType['GodTube'].params={flashvars:_getFlashVars}
}
</script>
<script>
/* AVIP Addon:ShoutFile (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['ShoutFile']={};
vidType['ShoutFile'].prefix='http://www.shoutfile.com/emb/%video%';
vidType['ShoutFile'].params={allowscriptaccess:'never'} //stop popups
}
</script>
<script>
/* AVIP Addon:GoFish (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['GoFish']={};
vidType['GoFish'].prefix='http://www.gofish.com/player/GFPlayer.swf?svr=www.gofish.com&loc=external&cgfid=%video%';
vidType['GoFish'].preprocess=function(vType,vURI){var vgfid='';if(vURI.match(/\bvideoGfid=([^&]+)/i)){vgfid='&vgfid='+RegExp.$1} if(vURI.match(/\bgfid=([^&]+)/i)){caller[caller.length-1].arguments[2]=RegExp.$1+vgfid;}};
vidType['GoFish'].params={flashvars:_getFlashVars,swliveconnect:true,name:'GFPlayerID'}
}
</script>
<script>
/* AVIP Addon:Vimeo (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['Vimeo']={};
vidType['Vimeo'].prefix='http://www.vimeo.com/moogaloop.swf?clip_id=%video%&server=www.vimeo.com&show_title=1&show_byline=1&show _portrait=0';
}
</script>
<script>
/* AVIP Addon:iFilm (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['iFilm']={};
vidType['iFilm'].prefix='http://www.spike.com/efp?flvbaseclip=%video%&';
vidType['iFilm'].params={flashvars:_getFlashVars}
vidType['iFilm'].preprocess= function(vType,vURI){if(vURI.match(/(?:\/|VID_)(\d+)\??/i)){caller[caller.length-1].arguments[2]=RegExp.$1;}}
}
</script>
<script>
/* AVIP Addon:iMeem (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['iMeem']={};
vidType['iMeem'].prefix='http://media.imeem.com/v/%video%/aus=false/pv=2'
}
</script>
<script>
/* AVIP Addon:BigThink (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['BigThink262']={};
vidType['BigThink262'].description='Bigthink(262x196)'
vidType['BigThink262'].maxwidth='278px'
vidType['BigThink262'].maxheight='265px'
vidType['BigThink262'].params={flashvars:_getFlashVars};
vidType['BigThink262'].prefix= 'http://www.bigthink.com/swf/video_player_262x196.swf?ideaid=%video%&ideacolor=2&loadUrl=http://www.bigthink.com/feed/pl ayerInfo.xml'
vidType['BigThink262'].example='http://etonbones.proboards100.com/index.cgi?action=display&board=examples&thread=46';
vidType['BigThink404']={};
vidType['BigThink404'].description='Bigthink(404x303)'
vidType['BigThink404'].maxwidth='420px'
vidType['BigThink404'].maxheight='372px'
vidType['BigThink404'].params={flashvars:_getFlashVars};
vidType['BigThink404'].prefix= 'http://www.bigthink.com/swf/video_player_404x303.swf?ideaid=%video%&ideacolor=2&loadUrl=http://www.bigthink.com/feed/pl ayerInfo.xml'
vidType['BigThink404'].example='http://etonbones.proboards100.com/index.cgi?action=display&board=examples&thread=46';
}
</script>
<script>
/* AVIP Addon:MSN (global header below AVIP header code) - Eton Bones*/
if(window['vidType']){
vidType['MSN']={};
vidType['MSN'].prefix='http://images.video.msn.com/flash/soapbox1_1.swf?c=v&v=%video%&ifs=true&fr=msnvideo&mkt=en-US&brand='
vidType['MSN'].preprocess=function(vType,vURI){if(vURI.match(/vid=([^&]+)/))caller[caller.length-1].arguments[2]=RegExp.$1}
vidType['MSN'].params={flashvars:_getFlashVars,base:"http://images.video.msn.com"}
vidType['MSN'].postprocess= function(ret){return ret+'<br><a href="http://video.msn.com/StreamingUrl.aspx?vid='+caller[caller.length-1].arguments[2]+'&t=.flv">download this video</a>'}
}
</script>
GLOBAL FOOTER
<script type='text/javascript'>
<!--
/*Any Video in Post (footer portion)- Eton Bones */
/* last updated: 8/10/2008 (rev9)*/
var _color=document.getElementsByName('color')
if(document.postForm && _color.length && isAllowed('canPost',pb_username) && isAllowed('boards',((document.getElementsByName('board').length)?document.getElementsByName('board')[0].value:'main'))){
_color=_color[0];
var select=document.createElement('select');
select.options[0]=new Option('videos','')
for(var v in vidType){
if(v.substr(0,1)!="_")
select.options[select.options.length]=new Option(('description' in vidType[v])?vidType[v].description:v,v)
}
select.options[0].selected=true;
select.onchange=function(){
if("example" in vidType[this.options[this.selectedIndex].value]){
document.getElementById('videoExample').innerHTML='For an example of how to insert a'+((/[aeiou]/i.test(this.options[this.selectedIndex].text.substr(0,1)))?'n ':' ')+ this.options[this.selectedIndex].text + ' video into a post please see <a href="' + vidType[this.options[this.selectedIndex].value].example + '" target="_blank">this</a> link.'
}else{
document.getElementById('videoExample').innerHTML='';
}
aV(this.options[this.selectedIndex].value);this.selectedIndex=0;
}
_color.parentNode.appendChild(document.createTextNode(' '));
_color.parentNode.appendChild(select)
var ex = document.createElement('fieldset'); ex.id = "videoHelp";
ex.innerHTML = '<legend>Video Help</legend><div id="videoExample"></div>'
ex.innerHTML += '<a href="http://etonbones.proboards100.com/index.cgi?action=display&board=examples&thread=72" target="_blank">Advanced Postings</a>'
document.postForm.message.parentNode.appendChild(ex)
}
if((location.href.match(/action=(display|goto|(?:user)?recent|search2|pmview)/i)||(location.href.split(/\//).pop()=="index.cgi" && (document.body.innerHTML.match(/b>\d+\sresults found<\/b/i)||document.title.match(/-\sPreview/)))) && isAllowed('canView',pb_username)){
var mTD=document.getElementsByTagName('td'),imgDisabled=true, perPost=perPage=0,prefix='',isLink=false;
for(var i=0;i<mTD.length;i++){
if(imgDisabled && mTD.className=="titlebg" && mTD.colSpan=="2" && mTD.getElementsByTagName('img').length)imgDisabled=false;
if(mTD.width=="20%" && mTD.className.match(/windowbg2?/) && !imgDisabled){
var post=mTD.nextSibling; perPost=0;
post.innerHTML= post.innerHTML.replace(/\[video=?([^\]]+?)?\]([\s\S]+?)\[\/video\]/gim,makeEmbed);
if(vidType._Globals['autoLink'] && vidType._Globals['autoLink'].length){
var v=vidType._Globals['autoLink'].split(/,/)
isLink=true;
for(var u=0;u<v.length;u++){
try{ret=vidType[v].autolink(post)}catch(e){}
}
isLink=false;
}
}
}
}
//-->
</script>