微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Discuz帖子右侧广告,分辨率大于1024显示

  网(LieHuo.Net)教程 关于论坛帖子右侧的广告显示问题,最近有朋友询问网,如果访客的分辨率小于1024,能否不显示呢?,下面就教你怎样把帖子右侧的广告设置成只有读者的电脑分辨率是超过1024的宽屏下显示

  教程如下:

  打开templates/default/viewthread_node.htm

  找到:

<!--{if
$admode && !empty($advlist['thread3'][$post['count']])}--><div
class=ad_pip
id=ad_thread3_$post[count]>$advlist[thread3][$post[count]]</div><!--{else}--><div
id=ad_thread3_$post[count]></div><!--{/if}--><div
id=ad_thread4_$post[count]></div>

  改为:

<div id=Layer><!--{if $admode && !empty($advlist['thread3'][$post['count']])}--><div class=ad_pip id=ad_thread3_$post[count]>$advlist[thread3][$post[count]]</div><!--{else}--><div id=ad_thread3_$post[count]></div><!--{/if}--><div id=ad_thread4_$post[count]></div></div>
<script language=javascript>
var iWidth = window.screen.availWidth;
var iHeight = window.screen.availHeight;
if(iWidth>1024){
document.getElementById('Layer').style.display = '';
} else {
document.getElementById('Layer').style.display = 'none';
}
</script>

  完。-网防采集。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐