- UID
- 96896
- 帖子
- 16
- 精华
- 0
- 贡献
- 0
- 推广
- 0
- 有效BUG
- 0
- 注册时间
- 2008-3-8
|
[交流] 插件BlankPage (hope版)改了路径不能用
插件BlankPage (hope版),改为在C盘了,好象不能用。
如下:
<html>
<head>
</head>
<body style="width: 100% important; height: 100% important;">
</body>
</html>
<script language="javascript">
<!--
var MaxPic = 3;
// 总图片个数
var speed = 6;
// 图片翻动速度 单位(秒)
var PluginDir = "c:\\images\\";
var PicDir = "[url=file:///c:\\images\\0001]file:///c:\\images\\0001[/url] ().jpg";
// 您的图片存放的文件夹
// 为通配符
// 需要你的图片文件名以有顺序的方式排列 如果你使用过 迅雷 、 影音传送带 或其他下载软件的批量任务的话肯定不陌生
// 例:你的文件名为 1.jpg 2.jpg 3.jpg ---- 20.jpg 则具体设置为 设定 MaxPic = 20 ---\\.jpg
// 例:你的文件名为 001.jpg 002.jpg 003.jpg ---- 020.jpg 则具体设置为 设定 MaxPic = 20 ---\\[***].jpg
var bgCol = "#000000";
// 背景颜色
var showMode = 2;
// 1、图片以背景的方式填充,图片超出窗口部分自动隐藏
// 2、以插入图片的方式填充,图片超出窗口部分显示滚动条
var runmode = "enable";
// 默认值 enable 自动更换图片
// enable 窗口打开自动变换
// disable 手动选择后开始变换
var SpStyle = false;
// 默认关闭渐显特效 开启此特效的情况下资源占用相应的升高
// false true
////////////////////////////////////////////////////////////////////////////
///
/// -------------------- 以下代码请勿随意修改 ---------------------
/// -------------------- by: hope250 email: hope250@163.com
///
///////////////////////////////////////////////////////////////////////////
if (top.location.href == "about:blank")
{
//alert(rand);
var newCode = "";
var run;
newCode += "<div id=\"MainDiv\" style=\"width: 100% important; height: 100% important; padding: 0px; text-align: left;\">";
newCode += '<table id="cont" style="width: 100% ! important; height: 100% ! important; padding: 0px;table-layout: fixed;" cellpadding="0" cellspacing="0" border="0"><tr><td>';
newCode += ' <div style="width: 100% ! important; height: 100% ! important;overflow-x:auto;overflow-y:auto; text-align:center; line-height:635px; border:1px solid #CCC; padding:0px; margin:auto">';
newCode += ' <table id="cont" style="width: 100% ! important; height: 100% ! important; padding: 0px; text-align: center;" cellpadding="0" cellspacing="0" border="0"><tr><td>';
newCode += ' <img id="thePic" style="border: 0px; margin: 0px;">';
newCode += ' </td></tr></table>';
newCode += ' </div>';
newCode += '</td></tr></table>';
newCode += "</div>";
newCode += "<div id=\"CmdDiv\" style=\"position:absolute; width:60px; height:20px; right:0px; bottom:0px; z-index:2; text-align:center; line-height:20px; display:block; background-color:#F9F9F9; color:#336699; font-size:12px; border:1px solid #999999;\">";
newCode += " <input type=\"checkbox\" value=\"1\" id=\"runMode\" onchange=\"javascript:autoRun();\" /><label for=\"runMode\">自动</label>";
newCode += "</div>";
newCode += "<div id=\"PicUrlDiv\" style=\"position:absolute; width:60px; height:20px; right:60px; bottom:0px; z-index:2; text-align:center; line-height:20px; display:none; background-color:#F9F9F9; color:#336699; font-size:12px; border-top:1px solid #999999; border-right:0px solid #999999; border-bottom:1px solid #999999; border-left:1px solid #999999;\"></div>";
document.body.innerHTML = "" + newCode + "";
//alert(document.body.innerHTML);
RunThisPlugin();
checkCookies();
autoRun();
}
function checkCookies()
{
var x = document.getElementById("runMode");
if(runmode == null || runmode == "disable")
{
x.checked = false;
}else{
x.checked = true;
}
}
function autoRun()
{
var aRunMode;
var x = document.getElementById("runMode");
RunThisPlugin();
if(x.checked)
{
run = setInterval("RunThisPlugin();",speed * 1000);
}else{
if(run != "undefined")
{
clearInterval(run);
}
}
}
function RunThisPlugin()
{
var picId = getRandom(MaxPic);
var bgUrl, thisPic;
//var BodyBgImg = "D:\\Program Files\\TheWorld 2.0\\Plugin\\BlankPage\\bg_side.png"
var fileNameKey = (PicDir.split("[")[1]).split("]")[0]
//alert(fileNameKey);
//return;az
picId = az(picId, fileNameKey.length);
//alert(PicDir);
bgUrl = Replace(PicDir, "[" + fileNameKey + "]", picId);
if(PicDir.toLowerCase().substring(0, 4) == "http")
{
thisPic = bgUrl.split("/");
thisPic = thisPic[thisPic.length-1];
}else{
thisPic = bgUrl.split("\\");
thisPic = thisPic[thisPic.length-1];
}
document.body.style.backgroundColor = bgCol;
document.body.style.margin = "0px";
document.body.style.overflow = "hidden";
if(showMode == 1)
{
document.body.style.backgroundImage = "url(" + bgUrl + ")"; //
document.body.style.backgroundRepeat = "no-repeat";
document.body.style.backgroundPosition = "50% 0px";
document.body.style.border = "0px solid #ccc";
document.html.style.border = "0px solid #ccc";
}else{
document.getElementById("thePic").src = bgUrl;
if (SpStyle)
{
document.getElementById("thePic").style.filter="blendTrans(duration=2)";
document.getElementById("thePic").style.filter="blendTrans(duration=crossFadeDuration)";
document.getElementById("thePic").filters.blendTrans.Apply();
document.getElementById("thePic").filters.blendTrans.Play();
}
}
}
function getRandom(under, over){
switch(arguments.length){
case 1: return parseInt(Math.random()*under+1);
case 2: return parseInt(Math.random()*(over-under+1) + under);
default: return 0;
}
}
function Replace(str, oldStr, newStr)
{
str = str.split(oldStr).join(newStr);
return str;
}
function az(nRaw,b)
{
var strNum = nRaw + "";
var nCount = b - strNum.length;
for(var i = 1; i <= nCount;i++)
{
strNum = "0" + strNum;
}
return strNum;
}
//-->
</script>
附修改的文件。 |
|