Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[发布] 论坛弹窗广告代码分享 不是插件 无风险

[复制链接]
草芥 发表于 2013-1-14 23:18:58 | 显示全部楼层 |阅读模式
本帖最后由 草芥 于 2013-1-14 23:29 编辑

后台》运营》站点广告 » 广告列表 - 全局 页头通栏广告 »
适用于dz各种版本
文字,图片,视频集合的广告方式
请用代码发布
广告代码:
  1. <script language="javascript">
  2. var BD_HY_VIDEOAD = {}; (function() {
  3. var F = {
  4. videoId: "BD_HY_VIDEOAD_" + new Date().getTime().toString().substring(5, 13),
  5. bgFlashShow: 0,
  6. bdLogoShow: "true",
  7. bdSmallShow: "true",
  8. bdLogo: "ad/shiping/logo.gif",
  9. bdSmallLogo: "ad/shiping/logo.gif",
  10. cookieTime: 1000,
  11. playerWidth: 340,
  12. playerHeight: 300,
  13. minWidth: 177,
  14. minHeight: 85,
  15. bgWidth: 450,
  16. bgHeight: 400,
  17. playerSrc: "ad/shiping/video.swf",
  18. videoSrc: "03.flv",
  19. imageSrc: "by.jpg",
  20. logoSwf: "ad/shiping/logo.gif",
  21. logoPic: "ad/shiping/logo2.gif",
  22. words: "淮秀帮——华人网络界第一支形成规模的创意配音团队!淮秀帮官方论坛是由:配音、文学、动画、音画、情感、 娱乐等板块组成的交流平台",
  23. ctVideoUrl: "http://www.hxbbbs.net/",
  24. ctImageUrl: "http://www.hxbbbs.net/",
  25. ctLogoUrl: "http://www.hxbbbs.net/"
  26. },
  27. K = null,
  28. R = 0,
  29. P = !window.opera && (navigator.appVersion.indexOf("MSIE") != -1),
  30. J = P && (!window.XMLHttpRequest),
  31. $ = document.compatMode == "CSS1Compat",
  32. S = !P || (!J && $);
  33. function M(B, E, D, C, _, A) {
  34. if (D) {
  35. var $ = new Date();
  36. $.setTime($.getTime() + D)
  37. }
  38. document.cookie = B + "=" + encodeURIComponent(E) + ((D == null) ? "": ";expires=" + $.toGMTString()) + ((C == null) ? "": ";path=" + C) + ((_ == null) ? "": ";domain=" + _) + ((A) ? ";secure": "")
  39. }
  40. function D(A) {
  41. var $ = "(?:; )?" + A + "=([^;]*);?",
  42. _ = new RegExp($);
  43. if (_.test(document.cookie)) return decodeURIComponent(RegExp.$1);
  44. else return null
  45. }
  46. function Q(A, $, _) {
  47. if (A.addEventListener) A.addEventListener($, _, false);
  48. else if (A.attachEvent) A.attachEvent("on" + $, _);
  49. else A["on" + $] = _
  50. }
  51. BD_HY_VIDEOAD.setPosition = function(_) {
  52. var $ = document.getElementById(F.videoId + "_div");
  53. K = _;
  54. if (_ == "close") {
  55. M("BD_HY_VIDEOAD", "close", F.cookieTime);
  56. N(F.ctClose);
  57. I();
  58. $.style.display = "none"
  59. } else if (_ == "big") {
  60. if (!S) L();
  61. $.style.width = F.playerWidth + "px";
  62. $.style.height = F.playerHeight + "px"
  63. } else if (_ == "small") {
  64. $.style.width = F.minWidth + "px";
  65. $.style.height = F.minHeight + "px";
  66. if (!S) L()
  67. }
  68. };
  69. BD_HY_VIDEOAD.logoClick = function() {
  70. window.open(F.ctLogoUrl, "BDvideoAdNewWindow")
  71. };
  72. BD_HY_VIDEOAD.videoClick = function() {
  73. window.open(F.ctVideoUrl, "BDvideoAdNewWindow")
  74. };
  75. BD_HY_VIDEOAD.videoPicClick = function() {
  76. window.open(F.ctImageUrl, "BDvideoAdNewWindow")
  77. };
  78. BD_HY_VIDEOAD.videoAutoPlay = function() {
  79. N(F.ctAutoPlay);
  80. G()
  81. };
  82. BD_HY_VIDEOAD.videoReplay = function() {
  83. N(F.ctReplay);
  84. G()
  85. };
  86. BD_HY_VIDEOAD.videoStop = function() {
  87. N(F.ctAllPlay);
  88. I()
  89. };
  90. BD_HY_VIDEOAD.videoToSmall = function() {
  91. I()
  92. };
  93. function N($) { (new Image(1, 1)).src = $ + "&sendtime=" + new Date().getTime().toString()
  94. }
  95. function E(A, _, B) {
  96. if (document.compatMode && $) {
  97. A.style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight - B) - 1;
  98. A.style.left = document.documentElement.scrollLeft + (document.documentElement.clientWidth - _) - 1
  99. } else {
  100. A.style.top = document.body.scrollTop + (document.body.clientHeight - B) - 1;
  101. A.style.left = document.body.scrollLeft + (document.body.clientWidth - _) - 1
  102. }
  103. }
  104. function L() {
  105. var _ = document.getElementById(F.videoId + "_div");
  106. if (K == "big") E(_, F.playerWidth, F.playerHeight);
  107. else if (K == "small") E(_, F.minWidth, F.minHeight);
  108. if (F.bgFlashShow == 1 && R == 1) {
  109. var $ = document.getElementById(F.videoId + "_bg");
  110. $.style.position = "absolute";
  111. if ($) E($, F.bgWidth, F.bgHeight)
  112. }
  113. }
  114. function H() {
  115. var $ = document.getElementById(F.videoId + "_div");
  116. if ($) {
  117. $.style.position = "absolute";
  118. L();
  119. Q(window, "resize", L);
  120. Q(window, "scroll", L)
  121. }
  122. }
  123. function G() {
  124. if (F.bgFlashShow == 1 && R == 0) {
  125. var $ = document.createElement("div");
  126. $.innerHTML = O(F.videoId + "_bgflash", F.bgSrc, F.bgWidth, F.bgHeight);
  127. $.id = F.videoId + "_bg";
  128. if (S) {
  129. $.style.position = "fixed";
  130. $.style.right = 0;
  131. $.style.bottom = 0
  132. }
  133. $.style.zIndex = 2047483647;
  134. document.body.appendChild($);
  135. R = 1;
  136. if (!S) L()
  137. }
  138. }
  139. function I() {
  140. if (F.bgFlashShow == 1 && R == 1) {
  141. document.body.removeChild(document.getElementById(F.videoId + "_bg"));
  142. R = 0
  143. }
  144. }
  145. function O(D, C, B, A, $) {
  146. var _ = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' + 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + B + '" height="' + A + '" id="' + D + '" align="middle">' + '<param name="allowScriptAccess" value="always">' + '<param name="quality" value="high">' + '<param name="wmode" value="transparent">' + '<param name="movie" value="' + C + "?" + D + '">' + '<param name="flashvars" value="' + (!$ ? "": $) + '">' + '<embed src="' + C + '" flashvars="' + (!$ ? "": $) + '" quality="high" wmode="transparent" width="' + B + '" height="' + A + '" name="' + D + '" align="middle" allowScriptAccess="always" ' + 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>'
  147. return _
  148. }
  149. function B($) {
  150. var _ = "mode=" + $ + "&logomove=" + F.logoSwf + "&logopic=" + F.logoPic + "&vid=" + F.videoSrc + "&words=" + F.words + "&vpic=" + F.imageSrc + "&sl=" + F.bdLogoShow + "&ssl=" + F.bdSmallShow + "&bdlogo=" + F.bdLogo + "&bdslogo=" + F.bdSmallLogo;
  151. return _
  152. }
  153. function A() {
  154. var A = O(F.videoId + "_player", F.playerSrc, F.playerWidth, F.playerHeight, B(K)),
  155. $ = document.createElement("div");
  156. $.innerHTML = A;
  157. $.id = F.videoId + "_div";
  158. $.style.zIndex = 2147483647;
  159. $.style.overflow = "hidden";
  160. $.style.position = "fixed";
  161. $.style.right = 0;
  162. $.style.bottom = 0;
  163. if (K == "small") {
  164. $.style.width = F.minWidth + "px";
  165. $.style.height = F.minHeight + "px"
  166. } else if (K == "big") {
  167. $.style.width = F.playerWidth + "px";
  168. $.style.height = F.playerHeight + "px"
  169. }
  170. _($);
  171. if (!S) H();
  172. N(F.ctIfShow)
  173. }
  174. function _($) {
  175. if (P) {
  176. if (document.readyState == "complete") document.body.appendChild($);
  177. else document.onreadystatechange = function() {
  178. if (document.readyState == "complete") document.body.appendChild($)
  179. }
  180. } else document.body.appendChild($)
  181. }
  182. function C() {
  183. var $ = D("BD_HY_VIDEOAD");
  184. if ($ != "close") if ($ == "small") {
  185. K = "small";
  186. A()
  187. } else {
  188. K = "big";
  189. A();
  190. M("BD_HY_VIDEOAD", "small", F.cookieTime)
  191. }
  192. }
  193. Q(window, "load", C)
  194. })()
  195. </script></div>
复制代码
视频文件可以用绝对地址,也可以用相对地址,我用flv格式的测试成功。
下面的附件内容先传到论坛根目录
ad.part1.rar (300 KB, 下载次数: 292) ad.part2.rar (300 KB, 下载次数: 206) ad.part3.rar (106 KB, 下载次数: 216)

演示地址:http://hxbbbs.net/
我的论坛http://hxbbbs.net/  大家给些人气啊
回复

使用道具 举报

 楼主| 草芥 发表于 2013-1-14 23:32:40 | 显示全部楼层
木有人{:soso_e109:}{:soso_e109:}{:soso_e109:}
回复

使用道具 举报

 楼主| 草芥 发表于 2013-1-15 06:39:13 | 显示全部楼层
现在我先把演示关了
回复

使用道具 举报

钱哥 发表于 2013-1-26 15:52:51 | 显示全部楼层
具体怎么弄的,能不能详细说明下,我看你的演示网站半天了都没有弹出一个广告啊
回复

使用道具 举报

 楼主| 草芥 发表于 2013-2-2 22:43:07 | 显示全部楼层
钱哥 发表于 2013-1-26 15:52
具体怎么弄的,能不能详细说明下,我看你的演示网站半天了都没有弹出一个广告啊

亲,广告我关了   现在看不到了
我有看到别人和我一样效果的插件要钱的
所以把我自己的共享出来
回复

使用道具 举报

钱哥 发表于 2013-2-3 10:22:15 | 显示全部楼层
草芥 发表于 2013-2-2 22:43
亲,广告我关了   现在看不到了
我有看到别人和我一样效果的插件要钱的
所以把我自己的共享出来

具体怎么弄啊,不会啊
回复

使用道具 举报

左手的爱 发表于 2013-2-3 21:07:58 | 显示全部楼层
广告代码要插入到哪里?
回复

使用道具 举报

 楼主| 草芥 发表于 2013-2-18 13:06:43 | 显示全部楼层
左手的爱 发表于 2013-2-3 21:07
广告代码要插入到哪里?

页头通栏广告
回复

使用道具 举报

taoshaowen 发表于 2013-4-2 08:19:51 | 显示全部楼层
留个小脚印
回复

使用道具 举报

180134562 发表于 2013-4-2 08:28:48 | 显示全部楼层
感谢分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-11-23 03:17 , Processed in 0.095109 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表