|
主题:[原创]最新画中画广告添加及代码修改方法 [收藏主题] | 转到: |
晚上没事,看了论坛上面关于画中画广告问题很多,于是修改了部分代码实现简单添加画中画广告的方法. 先看看我的效果 此主题相关图片如下:
说明: 操作前请先做好备份(分别为 KS_Cls/KS_RefreshCls.asp 和 KS_Inc/Editor.js) 直接下载修改好的文件
文章画中画添加方法: 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(); }
re.Pattern="(strcript)" Content=re.Replace(Content,"script") re.Pattern="({)" Content=re.Replace(Content,"<") re.Pattern="(})" Content=re.Replace(Content,">") 保存 <%@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"> </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"> <%=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) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |