账号通
    

账号  

密码  

5806

查看

12

回复
主题:[原创]最新画中画广告添加及代码修改方法 [收藏主题] 本贴被认定为精华 转到:  
xixilvlv 当前离线

14

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:337 分
登录次数:31 次
注册时间:2007/2/12
最后登录:2007/7/27
xixilvlv 发表于:2007/3/7 17:24:00   | 只看该作者 查看该作者主题 楼主 
做在线知识付费 选科汛云开店

晚上没事,看了论坛上面关于画中画广告问题很多,于是修改了部分代码实现简单添加画中画广告的方法.

先看看我的效果


此主题相关图片如下:


此主题相关图片如下:



此主题相关图片如下:

说明: 操作前请先做好备份(分别为 KS_Cls/KS_RefreshCls.asp 和 KS_Inc/Editor.js)

直接下载修改好的文件

 下载信息  [文件大小:30.10 KB 下载次数: 次]
点击下载文件:


文章画中画添加方法:
1 打开 KS_Inc\Editor.js
大约 227 行 height+=120; 改成 height+=140;
大约 254 行 (MenuStr+=FormatMenuRow("cut", "剪切","Cut.gif");行上面)添加

MenuStr+=GetMenuFunRowStr("InsertAdStr('"+InstallDir+"')", "<font color='#FF0000'>插入广告</font>","SelectAll.gif");

大约 540行(function AbortArticle(InstallDir)行上面) 添加

function InsertAdStr(InstallDir)
{
var ReturnValue = OpenWindow(InstallDir+'KS_Editor/InsertAD.asp',200,500, window);
if (ReturnValue != null)
{var strad='<div style="float:left" class="InsertAD">'
strad=strad+'{strcript src="'+InstallDir+'Advertise.asp?I='+ReturnValue+'" language="javastrcript"}{/strcript}';
strad=strad+'</div>'
//InsertHTMLStr(ReturnValue)<div style="float:left">
InsertHTMLStr(strad)
}
KS_EditArea.focus();
}


 保存

2. 打开KS_Inc\KS_RefreshCls.asp
大约 2115 行 (re.Pattern="<img.[^>]*src(=| )(.[^>]*)>" 行上面)
添加

re.Pattern="(strcript)"
Content=re.Replace(Content,"script")
re.Pattern="({)"
Content=re.Replace(Content,"<")
re.Pattern="(})"
Content=re.Replace(Content,">")

 保存
3 在KS_Editor文件下新件 InsertAD.asp 文件 将下列代码保存

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<!--#include file="../Conn.asp"-->
<!--#include file="../KS_Cls/KS_CommonCls.asp"-->
<!--#include file="../KS_Cls/KS_AdminCls.asp"-->
<!--#include file="../KS_Inc/Session.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript" src="../KS_Inc/Common.js"></script>
<script language="JavaScript">
function OK(Val) {
 window.returnValue = Val;
    window.close();
}
window.onunload=SetReturnValue;
   function SetReturnValue()
   {
    if (typeof(window.returnValue)!='string') window.returnValue='';
   }
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>画中画广告添加</title>
<style type="text/css">
a{text-decoration: none;}
a:link {color: #000000;}
a:visited {color: #000000;}
a:hover{color: #FF0000;text-decoration: underline;}
a:active {color: #FF0000;}
td {font-family:  "Verdana, Arial, Helvetica, sans-serif"; font-size: 11.5px; color: #000000; text-decoration:none ; text-decoration:none ; }
BODY {
font-family:  "Verdana, Arial, Helvetica, sans-serif"; font-size: 11.5px;
FONT-SIZE: 9pt;
color: #000000;
text-decoration: none;
}
</style>
</head>
<body topmargin="0" leftmargin="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="22" align="center" bgcolor="#0000FF"><strong><font color="#FFFFFF">广告位通用标签</font></strong></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr ParentID="">
          <td> <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="24"><img src="../Admin/Images/Folder/folderclosed.gif" width="18" height="18"></td>
                <td width="672">广告位通用标签</td>
              </tr>
              <tr>
                <td colspan="2">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="AdwLabel" style="">
    <%dim SqlStr
      Dim RSObj:Set RSObj=server.createobject("adodb.recordset")
     SqlStr="select Place,PlaceName From KS_ADPlace"
     RSObj.open SqlStr,Conn,1,1
     do while not RSObj.eof
                %>
                    <tr>
                      <td width="8%" align="right">&nbsp;</td>
                      <td width="20" align="center"><img src="../Admin/Images/Label/label0.gif" width="21" height="15" align="absmiddle"></td>
                      <td width="88%" height="20" class="LabelItem"><a href="#" onClick="OK('<%=RSObj(0)%>');" class="LabelItem">
                        &nbsp;<%=RSObj(1)%></a></td>
                    </tr>
    <%RSOBj.MoveNext
     Loop
     RSObj.Close:SET RSObj=Nothing
     %>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table>    </td>
  </tr>
</table>
</body>
</html>
<%
Set Conn = Nothing
%>
<!--画中画广告添加 2007.3.7 -->


[此贴子已经被作者于2007-3-8 12:36:42编辑过]

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
790214 当前离线

1145

主题

1

广播

0

粉丝
添加关注
级别:八年级

用户积分:6575 分
登录次数:616 次
注册时间:2006/5/8
最后登录:2022/7/27
790214 发表于:2007/3/15 20:28:00   | 只看该作者 查看该作者主题 沙发 
科汛在线网校系统

谢谢提供,希望此插件会应用到3.2版本中


[此贴子已经被作者于2007-3-15 20:28:56编辑过]

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
baibaibai 当前离线

5

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:205 分
登录次数:4 次
注册时间:2007/3/8
最后登录:2007/3/10
baibaibai 发表于:2007/3/8 12:54:00   | 只看该作者 查看该作者主题 藤椅 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
tianxia 当前离线

151

主题

0

广播

0

粉丝
添加关注
级别:一年级

用户积分:1208 分
登录次数:190 次
注册时间:2007/1/29
最后登录:2008/6/21
tianxia 发表于:2007/3/7 22:19:00   | 只看该作者 查看该作者主题 板凳 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
msad 当前离线

1428

主题

18

广播

5

粉丝
添加关注
级别:九年级

用户积分:6865 分
登录次数:175 次
注册时间:2006/11/20
最后登录:2015/10/21
msad 发表于:2007/3/7 22:02:00   | 只看该作者 查看该作者主题 报纸 
科汛在线网校系统
值得推荐.感谢楼主的分享,支持楼主的分享精神.
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
守护 当前离线

88

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:1097 分
登录次数:194 次
注册时间:2006/8/12
最后登录:2007/7/21
守护 发表于:2007/3/7 19:46:00   | 只看该作者 查看该作者主题 地板 
科汛在线商城系统(NET)
感谢楼主的热心提供!!:@:@:@
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
mm 当前离线

1223

主题

0

广播

1

粉丝
添加关注
级别:九年级

用户积分:5702 分
登录次数:423 次
注册时间:2006/5/6
最后登录:2008/3/4
mm 发表于:2007/3/7 19:47:00   | 只看该作者 查看该作者主题 7楼 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
xixilvlv 当前离线

14

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:337 分
登录次数:31 次
注册时间:2007/2/12
最后登录:2007/7/27
xixilvlv 发表于:2007/3/7 17:29:00   | 只看该作者 查看该作者主题 8楼 
科汛在线考试系统(NET)

刚才发布失败

现在好了

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
php125 当前离线

26

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:342 分
登录次数:6 次
注册时间:2007/3/7
最后登录:2007/3/29
php125 发表于:2007/3/7 17:34:00   | 只看该作者 查看该作者主题 9楼 
好好学习,天天KESION,郁闷,为什么新注册用户哪里都开不了口
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
科汛官方 当前离线

47268

主题

145

广播

405

粉丝
添加关注
级别:管理员

用户积分:101604 分
登录次数:7935 次
注册时间:2006/12/7
最后登录:2023/12/14
科汛官方 发表于:2007/3/7 17:26:00   | 只看该作者 查看该作者主题 10楼 
做在线知识付费 选科汛云开店

感谢提供,不过有点不完整

3 在KS_Editor文件下新件 InsertAD.asp 文件 将下列代码保存
下面代码没有贴出来

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.21094秒 powered by KesionCMS 9.0