Hướng dẫn chèn quảng cáo ở dưới góc bên phải trong Xenforo

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,829
Được Like
12,687
Bạn muốn có nhiều vị trí quảng cáo hơn cho diễn đàn, Mình Hướng dẫn chèn quảng cáo ở dưới góc bên phải trong Xenforo
Các bước thực hiện:
Mở
Template: ad_header chèn đoạn code bên dưới

Mã:
<!-- Begin Ad CHIASE -->
<script language=javascript type='text/javascript'>
function hideDiv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hideShow').style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
document.hideShow.visibility = 'hidden';
}
else { // IE 4
document.all.hideShow.style.visibility = 'hidden';
}
}
}

function showDiv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hideShow').style.visibility = 'visible';
}
else {
if (document.layers) { // Netscape 4
document.hideShow.visibility = 'visible';
}
else { // IE 4
document.all.hideShow.style.visibility = 'visible';
}
}
}
</script>
<div id="hideShow" style="position: fixed; bottom: 19px; right: 0px; width:180px; height: 200px; text-align: right; z-index:2" >
<a href="javascript:hideDiv()"><font color="red">[<b>X</b>]</font></a>
<script type="text/javascript">
var images = [], index = 0;
images[0] = "<a href='http://vnxf.vn/threads/tuyen-ban-quan-tri-mod-cho-dien-dan-xenforo-viet-nam.2.html' target='_blank'><img src='http://vnxf.vn/styles/tuyen-mod.jpg' width='170' height='200' /></a>";
images[1] = "<a href='' target='_blank'><img src='http://hopcho.vn/styles/Hopcho20/Ads/2015/banner_hosting.jpg' width='170' height='200' /></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]); //done
</script></div>
<!--End Ad CHIASE -->

Nhớ thay đổi link hình ảnh cho phù hợp.
Demo:

untitled.PNG

Chúc thành công.


Nguồn: kenh88.biz
 

conmeodien

Gefreiter
Tham gia
24/07/2016
Bài viết
55
Được Like
40
đây là chèn cho ảnh!
Nếu là Google Adsense với mã của nó là: </script>-----</script> thì bỏ vào kiểu nào trời.!!!
 

conmeodien

Gefreiter
Tham gia
24/07/2016
Bài viết
55
Được Like
40
vãi, đăng 5 câu hỏi r mà k ai trả lời ??? 4rum admin đâu r
 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mr. Tuấn

Mobile/Zalo: 0988 488 096

Telegram: bluekpro

Email: [email protected]

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Top Bottom