discuz技巧:帖内视频全屏设置方法

  • 时间:
  • 浏览:0
  • 来源:大发uu快3_uu快3手机版ios_大发uu快3手机版ios

  帖内Flash全屏展示插件,从此不再为Flash只能自定义淬硬层 淬硬层 烦恼,自定义flash淬硬层 和淬硬层 ,支持全屏浏览功能。效果展示如下:

安装法律最好的方式:后台→界面→编辑器设置→Discuz! 代码

加带swf标签,选中可用和显示项保存(注意,时需在用户组权限中,开启允许使用自定义DZ标签),打开全版设置:

替换内容填入:

<div><input type="button" value="全屏播放 {2}X{3}" onclick="selectNode(this);"/><input type="hidden" value='<div class="alldenglu"><div ><input type="button" value="关闭全屏" onclick="loadBox.hide()"/></div><div><embed src={1} width={2} height={3}  quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" ></embed></div><div>'  /></div><embed src={1} width="5150" height="150"  quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" ></embed>

<script type="text/javascript">

var loadBox= new LightBox({2},{3});

window.onload=function(){

loadBox.init();

loadBox.boxContent='<div class="alldenglu"><div ><input type="button" value="关闭全屏" onclick="loadBox.hide()"/></div><div><embed src={1} width={2} height={3} quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" ></embed></div><div>' ;

}

</script>
其它设置项请参照下面的图片:

修改论坛目录下templates\default\header.htm

查找:</head>在它的里面加带如下代码:

<style type="text/css">

.bgLayer{ background:#000; opacity:0.5; filter:alpha(opacity=150);z-index:111501;position:absolute;left:0;top:0;}

.boxLayer{ background:#EEEEEE; border:6px solid #EEEEEE; overflow:hidden; zoom:1; z-index:111502; position:absolute;}

</style>

<script type="text/javascript">

function selectNode(obj){

objParent = obj.parentNode;

loadBox.boxContent=objParent.childNodes[1].value;

loadBox.show();

}

function LightBox(boxWidth,boxHeight,boxContent)

{

this.boxWidth=boxWidth;

this.boxHeight=boxHeight;

this.boxContent=boxContent;

var bgLayer,boxLayer;

var documentHtml=document.documentElement;

this.createBgLayer=function()

{

bgLayer = document.createElement("div");

with (bgLayer)

{

className="bgLayer";

style.width=documentHtml.scrollWidth+"px";

style.height=documentHtml.scrollHeight+"px";

style.display="none";

}

document.body.insertBefore(bgLayer,document.body.firstChild);

};

this.createBox=function(){

boxLayer = document.createElement("div");

with (boxLayer)

{

className = "boxLayer";

style.width=this.boxWidth + "px";

style.height = this.boxHeight +"px";

style.display="none";

};

document.body.insertBefore(boxLayer,document.body.firstChild);

};

this.init= function()

{

this.createBgLayer();

this.createBox();

}

// if IE 6.0

function hideShowSelect(obj)

{

if (window.navigator.userAgent.indexOf("MSIE 6.0") > 0)

{

var selectDom = document.getElementsByTagName("select");

for (var i = 0; i < selectDom.length ; i++)

{

if (obj)

selectDom[i].style.display="none";

else

selectDom[i].style.display="";

}

}

};

this.show = function()

{

hideShowSelect(true);

boxLayer.innerHTML=this.boxContent;

bgLayer.style.display = "block";

boxLayer.style.display = "block";

boxLayer.style.left = documentHtml.offsetWidth /2 - boxLayer.offsetWidth/2 +"px";

boxLayer.style.top = documentHtml.scrollTop+ "px";

}

this.hide = function()

{

hideShowSelect(false);

bgLayer.style.display = "none";

boxLayer.style.display = "none";

}

}

</script>

追到。

发帖标签形式:

Tags: discuz   视频   flash   全屏  
责任编辑:mozi