代码之家  ›  专栏  ›  技术社区  ›  Glen Solsberry

Fancybox+爆破管广告

  •  1
  • Glen Solsberry  · 技术社区  · 15 年前

    我们使用Fancybox来抛出一个实质上的间隙广告。页面加载,然后Fancybox加载到页面上,并显示我们的广告内容。对于我们发布的大多数广告内容,这是有效的(手工编码的链接/图像、双击内容等)。但来自突发媒体的广告似乎让人头痛不已。

    document.write() 到那一页。这(据我所知)会转储其他所有内容,并显示 广告内容。

    我唯一能想到的是因为突发内容缺少 iframe

    有什么建议吗?

    编辑 :广告内容来自管理员,员工可以在该管理员处粘贴适当的HTML。它直接通过PHP添加到页面中。

    1 回复  |  直到 15 年前
        1
  •  0
  •   Glen Solsberry    15 年前

    对于那些将来可能需要它的人,您确实需要一个iframe,正如@Pointy建议的那样;这里是iframe部分的模板:

    <iframe src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=rsb&c=<VALUE_OF_C>&pli=<PLI_ID>&PluID=0&w=300&h=250&ord=[timestamp]&ifrm=2&ucm=true&z=0" width=300 height=250 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0  scrolling=no bordercolor="#000000">
        <script src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=rsb&c=<VALUE_OF_C>&pli=<PLI_ID>&PluID=0&w=300&h=250&ord=[timestamp]&ucm=true&z=0"></script>
        <noscript>
            <a href="http://bs.serving-sys.com/BurstingPipe/BannerRedirect.asp?FlightID=<PLI_ID>&Page=&PluID=0&Pos=5500" target="_blank"><img src="http://bs.serving-sys.com/BurstingPipe/BannerSource.asp?FlightID=1825049&Page=&PluID=0&Pos=5500" border=0 width=300 height=250></a>
        </noscript>
    </iframe>
    

    请注意,本质上 iframe src 属性具有 ifrm=2 查询字符串中包含的值。其他的都应该是一样的。