本帖最后由 hdba331 于 2009-12-26 14:36 编辑
现在放出一个修改方法,鉴于有人提出缺少CSS文件
在模板的header.htm文件的任何一处<!--{/if}-->后面加入以下代码
不用覆盖header.htm文件
<!--{if $happyfarm}-->
<style type="text/css">
#divokok {
display: none;
position: absolute;
z-index: 998;
height: 2000px;
width: 100%;
background: #000000;
filter:Alpha(opacity=60);
}
#div2 {
display: none;
position: absolute;
height: 100%;
width: 100%;
padding-top: 10%;
z-index: 999;
}
</style>
<script type="text/javascript">
var Mouse_Obj="none",_x,_y;
document.onmousemove=function()
{
if(Mouse_Obj!=="none")
{
document.getElementById(Mouse_Obj).style.left=_x+event.x;
document.getElementById(Mouse_Obj).style.top=_y+event.y;
event.returnValue=false;
}
}
document.onmouseup=function()
{
Mouse_Obj="none";
}
function m(o)
{
Mouse_Obj=o;
_x=parseInt(document.getElementById(Mouse_Obj).style.left)-event.x;
_y=parseInt(document.getElementById(Mouse_Obj).style.top)-event.y;
}
</script>
<div id="divokok"></div>
<div id="div2" onmousedown="m(this.id)" style="left: 0px;top: 0px;">
<table width="50%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#8BACD0" style="background: #8bacd0; position:static;filter:progid:DXImageTransform.Microsoft.DropShadow(color=#666666,offX=4,offY=4,positives=true)">
<tr style="cursor: move;">
<td width="68%"><img src="image/pupop_bg_go.gif" width="100" height="28" border="0"></td>
<td width="6%" align="right"><a href="happyfarm/?act=nc" target="myfarm" ><img src="image/pupop_bg_to.gif" width="44" height="28" border="0" align="right" onClick="parent.window.frames['qpgo'].location.href='about:blank';document.getElementById('divokok').style.display='none';document.getElementById('div2').style.display='none';"></a></td>
</tr>
<tr>
<td height="150" colspan="4"
align="center" valign="middle" bgcolor="#FFFFFF">
<iframe id="qpgo" name="qpgo" width="988" src="about:blank" scrolling="no" frameborder="0" onload="this.height=500"></iframe><script type="text/javascript">
function reinitIframe()
{
var iframe = document.getElementById("qpgo");
try{var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height = height;
}
catch (ex)
{
}
}
window.setInterval("reinitIframe()", 200);</script></td>
</tr>
</table>
</div>
<!--{/if}-->
因为本人改动比较大,对各位带来的不便我深感歉意! |