怎样在织梦dedecms网站上添加漂浮广告

怎样在织梦dedecms网站上添加漂浮广告,第1张

两个办法

1新建一个变量;进入系统——系统基本参数——

添加新变量右上角如下图:

点击保存变量,后台参数中就会多出一个网站底部信息变量的输入框,输入底部信息,通过:{dede:globaldede_powerby/}就可以在模板中调用了。有了我们自己的版权信息变量,我们就可以删除之前系统自带的版权信息变量。

我们使用sql命令工具在系统设置下面有个sql命令工具在输入框输入以下SQL语句,即可删除系统的版权信息变量。

SQL语句:

1DELETE FROM dede_sysconfig WHERE varname = "cfg_powerby"

2修改源码除了添加另一个变量之外,还可以看看官方的最新补丁使用到什么,通过查看67日官方更新补丁,织梦DedeCMS官方在6月7号的安全补丁主要更新文件是include/dedesqlclassphp,修复变量覆盖漏洞。但是下面的这段代码明显是不正常的,为什么要用这种编码呢?删除该文件的下面这段代码就可以解决这个问题了。代码如下:

12$arrs1 = array(0x63,0x66,0x67,0x5f,0x70,0x6f,0x77,0x65,0x72,0x62,0x79);$arrs2 = array(0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, 0x77,0x77,0x77,0x2e,0x64,0x65,0x64,0x65,0x63,0x6d,0x73,0x2e,0x63,0x6f,0x6d,0x20,0x74,0x61,0x72, 0x67,0x65,0x74,0x3d,0x27,0x5f,0x62,0x6c,0x61,0x6e,0x6b,0x27,0x3e,0x50,0x6f,0x77,0x65,0x72,0x20, 0x62,0x79,0x20,0x44,0x65,0x64,0x65,0x43,0x6d,0x73,0x3c,0x2f,0x61,0x3e);

以上2个方法都可以有效去除底部的版权信息,但是不建议用第二种,会造成注入漏洞的隐患,最好使用第一种!

<script language='javascript'>

linkarr = new Array();

picarr = new Array();

textarr = new Array();

var swf_width=280;

var swf_height=192;

var files = "";

var links = "";

var texts = "";

//这里设置调用标记

{dede:arclist flag='f' row='5'}

linkarr[[field:globalautoindex/]] = "[field:arcurl/]";

picarr[[field:globalautoindex/]] = "[field:litpic/]";

textarr[[field:globalautoindex/]] = "[field:title function='html2text(@me)'/]";

{/dede:arclist}

for(i=1;i<picarrlength;i++){

if(files=="") files = picarr[i];

else files += "|"+picarr[i];

}

for(i=1;i<linkarrlength;i++){

if(links=="") links = linkarr[i];

else links += "|"+linkarr[i];

}

for(i=1;i<textarrlength;i++){

if(texts=="") texts = textarr[i];

else texts += "|"+textarr[i];

}

documentwrite('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownloadmacromediacom/pub/shockwave/cabs/flash/swflashcab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');

documentwrite('<param name="movie" value="{dede:global$cfg_templeturl/}/images/bcastr3swf"><param name="quality" value="high">');

documentwrite('<param name="menu" value="false"><param name=wmode value="opaque">');

documentwrite('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'">');

documentwrite('<embed src="{dede:globalcfg_templeturl/}/images/bcastr3swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://wwwmacromediacom/go/getflashplayer" />'); documentwrite('</object>');

</script> 用这个就OK的

漂浮广告用如下代码:

<html xmlns="http://wwww3org/1999/xhtml">

<head>

<title>js实现可关闭的自由漂浮广告代码_js特效_特效代码_wwwxunmzycom</title>

<meta http-equiv="content-type" content="text/html;charset=utf-8">

<style type="text/css">

#img1{width:auto;position:absolute;top:43px;left:2px;z-index:10;}

#img1 div{width:auto;text-align:right;font-size:12px;}

#img1 div a:link{text-decoration:none;}

#img1 div a:hover{color:red;text-decoration:none;}

#img1 img{width:auto;border:1px solid black;}

p{margin-top:50px;text-align:center;}

</style>

</head>

<body>

<div id="img1" onmouseover="pause_resume()" onmouseout="pause_resume()">

<div><a href="javascript:void(0);" onclick="closediv()" title="点击关闭">关闭</a></div>

<a href="https://wwwxunmzycom/" target="_blank"><img src="images/logo_pngpng" alt="js实现可关闭的自由漂浮广告代码"></a>

</div>

<p>js代码可关闭的自由漂浮的广告特效</p>

<script type="text/javascript">

var xPos = 300;

var yPos = 200; 

var step = 1;

var delay = 30; 

var height = 0;

var Hoffset = 0;

var Woffset = 0;

var yon = 0;

var xon = 0;

var pause = true;

var interval;

var divid = img1; //浮动DIV的ID

dividstyletop = yPos;

function changePos(){

   width = documentbodyclientWidth;

   height = documentbodyclientHeight;

   Hoffset = dividoffsetHeight;

   Woffset = dividoffsetWidth;

   dividstyleleft = xPos + documentbodyscrollLeft;

   dividstyletop = yPos + documentbodyscrollTop;

   if(yon){yPos = yPos + step;}else{yPos = yPos - step;}

   if(yPos < 0){yon = 1;yPos = 0;}

   if(yPos >= (height - Hoffset)){yon = 0; yPos = (height - Hoffset);}

   if(xon){xPos = xPos + step;}else{xPos = xPos - step;}

   if(xPos < 0){xon = 1;xPos = 0;}

   if(xPos >= (width - Woffset)){xon = 0; xPos = (width - Woffset);}

}

function start(){

   dividvisibility = "visible";

   interval = setInterval('changePos()',delay);

}

function pause_resume(){

   if(pause){

   clearInterval(interval);

   pause = false;}

   else{

   interval = setInterval('changePos()',delay);

   pause = true; 

   }

}

function closediv(){

   clearInterval(interval);

   dividstyledisplay = "none";

}

start();

</script>

</body>

</html>

把需要改的地方改了就可以了,

更新 622

来源,以及作者跟原文章有关,原文章没有写就不会有的。

这个采集成功率大概有95%,采集不了就只能手动添加了,不是很多。

BASE64:e2RlZGU6bGlzdGNvbmZpZ30NCntkZWRlOm5vdGVpbmZvIG5vdGVuYW1lPSJiYrLJvK8iIGNoYW5uZWxpZD0iMSIgbWFjdGh0eXBlPSJzdHJpbmciDQoJcmVmdXJsPSJodHRwOi8vIiBzb3VyY2VsYW5nPSJ1dGYtOCIgY29zb3J0PSJhc2MiDQogIGlzcmVmPSJubyIgZXhwdGltZT0iMTAiIHVzZW1vcmU9IjAiIC99DQp7ZGVkZTpsaXN0cnVsZSBzb3VyY2V0eXBlPSJ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Tp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPSIifTxkaXYoW14uXSopPnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPSIifTwvZGl2PnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPSIifTxhKFtePl0qKT4oLiopPC9hPnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPSIifX08cD57L2RlZGU6dHJpbX0NCiAgIHtkZWRlOmZ1bmN0aW9ufQ0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCnsvZGVkZTpmdW5jdGlvbn0NCnsvZGVkZTppdGVtfQ0Key9kZWRlOml0ZW1jb25maWd9:END

DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
网站模板库 » 怎样在织梦dedecms网站上添加漂浮广告

0条评论

发表评论

提供最优质的资源集合

立即查看 了解详情