我正在寻找一个解决方案,用广告服务器“openx”提供“壁纸”横幅。壁纸由排行榜横幅(728x90像素)和垂直摩天大楼组成。我无法在OpenX中找到任何选项,所以我想必须有某种脏方法来完成它。
这里有人有经验吗?我正在考虑只提供一个排行榜横幅,然后将一个html剪切到横幅上 - 其中包含我的摩天大楼横幅的标记......: - /
greg0ire>您可以在此网站上看到“壁纸”横幅的示例(之前您可能会遇到叠加横幅广告,请确保停用广告拦截扩展程序):http://www.allocine.fr/有些日子它在闪存中,其他日子它只是一个body元素上设置的background-image css属性。我想实现第二种选择。
谢谢!
答案 0 :(得分:1)
我使用此方法通过openx获得了壁纸广告。
首先,我在我网站的内容包装器下面创建了一个div(使用wordpress,header.php文件)。
<div id="adbg" style=" margin: 0pt auto; height: 1000px; width: 100%; position: fixed; cursor:pointer; ">
然后我在CSS中创建了一个带有壁纸图像的div块,并将其作为TEXT BANNER添加到OpenX
<div OnClick="location.href='#';" style="background: url('image.jpg') no-repeat scroll center top #026eb4; height: 100%; width: 100%; margin: 0pt auto; cursor:pointer; "></div>
最后,我将openx嵌入代码放在我粘贴在上面的ADBG div中。
这种技术适用于所有浏览器。
您当然可以在adbg div中获取CSS并将其存储在CSS文件中。
答案 1 :(得分:0)
目前,我最终做到了这一点,但我希望看到更好的解决方案:
<div class="openx_<?php echo $_block->getBlockParameter('css_class');?> openx_background hidden">
<?php echo str_replace('INSERT_RANDOM_NUMBER_HERE', rand(0, 9000), $_block->getBlockParameter('html', ESC_RAW));?>
<?php echo javascript_tag()?>
var checkImg = window.setInterval(function(){
if (jQuery('.openx_background img').length)
{
jQuery("body").css('background', 'url("' + jQuery('.openx_background img').attr('src') + '") no-repeat');
window.clearInterval(checkImg);
}
}, 1000);
//give up 3 s later
setTimeout(function(){
if (jQuery('.openx_background img').length == 0)
{
clearInterval(checkImg);
}
}, 3001);
<?php echo end_javascript_tag()?>
</div>
$_block->getBlockParameter('html', ESC_RAW)
包含openx javascript调用代码。
答案 2 :(得分:0)
不确定这是否仍然令人感兴趣,但在openX中有一个名为“Companion positioning”的设置。请参阅第4.6点下的OpenX参考指南:
http://opensourceusers.com/sites/default/files/openx_reference_guide.pdf
这是一种确保每次交付某个排行榜时都会交付摩天大楼的方法。然后,您可以使用前置/附加功能为背景着色,将此“曲棍球棒”变成完整的壁纸。